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

But I found the message filter with a call back function can only work outside the while loop, and tf transform can only work inside a while loop.

I'm not sure that is true. Are you referring to the fact that you'd have to call lookupTransform(..) repeatedly (in TF 1 at least)?

You probably want to have matched pairs of <message, tf>. In that case: take a look at Using Stamped datatypes with tf::MessageFilter.

But I found the message filter with a call back function can only work outside the while loop, and tf transform can only work inside a while loop.

I'm not sure that is true. Are you referring to the fact that you'd have to call lookupTransform(..) repeatedly (in TF 1 at least)?

You probably want to have matched pairs of <message, tf>. In that case: take a look at Using Stamped datatypes with tf::MessageFilter.


Edit: what you show in your edit is exacly what the tf::MessageFilter is for.