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

As mentioned in the error message "If you have a seperate thread servicing tf messages, call setUsingDedicatedThread(true) on your Buffer instance." This will allow your queries to succeed.

Since you are manually populating the data you should be setting usingDedicatedThread(true). This is a protection that allows tf to error instead of always timing out after the full timeout in a single threaded process.

You are correct that here and here the return of canTransform is not used. This is because the only function there is to do the timeout, without generating any error messages (which is much less computationally intensive.) After the timeout has passed, lookupTransform will requery and either generate the result or produce the error message.

It is possible to implement a fully parallel path for the non-timeout methods, but at the higher level to decrease code complexity the non-timeout methods simply call the timeout methods with zero timeout. The ability to do query without timeouts was never a design goal from a use case but was a requirement of separating the core library from the ROS interface which abstracts time.