SLAM [Melodic]
Last updated
Last updated
To perform simultaneous localization and mapping (SLAM), run the below line in the terminal shell.
Running the above command, your terminal should output data like the image below.
To get see SLAM in action on rviz, run the below line in the terminal shell.
Running the above command, an rviz GUI like above should appear. In the center, you should be able to see your robot. The black outline indicates where the lidar detects obstacles, and the light grey indicates areas that the lidar is actively scanning.
As you can see above, the SLAM map is incomplete since the area is grey scanned area is not fully enclosed by thick black lines indicating the sensing of a wall.
To complete the map, use teleop to move your robot around the scan space. Remember this can be done by running the below command in a new terminal shell.
Next, use the A, W, S, and D key to complete the map using rviz as guidance.
Once your map is complete, run the below command to save the map.
Then, kill all the terminals (including roscore) by pressing Control + C.
After that, run the below command to copy the map.pgm and map.yaml files to omo_r1mini_navigation/maps.
To see a video demonstration for this page, watch the attached video here: https://www.youtube.com/watch?v=lOkVKbT4eWY