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

Revision history [back]

You're 99% of the way there, there is just one detail of how transform listeners work you're missing.

You cannot create a transform listener then query it for transforms straight away, you need to give it a second or more otherwise it will fail to find a transform as in your case. To fix this you can add a one second sleep after you create the listener object then this should start working.

The reason is that the tf listeners needs to build up a buffer of tf messages before it is aware of all the transforms and is able to correctly answer tf queries.

Hope this helps.