Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You are getting a lookup error because you are creating your TransformListener inside the callback. The transform listener requires building up a cache of known transforms. When you construct the listener it will be initialized with an empty cache. In that case it's likely that you'll never be able to transform.

Note in the tutorial how the listener is initialized outside the loop not inside. http://wiki.ros.org/tf/Tutorials/Writing%20a%20tf%20listener%20%28C%2B%2B%29#CA-462816d8af59c3aa7e95f6de603fa0a07b25aa07_20

The lifetime requirements are explained below: http://wiki.ros.org/tf/Tutorials/Writing%20a%20tf%20listener%20%28C%2B%2B%29#The_Code_Explained