ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
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.
2 | No.2 Revision |
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.