Hi, you are right, this behavior seems somehow odd. I guess the reason is that on the PR2, the TF tree looks like this: /map -> odom_combined -> base_footprint -> ... As far as I know, Pr2Odometry is set up to not publish transforms at all, just Odometry messages. These are read by the robot_pose_ekf node which then publishes the odom_comined -> base_footprint transform. If you want to use the Pr2Odometry node for doing it, I think you might need to fork and hack it. This should not be too hard however. Lorenz > Hi all, > > I am using the controller Pr2Odometry from the > pr2_mechanism_controllers package to do simulated odometry for the > KUKA YouBot in Gazebo. I am seeing an oddity in the tf tree, and > I'd like to find out whether it's something I'm doing. It seems to > me that there is a reversed parent/child relationship in the tf > links published by Pr2Odometry. The documentation for it at > > http://www.ros.org/wiki/pr2_mechanism_controllers/Pr2Odometry#ROS_API > > says > > /tf (tf/tfMessage) > Two transforms are published to tf, a constant transform from > the base_footprint frame to the base_link frame and the transform > from the odom frame to the base footprint frame. > > This conforms to my expectation, which is that /odom is the parent > of /base_footprint. Thus, if global localization drops out, you can > still continue on odometry alone for as long as your dead reckoning > will allow. This expected behavior is also compatible with > fake_localization, which publishes a transform from /map to /odom. > > By contrast, examining tf on the running system shows me a tree in > which /base_footprint is at the root. /odom is a leaf and a sibling > of /base_link, which connects to the rest of the tree. The code at > > /opt/ros/electric/stacks/pr2_controllers/pr2_mechanism_controllers/src/pr2_odometry.cpp > > is clear: > > out.header.frame_id = tf::resolve(tf_prefix_,base_footprint_frame_); > out.child_frame_id = tf::resolve(tf_prefix_,odom_frame_); > > So /odom is the child here. This behavior seems to contradict > intuition and the (admittedly terse) documentation online. However, > since I am using this pr2 code on the YouBot, I wonder if there is > something different about how the PR2 operates? > > Thanks! > > -ross > _______________________________________________ > ros-users mailing list > ros-users@code.ros.org > https://code.ros.org/mailman/listinfo/ros-users > -- Lorenz Mösenlechner | moesenle@in.tum.de Technische Universität München | Karlstraße 45 80335 München | Germany http://ias.cs.tum.edu/ | Tel: +49 (89) 289-26910