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

Revision history [back]

click to hide/show revision 1
initial version

The following snippet will print the x coordinate of the first transform in a tf message:

rxplot /tf/transforms[0]/transform/translation/x

Big caveat: if there are multiple publishers of the /tf topic, this won't work, as the transform vector index (the [0] above) will not always represent the same frame. Further, f you're querying a nonzero index, it might be possible that the index does not even exist in a given message.

I would recommend republishing the transform(s) of interest as a separate pose(stamped) message and plot from there. More overhead, but less surprises.