ros2 / ros2/geometry2

Provide a way to timeout waiting for transforms that doesn't block the executor when looking up transforms.

Open
#327 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted
Dominant language
C++
Stars
153
Forks
256
Avg merge
3d 23h
Merged PRs (30d)
14

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in tf2_ros_py/tf2_ros/buffer_client.py around the time.sleep call at line 236, then review rclpy timer.Rate and SingleThreadedExecutor behavior described in #443. Determine whether a callback or awaitable can provide the timeout without blocking the executor; done means transform waiting times out safely from a callback.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
robotics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.