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

Your problem is that you are constructing the listener inside the callback. This means that you do not give it time to build up it's buffer. That's why if you query it quickly, it reports it does not exist. And with a timeout, it builds up a buffer of new information, but it will never hear about the past where you queried it.

I recommend rereading the tf and time tutorial linked from the tutorial you linked to.