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

Revision history [back]

I am not using Xtion Pro, but for kinect, but it is the same openni_tracker.

I would say that in fact you make two mistakes :

  • as soon as you live the frame, the transformation "/openni_depth_frame" to "/right_hip_1" disappears in almost no time (less than two seconds). However, if you are using RVIZ, you have a parameter you can change : In RVIZ, in the pannel Displays, under TF you have "Frame Timeout". Try putting this to 0, and you will not see the transforms anymore, as soon as you left the frame.
  • The second mistake concerns your use of listener.waitForTransform : as you can see on this tutorial, the third argument is the moment at which you want to know the transform was. Here, it seems that you always ask for a transform in the past, at the last moment you found the right hip. Thus leading to a seemingly always existing transform. Try to replace right_hip_point_1.header.stamp by ros::Time::now(), and you should not have it anymore.

The combination of the two thus lead you to think the transform was still here after you left the frame, whereas in fact it is not :-)

Let me know,

Bests regards,

Steph