Skip to content

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

Open
mergify[bot] wants to merge 2 commits intohumblefrom
mergify/bp/humble/pr-896
Open

Fix misleading extrapolation time in buffer_core (#832) (backport #896)#899
mergify[bot] wants to merge 2 commits intohumblefrom
mergify/bp/humble/pr-896

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Mar 18, 2026

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


This is an automatic backport of pull request #896 done by Mergify.

@ahcorde
Copy link
Contributor

ahcorde commented Mar 18, 2026

Pulls: #899
Gist: https://gist.githubusercontent.com/ahcorde/31bed31c844555d7e425aee6faff29d6/raw/0b4a42679888c861c7f52263262809634ea6913e/ros2.repos
BUILD args: --packages-above-and-dependencies tf2
TEST args: --packages-above tf2
ROS Distro: humble
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/18548

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

Copy link
Contributor

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

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

@selimrecep Do you mind to review backport code in Humble? it's not compiling

@selimrecep
Copy link
Contributor

selimrecep commented Mar 18, 2026

Issue seems to be using extrapolation_error_code variable which seems to be defined in later versions of geometry2, which seems to be fetched through ... / gather() / cache->getData() , instead of changing underlying error code detection I recommend going along with the way humble returns the error code in case of an extrapolation. Just returning tf2::TF2Error::TF2_EXTRAPOLATION_ERROR should be enough

Despite I don't have a setup for "humble" yet, I will push a small change that should fix the issue

@selimrecep
Copy link
Contributor

#900 should fix this issue

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.

2 participants