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
?
Originally posted by Martin Günther with karma: 11816 on 2012-06-26
This answer was ACCEPTED on the original site
Post score: 3
Original comments
Comment by ChickenSoup on 2012-06-26:
@Martin Günther Thank you very much for the wonderful explanation.
Comment by ChickenSoup on 2012-06-26:
@Martin Günther Well, I am working on a rover navigating on 3D terrain. And, after going through the robot_pose_ekf code I realized it cannot be used straightaway for inclined planes (http://answers.ros.org/question/32183/robot_pose_ekf-on-an-inclined-plane/). So i just unplugged it.
Comment by ChickenSoup on 2012-06-26:
@Martin Günther gmapping cannot be used for 3D as well; that I am aware of by the way :)