This lesson shows how to use the TurtleBot with a known map. In this lesson we will run playground world with the default map, but also there are instructions which will help you to run your own world.

1. Launch Gazebo.

roslaunch turtlebot_gazebo turtlebot_world.launch

If you want to launch your own world run this command.

roslaunch turtlebot_gazebo turtlebot_world.launch world_file:=<full path to the world file>

2. Run the navigation demo.

roslaunch turtlebot_gazebo amcl_demo.launch

If you have launched your own world or you want to use the map which you created in the previous lesson, specify a map file.

roslaunch turtlebot_gazebo amcl_demo.launch map_file:=<full path to map yaml file>

3. Launch Rviz.

roslaunch turtlebot_rviz_launchers view_navigation.launch

You can see this picture.

Default Map of the Playground World

Location of the TurtleBot on the map is already known. You will see a collection of arrows which show the position of the Turtlebot.

4. Send a navigation goal. Click the 2D Nav Goal button.

5. Click on the map where you want the TurtleBot to drive and drag in the direction the Turtlebot should be pointing at the end.

NOTE: If the path or goal is blocked it can fail.

NOTE: If you want to stop the TurtleBot before it reaches it’s goal, send it a goal at it’s current location.

6. Interrupt processes and close the terminals.

You can see all these steps in the video:

Autonomous Navigation