Skip to content

Conversation

mini-1235
Copy link
Contributor


Basic Info

Info Please fill out this column
Ticket(s) this addresses #5414 (comment)
Primary OS tested on Ubuntu
Robotic platform tested on
Does this PR contain AI generated software? No
Was this PR description generated by AI software? Out of respect for maintainers, AI for human-to-human communications are banned

Description of contribution in a few bullet points

  • Fix pose timestamp when using transformPoseInTargetFrame

Description of documentation updates required from your changes

Description of how this change was tested


Future work that may be required in bullet points

For Maintainers:

  • Check that any new parameters added are updated in docs.nav2.org
  • Check that any significant change is added to the migration guide
  • Check that any new features OR changes to existing behaviors are reflected in the tuning guide
  • Check that any new functions have Doxygen added
  • Check that any new features have test coverage
  • Check that any new plugins is added to the plugins page
  • If BT Node, Additionally: add to BT's XML index of nodes for groot, BT package's readme table, and BT library lists
  • Should this be backported to current distributions? If so, tag with backport-*.

@mini-1235
Copy link
Contributor Author

I audited other uses of transformPoseInTargetFrame and while not always as synchronized as I would like (some just set to now() or leave as zero), I don't see any immediate issues. Though, perhaps not a bad idea to fix all of those which we're at it to be synchronized with a real timestamp.

@SteveMacenski I went through all the usages of transformPoseIntargetFrame and I think we only need to modify

  • Controller server
  • DWB: now aligns with rpp, mppi, and graceful
  • Route server

I did not modify others like this one

geometry_msgs::msg::PoseStamped goal_pose;
if (!nav2_util::transformPoseInTargetFrame(
goal->pose, goal_pose, *feedback_utils_.tf, feedback_utils_.global_frame,
feedback_utils_.transform_tolerance))

as I think it has more to do with the "input" side(although we can use the current pose's timestamp)

Please share your thoughts, and let me know if I missed something

Signed-off-by: mini-1235 <[email protected]>
@mini-1235
Copy link
Contributor Author

Ok, I think I know why CI was failing in my first commit,
https://github.com/mini-1235/navigation2/blob/5a3e36852fbfb9da79c9d8dac32aacf5d7838334/nav2_dwb_controller/dwb_core/src/dwb_local_planner.cpp#L537-L542
In dwb we are trying to transform from map to odom, while in other controllers we transform from map to base_link

Copy link

codecov bot commented Aug 29, 2025

Codecov Report

❌ Patch coverage is 91.66667% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
..._dwb_controller/dwb_core/src/dwb_local_planner.cpp 88.88% 1 Missing ⚠️
Files with missing lines Coverage Δ
nav2_controller/src/controller_server.cpp 84.86% <100.00%> (+0.03%) ⬆️
nav2_route/src/goal_intent_extractor.cpp 95.80% <100.00%> (+0.05%) ⬆️
..._dwb_controller/dwb_core/src/dwb_local_planner.cpp 81.45% <88.88%> (+0.04%) ⬆️

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Co-authored-by: Steve Macenski <[email protected]>
Signed-off-by: mini-1235 <[email protected]>
@SteveMacenski SteveMacenski merged commit 491433a into ros-navigation:main Sep 4, 2025
18 checks passed
@SteveMacenski
Copy link
Member

@mini-1235 thanks for the follow up!

armgits pushed a commit to armgits/navigation2 that referenced this pull request Sep 5, 2025
…ion#5499)

* Fix pose timestamp when using transformPoseInTargetFrame

Signed-off-by: mini-1235 <[email protected]>

* Fix frame

Signed-off-by: mini-1235 <[email protected]>

* Update nav2_route/src/goal_intent_extractor.cpp

Co-authored-by: Steve Macenski <[email protected]>
Signed-off-by: mini-1235 <[email protected]>

---------

Signed-off-by: mini-1235 <[email protected]>
Co-authored-by: Steve Macenski <[email protected]>
armgits pushed a commit to armgits/navigation2 that referenced this pull request Sep 5, 2025
…ion#5499)

* Fix pose timestamp when using transformPoseInTargetFrame

Signed-off-by: mini-1235 <[email protected]>

* Fix frame

Signed-off-by: mini-1235 <[email protected]>

* Update nav2_route/src/goal_intent_extractor.cpp

Co-authored-by: Steve Macenski <[email protected]>
Signed-off-by: mini-1235 <[email protected]>

---------

Signed-off-by: mini-1235 <[email protected]>
Co-authored-by: Steve Macenski <[email protected]>
Signed-off-by: Abhishekh Reddy <[email protected]>
@mini-1235 mini-1235 deleted the fix/timestamp branch September 5, 2025 20:08
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