Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Your basic problem is that you're asking to lookup data from the transform tree before it's available.

You need to wait for the transform to become available: http://wiki.ros.org/tf/Tutorials/tf%20and%20Time%20%28C%2B%2B%29

The message filters are likely still the correct way to achieve what you want. http://wiki.ros.org/tf/Tutorials/Using%20Stamped%20datatypes%20with%20tf%3A%3AMessageFilter

They will hold the data until the transform is available. To use it to query for arbitrary data. You can manually call add to add queries to the system that will then get the callback invoked when they become available. And you can just ignore anything but the timestamp and frame ids.

Reading your original description again though I think that the MessageFilter as implemented is exactly designed for what you want though. It will hold the message until the transform is available. And then you can apply the transform in the callback. Which appears to be exactly what you're talking about doing.