<div>Hi Ross, </div><div><br></div><div>This would be better asked on <a href="http://answers.ros.org">answers.ros.org</a> we're transitioning ros-users to being an announce and discussion list and trying to keep focused questions on the QA site where it's easier for future people with the same question to find the answers. </div>

<div><br></div><div>But as I'm mailing the list anyway here's your answer.  If you'd ask it again on <a href="http://answers.ros.org">answers.ros.org</a> I or someone else can fill it in there.  </div><div><br>

</div>You are right that /odom is generally the parent of base_footprint.  The standard is codified in REP 105.   <a href="http://www.ros.org/reps/rep-0105.html">http://www.ros.org/reps/rep-0105.html</a>  <div><br></div>
<div>
The discrepancy in the pr2 is a bit of legacy thing where we learned from the PR2 that we should do it differently, but don't want to break peoples code so we haven't changed it.  The reason that odom is a child of base_link is that there is odom_combined which is now the parent.  The original version of robot_pose_ekf it used the "odom" frame to compute the "odom_combined" frame by including the imu information. And to have both frames one had to become a child, so the less accurate one was pushed there.  By the time we realized that it wasn't needed anymore a lot of the pr2 code had assumptions about "odom_combined"  We've worked hard to scrub that out of pr2 independent packages but have not made the effort to remove it from the pr2 specific packages yet.  </div>

<div><div><br></div><div>Tully<br><div><br></div><div><br><div><br></div><div><br><div class="gmail_quote">On Thu, Dec 1, 2011 at 5:07 PM, Ross Knepper <span dir="ltr"><<a href="mailto:rak@csail.mit.edu">rak@csail.mit.edu</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi all,<br>
<br>
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<br>


<br>
    <a href="http://www.ros.org/wiki/pr2_mechanism_controllers/Pr2Odometry#ROS_API" target="_blank">http://www.ros.org/wiki/pr2_<u></u>mechanism_controllers/<u></u>Pr2Odometry#ROS_API</a><br>
<br>
says<br>
<br>
    /tf (tf/tfMessage)<br>
    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.<br>
<br>
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.<br>


<br>
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<br>
<br>
    /opt/ros/electric/stacks/pr2_<u></u>controllers/pr2_mechanism_<u></u>controllers/src/pr2_odometry.<u></u>cpp<br>
<br>
is clear:<br>
<br>
      out.header.frame_id =  tf::resolve(tf_prefix_,base_<u></u>footprint_frame_);<br>
      out.child_frame_id = tf::resolve(tf_prefix_,odom_<u></u>frame_);<br>
<br>
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?<br>


<br>
Thanks!<br>
<br>
 -ross<br>
______________________________<u></u>_________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org" target="_blank">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/<u></u>listinfo/ros-users</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Tully Foote<br>Systems Engineer<br>Willow Garage, Inc.<br><a href="mailto:tfoote@willowgarage.com">tfoote@willowgarage.com</a><br>(650) 475-2827<br>
</div></div></div></div>