ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I guess you are instantiating a new tf::TransformListener
right before you are calling transformPoint
. This won't work because it takes some time until new tf messages are received and the TransformListener's cache is filled. Instead, you should instantiate the TransformListener
at the beginning of your program.
If you happen to get extrapolation errors, have a look at waitForTransform
and this tutorial or tf::MessageFilter
.
2 | No.2 Revision |
I guess Just a guess: are you are maybe instantiating a new tf::TransformListener
right before you are calling transformPoint
. , i.e. in the same function you are calling transformPoint
? This won't work because it takes some time until new tf messages are received and the TransformListener's cache is filled. Instead, you should instantiate the TransformListener
at the beginning of your program.
If The same can happen if you happen to get call transformPoint
too early in your program, i.e. when there were no messages on /tf received so far. To avoid that, or if you are getting extrapolation errors, have a look at waitForTransform
and this tutorial or tf::MessageFilter
.