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

Revision history [back]

The /tf data isn't really designed to work like a normal topic. You don't typically just subscribe to it. More about how /tf data works can be read on the tf wiki page. Here are 2 simple solutions for you to consider:

  1. You could write a node that creates a TransformListener, and then in some callback (maybe from a Timer) you lookup the transform from some frame attached to the depth sensor (maybe /<camera>_depth_optical_frame) to the frame at the joint you are interested in. This transform could then be converted into some other message type (maybe a PoseStamped) and published on some other topic. Or it could be directly worked with to do whatever you want.
  2. You could edit the openni_tracker source code to publish a message that contains the data you want. I have a package that I worked on a few years ago that does this for all of the skeleton tracking data. Here is the package and here are the associated message definitions. You might also want to look at the pi_tracker package as I think they do something very similar.