Rosanswers logo


I've got a Turtlebot 2 with a Kinect on ROS groovy, and I'm trying to understand the basics of navigation. I've been going over the navigation tutorials but one thing that consistently confuses me is the role of AMCL.

My issue is this: I plan to write a program similar to "Explore" (http://www.ros.org/wiki/explore, which seems unmaintained for current ROS distributions). I know in general that gmapping is used to build a map from driving around an unknown environment, and that AMCL is used for localization. The tutorials provided for Turtlebot only ever use gmapping when the driving is controlled by the user (teleop), and they only use AMCL to navigate a known map that has already been created by a previous teleop. But what if I wanted the robot to explore and map an unknown area autonomously? Would just running gmapping work?

The idea that gmapping is a SLAM algorithm, by name (Simultaneous Localization and Mapping), suggests to me that I only need gmapping to achieve this, but since the tutorials seem to insist on AMCL so much, I just want to be sure I have this right.

If anyone could clear this up for me, I'd appreciate it. Thanks in advance!

Originally posted by BlitherPants on ROS Answers with karma: 504 on 2013-07-17

Post score: 7


1 Answer 1


Rosanswers logo

Short answer: You are right.

Longer answer: As you said gmapping implements SLAM and thus contains localization. AMCL only implements localization and thus needs a map from somewhere.

There reason of the use that you have seen is that to actually create the map without teleop one would need a node like explore, so unless that's part of the task, just building the map by hand and only using localization afterwards is fine. Also localization should be more stable.

Originally posted by dornhege with karma: 31395 on 2013-07-17

This answer was ACCEPTED on the original site

Post score: 5

Original comments

Comment by BlitherPants on 2013-07-18:
Thanks! By the way, what case are you saying will have more stable localization?

Comment by dornhege on 2013-07-18:
AMCL on a static map (given that this is correct) as there is no map uncertainty.

Comment by RB on 2013-10-20:
So, if we make a map of the entire environment in image editor will serve as global cost map for localization? Will there be problem in marking and clearing or any accessing problem?

Comment by dornhege on 2013-10-28:
Costmap, marking, clearing is independent of the localization. Both should work with a self-drawn map in theory. However that should be metrically correct.

Comment by RB on 2013-10-28:
I am going through gmapping and global 2D map creation tutorial. But my bag file containing logged transform and laser scan data has not been created. I have posted a question http://answers.ros.org/question/94671/error-in-creating-2d-global-map-of-the-environment/ . Please give some information regarding the creation of 2D global map. I am using USARSim/ROS control framework.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.