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

Revision history [back]

What you are seeing is a TF problem. I could replicate your error, and roswtf shows:

ERROR TF re-parenting contention:
 * reparenting of [/odom] to [/map] by [/slam_gmapping]
 * reparenting of [/odom] to [/base_footprint] by [/gazebo]

ERROR TF multiple authority contention:
 * node [/slam_gmapping] publishing transform [/odom] with parent [/map] already published by node [/gazebo]
 * node [/gazebo] publishing transform [/odom] with parent [/base_footprint] already published by node [/slam_gmapping]

What this means is that slam_gmapping publishes the TF frame /map as parent of /odom, but the PR2 controllers (which show up as /gazebo) also publish /odom, but this time with /base_footprint as its parent. The trouble is that a TF frame can only have exactly one parent.

When running with robot_pose_ekf enabled (before your changes), the TF tree looks like this:

map ------> odom_combined ------> base_footprint

The first transform is published by gmapping, the second by robot_pose_ekf.

Now, your TF tree looks like this:

           map ---
                   \
                     ---> odom
                   /
base_footprint ---

... which is illegal. I think the reason why odom is published as a child of base_footprint instead of a parent is so that you can have odom and odom_combined both published at the same time.

The solution would be that somehow you need to make odom a parent of base_footprint. For example, you could switch publish_tf back off, write a small node that listens to the odom topic (not TF transform) and publishes that as a TF transform from odom to base_footprint.

Just for curiosity's sake: why do you want to remove robot_pose_ekf?