Skip to content

Fix misleading extrapolation time in buffer_core (#832)#896

Merged
ahcorde merged 2 commits intoros2:rollingfrom
selimrecep:832-cantransform-misleading-extrapolation-error
Mar 18, 2026
Merged

Fix misleading extrapolation time in buffer_core (#832)#896
ahcorde merged 2 commits intoros2:rollingfrom
selimrecep:832-cantransform-misleading-extrapolation-error

Conversation

@selimrecep
Copy link
Contributor

Description

This PR fixes the issue where extrapolation errors incorrectly prioritize metadata gathered during the initial source-to-root traversal (Phase 1). By comparing timestamps from both traversal phases, the error now correctly reports the 'latest data' time for the specific link on the requested transform path.

Verification

Reproduced with the script in #832:

  • Before: Reported 10s staleness from unrelated 'map' frame.
  • After: Reports 0.1s staleness for the actual 'odom -> base_link' path.

Fixes #832

@selimrecep
Copy link
Contributor Author

selimrecep commented Feb 23, 2026

IMHO TF2 error detection logic should be more path-aware in general, but I just wanted to focus on this specific bug for now.

@ahcorde ahcorde requested a review from tfoote February 23, 2026 19:25
Copy link
Contributor

@tfoote tfoote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this extra logic. Can you use the issue example to add a test case so that we can validate the error exists and that this fixes it and make sure that this doesn't regress at some point in the future.

The reproduction in the issues should provide most of what you need.

@selimrecep
Copy link
Contributor Author

Done

@ahcorde ahcorde requested a review from tfoote March 17, 2026 20:27
Copy link
Contributor

@tfoote tfoote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the test too. It looks good to me now.

@ahcorde
Copy link
Contributor

ahcorde commented Mar 18, 2026

Pulls: #896
Gist: https://gist.githubusercontent.com/ahcorde/ccf434b60715e64e4abc3e29fe357122/raw/a1dd8e171ed2aa8958932f14ef5aedf09453b878/ros2.repos
BUILD args: --packages-above-and-dependencies tf2
TEST args: --packages-above tf2
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/18540

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@ahcorde ahcorde merged commit 876d31e into ros2:rolling Mar 18, 2026
2 checks passed
@ahcorde
Copy link
Contributor

ahcorde commented Mar 18, 2026

https://github.com/Mergifyio backport kilted jazzy humble

@mergify
Copy link
Contributor

mergify bot commented Mar 18, 2026

backport kilted jazzy humble

✅ Backports have been created

Details

mergify bot pushed a commit that referenced this pull request Mar 18, 2026
mergify bot pushed a commit that referenced this pull request Mar 18, 2026
mergify bot pushed a commit that referenced this pull request Mar 18, 2026
ahcorde pushed a commit that referenced this pull request Mar 18, 2026
(cherry picked from commit 876d31e)

Co-authored-by: Selim Ağırman <16990318+selimrecep@users.noreply.github.com>
ahcorde pushed a commit that referenced this pull request Mar 19, 2026
(cherry picked from commit 876d31e)

Co-authored-by: Selim Ağırman <16990318+selimrecep@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

canTransform reports misleading extrapolation time when multiple parent frames require extrapolation

4 participants