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

Revision history [back]

I find it's better to think about them as totally separate. In reality, both filters are doing the same thing: estimating your pose in some world frame. The map and odom frames are similar in that they are both global frames, so in a perfect world, your pose would be the same in both. What the odom and map filter instances are doing is creating transforms from odom->base_link and from map->base_link, respectively. tf represents your transforms as a tree, though, so we can't have two parents to base_link. To get around this, the map instance of ekf_localization_node looks up the transform from odom->base_link that the odom instance of the EKF is generating, and uses that transform, along with its own (internal, unpublished) map->base_link transform, to generate a map->odom transform. This means you can still transform from map->base_link in other nodes that may require it.

As to what you do with each estimate, that's up to you. If you want the most accurate answer to the question "where is my robot?", then I would use the map instance output. If you want a pose estimate that is not going to suddenly jump, then you want the odom instance.