[Documentation] [TitleIndex] [WordIndex

(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

SLAM Map Building with TurtleBot

Description: How to generate a map using gmapping

Tutorial Level: BEGINNER

Next Tutorial: Autonomous Navigation of a Known Map with TurtleBot

This assumes that you have a TurtleBot which has already been brought up in the turtlebot bringup tutorials. The default navigation parameters provided on turtlebot_navigation should be apropriate in most cases, but if not, take a look at the setup navigation tutorial.

If you are using a Create base, then performance will be greatly enhanced by accurate calibration, refer to the TurtleBot Odometry and Gyro Calibration tutorial. Note that the Kobuki has a factory calibrated gyro inside and shouldn't need extra calibration.

Launch the gmapping app

On the TurtleBot

On your Workstation

This assumes you have ROS on your workstation and ROS_MASTER_URI has been set to point to your turtlebot. Please read Workstation Installation and Network configuration before this.

# Pre-Groovy
rosrun rviz rviz -d `rospack find turtlebot_navigation`/nav_rviz.vcg
# Groovy or later
roslaunch turtlebot_rviz_launchers view_navigation.launch

On the TurtleBot

Drive the robot around by either:

rosrun map_server map_saver -f /tmp/my_map

Note: Do not close the gmapping launch until saving the map.

Video of process

In rviz it will look something like this:

To see the map updates on RViz as you drive the robot around, under Map on the left hand side panel, check to see that Topic is set to map, in addition to setting your ROS_MASTER_URI to the Turtlebot.

What Next?


2019-09-14 13:18