Note: This tutorial assumes that you have completed the previous tutorials: SLAM Map Building with TurtleBot, .
(!) 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.

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

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 the turtlebot bringup tutorials. 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 amcl app

On the TurtleBot

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

This assumes you have ROS on your workstation and ROS_MASTER_URI has been set to point to your turtlebot.

Launch rviz:

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

In RVIZ

Localize the TurtleBot

When starting up, the TurtleBot does not know where it is. To provide it its approximate location on the map:

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

You will see a collection of arrows which are hypotheses of the position of the TurtleBot. The laser scan should line up approximately 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 1 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:

What Next?

Wiki: turtlebot_navigation/Tutorials/Autonomously navigate in a known map (last edited 2016-04-11 19:27:21 by MikeySaugstad)