geometry2
geometry2 copied to clipboard
Provide a way to timeout waiting for transforms that doesn't block the executor when looking up transforms.
We can not call the sleep method from timer.Rate object in a callback in a SingleThreadedExecutor as indicated in #443
An executor must be serving the timer, so may block if called in a callback in a SingleThreadedExecutor
As a result we can not initialize a Rate object and use the sleep method in place of time.sleep currently used as follows.
https://github.com/ros2/geometry2/blob/4a5001230cc74aa8674ab88f6a1e5e2f76bdd5c2/tf2_ros_py/tf2_ros/buffer_client.py#L236
Implementation considerations
Need an implementation that does not block the executor. Possible paths to consider are a callback when transforms are ready or the use of awaitables.