Ask Your Question
0

Using gmapping with amcl [closed]

asked 2013-12-18 03:50:47 -0500

rnunziata gravatar image

I am using gmapping to send a map to the amcl via the map topic. This all works as long as I remap the tf topic in the amcl node to some other topic. If not then the base_foot print and the lazer scans jump between the map origin and the current goal location. Can anyone shed light on this behavior?

In amcl is says it publishes the transform from odom (which can be remapped via the ~odom_frame_id parameter) to map.

In gmapping it says it publishes: map → odom the current estimate of the robot's pose within the map frame

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by rnunziata
close date 2013-12-18 07:37:37

1 Answer

Sort by » oldest newest most voted
0

answered 2013-12-18 04:39:18 -0500

dornhege gravatar image

Both usually provide localization by publishing the map -> odom tf transform. This is exactly your problem: You have two different sources that provide the same kind of, but different, information.

You should not need amcl at all when running gmapping as amcl only provides localization for a given map. Gmapping already does give you localization (+ mapping).

edit flag offensive delete link more

Comments

So you saying, that I can not use gmapping to provide the map service and amcl for the localization? In what sense does amcl use the map topic ...what was its intent? When would it use this feature?

rnunziata gravatar image rnunziata  ( 2013-12-18 05:08:22 -0500 )edit

If you already have a map from the environment and only want to localize on that.

dornhege gravatar image dornhege  ( 2013-12-18 05:27:57 -0500 )edit

You might consider using map_server instead of gmapping. Typically you use gmapping to build a map of the environment, save the map (by running: rosrun map_server map_saver) and then broadcast it at run time using map_server.

Tim Sweet gravatar image Tim Sweet  ( 2013-12-18 06:58:40 -0500 )edit

Ok...I wanted to be able to send updated maps as I go along...but I guess I can not do that. I will close this question.

rnunziata gravatar image rnunziata  ( 2013-12-18 07:37:25 -0500 )edit

Just to clarify in case anyone Googles this topic: you can update the map as you go, in which case you only need gmapping and not AMCL since gmapping already provides localization.

Tim Sweet gravatar image Tim Sweet  ( 2014-01-06 19:50:56 -0500 )edit

So typically, is it expected to use AMCL after you have made the map? Or do I even need amcl? I still don't understand when would I specifically need it. Is amcl way better than gmapping's localisation technique that I wouldn't use gmapping for localisation (after creating the map)?

Harsh2308 gravatar image Harsh2308  ( 2017-09-06 00:46:52 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2013-12-18 03:50:47 -0500

Seen: 1,357 times

Last updated: Dec 18 '13