ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You are using tf
wrong. It doesn't work like "normal" ROS topics, but does collect its data on its own. So usually you never subscribe to a tfMessage yourself, but just create the listener, which does all that for your, and then use waitForTransform
to check when the transform is available.
Make sure that you create the listener somewhere static, so that it isn't deleted as it needs to fill its buffers.
The reason for this is that in many cases there will never be a tfMessage that contains your transform, but only a path through transforms from different messages that enables the tf listener to built up that transform.