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

The robot autonomuosly navigate around the world!

Goal

This tutorial shows how to use the TurtleBot with a known map. This assumes that you have a map of robot environment. such as the one generated by the previous tutorial.

Execute

Make sure the minimal software has already been launched on the robot and you have configured your network correctly. 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.

Roslaunch

1. On the TurtleBot, run the navigation demo app passing in your generated map file.

 > export TURTLEBOT_MAP_FILE=/tmp/my_map.yaml 
# e.g) export TURTLEBOT_MAP_FILE:=`rospack find turtlebot_navigation`/maps/willow-2010-02-18-0.10.yaml
 > roslaunch turtlebot_navigation amcl_demo.launch

2. On the PC, launch rviz with the following command.

 > roslaunch turtlebot_rviz_launchers view_navigation.launch --screen

OR

Remocon

1. configure TURTLEBOT_MAP_FILE environment variable to point the map to use.

 > export TURTLEBOT_MAP_FILE=/tmp/my_map.yaml 
# e.g) export TURTLEBOT_MAP_FILE:=`rospack find turtlebot_navigation`/maps/willow-2010-02-18-0.10.yaml

2. Start the remocon and fire up the PC Pairing/Navigation interaction

navigation.png

In RVIZ

Localize the TurtleBot

When starting up, the TurtleBot does not know where it is. To provide him 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.

Note: set the fixed frame to "map" in RVIZ's global options to use the "2D Pose Estimate button".

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/indigo/Autonomously navigate in a known map (last edited 2017-03-02 18:03:28 by jubeira)