Note: This tutorial assumes that you have completed the previous tutorials: SLAM Map Building with TurtleBot, Performance will be greatly enhanced by accurate calibration. TurtleBot Odometry and Gyro Calibration.

Autonomous Navigation of a Known Map with TurtleBot

Description: This tutorial describes how to use the TurtleBot with a previously known map.

Tutorial Level: BEGINNER

Next Tutorial: TurtleBot Follower Demo

Prior Setup

This tutorial assumes you have a map of your work area setup. Such as the one generated by the previous tutorial.

This assumes that you have a TurtleBot which has already been brought up in this tutorial. turtlebot_bringup/Tutorials/TurtleBot Bringup.

Launch the amcl app

On the TurtleBot

  1. Run the navigation demo app passing in your generated map file.
    roslaunch turtlebot_navigation amcl_demo.launch map_file:=/tmp/my_map.yaml

On your Workstation

  1. Source diamondback and set connectivity then launch rviz.
    rosrun rviz rviz -d `rospack find turtlebot_navigation`/nav_rviz.vcg

In RVIZ

Localize the TurtleBot

When starting up the TurtleBot does not know where it is in the map. Locate on the map approixmately where the TurtleBot is located.

  1. Click the "2D Pose Estimate" button
  2. Click on the map where the TurtleBot is and drag in the direction the TurtleBot is pointing.

You will see a collection of red arrows which are hypotheses of the position of the TurtleBot. A green laser scan should line up with the walls in the map. If things don't line up well you can repeat the procedure.

Teleoperation

The teleoperation can be run simultaneously with the navigation stack. It will override the autonomous behavior if commands are being sent. It is often a good idea to teleoperate the robot after seeding the localization to make sure it converges to a good estimate of the position.

Send a navigation goal

With the TurtleBot localized it can then autonomously plan through the environment.

To send a goal:

  1. Click the "2D Nav Goal" button
  2. Click on the map where you want the TurtleBot to drive and drag in the direction the TurtleBot should be pointing at the end.

This can fail if the path or goal is blocked.

If you want to stop the robot before it reaches it's goal, send it a goal at it's current location.

Note: The iRobot Create which the TurtleBot is build on top of has relatively fragile motors. In testing letting the robot drive against an obstacle for extended periods can cause permanent damage to the drive train. There will be future upgrades to add a "Stop" button to the dashboard, and integrate the bump sensor, in the mean time be careful.

Running this tutorial can look like this:

Wiki: turtlebot_navigation/Tutorials/Autonomously navigate in a known map (last edited 2012-02-13 00:55:04 by ThibaultKruse)