ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

problem publishing tf map->base_link

asked 2014-07-28 08:17:28 -0500

Markus Bader gravatar image


I wrote my own localization and I figured out hat amcl is publishing map->odom and not map->base_link. Which is strange but on the end I had to do the same by computing first the difference to publish map->odom->base_link. Can anyone help my out to clarify this situation.


edit retag flag offensive close merge delete


How did you managed to have map->odom->base_link ? I'm struggling to have map->odom (I already have odom->base_link)

Moda gravatar image Moda  ( 2014-07-28 08:20:25 -0500 )edit

Yes my stuff is working. I had a look how it is done in amcl_node.cpp line 1125-1160.

Markus Bader gravatar image Markus Bader  ( 2014-07-29 02:08:32 -0500 )edit

Thanks, that's what I was looking for. Here is a link to the AMCL code with updated line #:

lalten gravatar image lalten  ( 2018-02-08 04:12:12 -0500 )edit

Hi lalten! To not edit AMCL, what it does makes perfect sense, have a look at the figures on the bottom of and on domhege answer below.

Markus Bader gravatar image Markus Bader  ( 2018-09-06 01:50:10 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-07-28 08:39:51 -0500

dornhege gravatar image

This is unintuitively strange indeed, but correct. The reason for that is that TF can only form a tree, thus having /map->/base_link and /odom->/base_link there would be a node with two parents.

More details are here:

edit flag offensive delete link more


Thanks, now a day later it is clear. It also solves the problem of different update rates and allows a native localization base on the last localization update and odom values.

Markus Bader gravatar image Markus Bader  ( 2014-07-29 02:09:59 -0500 )edit

Question Tools

1 follower


Asked: 2014-07-28 08:17:28 -0500

Seen: 954 times

Last updated: Jul 28 '14