ros2 / ros2/geometry2

Unexpected output of _chainAsVector()

Open
#749 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

more-information-needed
Dominant language
C++
Stars
153
Forks
256
Avg merge
3d 23h
Merged PRs (30d)
14

Description

Bug report / Missing functionality

Required Info:

  • Operating System:
    • OpenSUSE 15.5
  • Installation type:
    • binaries
  • Version or commit hash:
    • Humble
  • DDS implementation:
    • N/A
  • Client library (if applicable):
    • rclpy
Explanation

In tf2 for ros1 there existed a function to retrieve the chain of two frames as a list of strings. Now migrating to ros2, we need the functionality of this function. The corresponding function of tf2 for ros2 is here:
https://github.com/ros2/geometry2/blob/c3cafef9fd1f87ef467fd14e1d36e4a6aac51bad/tf2/src/buffer_core.cpp#L1549-L1631

However, it is now not wrapped as a listener function but can only be accessed via the private member function buffer._chain(). The bigger problem is that the implementation seems erroneous. Consider this simple tf tree:

   A
 /   \
B     D
|
C

Querying _chainAsVector(target_frame=D, source_frame=C, fixed_frame=A) (regardless of the time), yields the chain ['C', 'B'] and not as expected ['C', 'B', 'A', 'D'].

Does anyone have an idea why it is like this?

And also why the implementation changed from ros1 tf2 to ros2 tf2 (compare upper links) while the previous implementation worked just fine?

Is there a similar function that I don't know of that can achieve the same thing (python)?

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 with tf2/src/buffer_core.cpp and the _chainAsVector() implementation linked in the issue, then compare it with the referenced ROS 1 buffer_core.cpp implementation. Reproduce the A-B-C/D tree case and verify whether the returned chain includes ['C', 'B', 'A', 'D']; also check how the function is exposed through the Python listener API.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
robotics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.