Skip to content

Backport GetCurrentPose, ArePosesNear, and ConcatenatePaths BT nodes for Route Server in Jazzy, and minimal BT for navigation.#5755

Merged
SteveMacenski merged 14 commits intoros-navigation:jazzyfrom
paureverte:jazzy
Dec 5, 2025
Merged

Backport GetCurrentPose, ArePosesNear, and ConcatenatePaths BT nodes for Route Server in Jazzy, and minimal BT for navigation.#5755
SteveMacenski merged 14 commits intoros-navigation:jazzyfrom
paureverte:jazzy

Conversation

@paureverte
Copy link
Contributor


Basic Info

Info Please fill out this column
Ticket(s) this addresses #5754
Primary OS tested on Ubuntu
Robotic platform tested on Gazebo simualtion of Turtlebot-3 and Gazebo simulation of Robotnik's RBVOGUI
Does this PR contain AI generated software? No
Was this PR description generated by AI software? No

Description of contribution in a few bullet points

  • Backported three basic Behavior Tree (BT) nodes into the Jazzy distribution to enable full Route Graph navigation: GetCurrentPose, ArePosesNear, and ConcatenatePaths.

  • Added a minimal example Behavior Tree (nav2_bt_navigator/behavior_trees/nav_to_pose_with_routes.xml) demonstrating the core sequencing required to navigate: From an arbitrary starting point to the route graph, along the route graph and from the route graph exit to an off-route final goal.

Description of documentation updates required from your changes

  • The new minimal BT example should be referenced or included in the Nav2 documentation to show the required sequence for off-route start/goal navigation using the Route Server.

Description of how this change was tested

  • Changes were tested by compiling successfully against the Jazzy distribution.
  • Extensive validation in Gazebo simulation using the Route Server package.
  • Tested with various robot configurations and different route definitions to ensure the minimal BT successfully executes the navigation sequence from off-route start/goal points.

Note: No dedicated unit tests or integration tests have been written yet, only simulation verification of the functionality.


Future work that may be required in bullet points

  • Adding full recovery behaviors and replanning logic to the minimal BT example to match the robustness of the standard navigate_to_pose tree.

  • Writing dedicated unit tests for the new GetCurrentPose, ArePosesNear, and ConcatenatePaths BT nodes.

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-*.

@mergify
Copy link
Contributor

mergify bot commented Dec 4, 2025

@preverte, all pull requests must be targeted towards the main development branch.
Once merged into main, it is possible to backport to @jazzy, but it must be in main
to have these changes reflected into new distributions.

Copy link
Collaborator

@mini-1235 mini-1235 left a comment

Choose a reason for hiding this comment

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

@preverte A few requests to get this merged:

  • Please sign with DCO
  • Please fix the linting
  • Please try to keep it as close to the main branch as possible, and only make changes where absolutely necessary. If you have any improvements to add, please open a PR targeting main first, then we can backport it to Jazzy

Copy link
Member

@SteveMacenski SteveMacenski left a comment

Choose a reason for hiding this comment

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

To add to what @mini-1235 said, where are the tests? Those should be backported too

@paureverte paureverte marked this pull request as draft December 4, 2025 16:07
@paureverte paureverte marked this pull request as ready for review December 4, 2025 17:28
@paureverte paureverte marked this pull request as draft December 4, 2025 17:36
… to Jazzy

Signed-off-by: Pau Reverté <pau.reverte@eurecat.org>
Signed-off-by: Pau Reverté <pau.reverte@eurecat.org>
…ames

Signed-off-by: Pau Reverté <pau.reverte@eurecat.org>
Signed-off-by: Pau Reverté <pau.reverte@eurecat.org>
Signed-off-by: Pau Reverté <pau.reverte@eurecat.org>
Signed-off-by: Pau Reverté <pau.reverte@eurecat.org>
Signed-off-by: Pau Reverté <pau.reverte@eurecat.org>
Signed-off-by: Pau Reverté <pau.reverte@eurecat.org>
Signed-off-by: Pau Reverté <pau.reverte@eurecat.org>
Signed-off-by: Pau Reverté <pau.reverte@eurecat.org>
@codecov
Copy link

codecov bot commented Dec 4, 2025

Codecov Report

❌ Patch coverage is 90.47619% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ree/plugins/condition/are_poses_near_condition.cpp 83.33% 5 Missing ⚠️
...or_tree/plugins/action/get_current_pose_action.cpp 89.47% 2 Missing ⚠️
...r_tree/plugins/action/concatenate_paths_action.cpp 93.75% 1 Missing ⚠️
Files with missing lines Coverage Δ
...r_tree/plugins/action/concatenate_paths_action.hpp 100.00% <100.00%> (ø)
...or_tree/plugins/action/get_current_pose_action.hpp 100.00% <100.00%> (ø)
...ree/plugins/condition/are_poses_near_condition.hpp 100.00% <100.00%> (ø)
...r_tree/plugins/action/concatenate_paths_action.cpp 93.75% <93.75%> (ø)
...or_tree/plugins/action/get_current_pose_action.cpp 89.47% <89.47%> (ø)
...ree/plugins/condition/are_poses_near_condition.cpp 83.33% <83.33%> (ø)

... and 18 files with indirect coverage changes

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

@paureverte paureverte marked this pull request as ready for review December 4, 2025 18:43
@paureverte
Copy link
Contributor Author

@SteveMacenski , @mini-1235 , thank you for the suggestions.

Please, find updated branch with DCO sign, linting fixed and corrections suggested above. Also, test files for new nodes have been included, as well as compute_route server handling for nav2_system_tests testing of BTs in nav2_bt_navigator

@mini-1235
Copy link
Collaborator

I will review tomorrow

Copy link
Collaborator

@mini-1235 mini-1235 left a comment

Choose a reason for hiding this comment

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

I still see quite a few differences after the latest update. Please, please keep this 1:1 with the main branch so it's easier to review and maintain for future backports. We would really appreciate any improvements added to the main branch first, once merged, we can backport them to Jazzy

…ch structure

Signed-off-by: Pau Reverté <pau.reverte@eurecat.org>
…g this tree, back to original

Signed-off-by: Pau Reverté <pau.reverte@eurecat.org>
@paureverte
Copy link
Contributor Author

@mini-1235 , I updated the code to be as close as possible with main branch.

Regarding the BT xml, I just deleted it as it is not part of the backport just like you mentioned, maybe I will add it as some new feature in the main branch.

Signed-off-by: Pau Reverté <pau.reverte@eurecat.org>
Signed-off-by: Pau Reverté <pau.reverte@eurecat.org>
Copy link
Collaborator

@mini-1235 mini-1235 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 reiterating

@SteveMacenski SteveMacenski merged commit 7f52e04 into ros-navigation:jazzy Dec 5, 2025
11 checks passed
redvinaa pushed a commit to EnjoyRobotics/navigation2 that referenced this pull request Mar 2, 2026
…for Route Server in Jazzy, and minimal BT for navigation. (ros-navigation#5755)

* Backported GetCurrentPose, ConcatenatePaths and ArePosesNear BT nodes to Jazzy

Signed-off-by: Pau Reverté <pau.reverte@eurecat.org>

* Created minimum BT for navigation using RouteServer, without replanning

Signed-off-by: Pau Reverté <pau.reverte@eurecat.org>

* GetCurrentPose and ArePosesNear use deconflictPortAndParamFile for frames

Signed-off-by: Pau Reverté <pau.reverte@eurecat.org>

* Apply cpplint and uncrustify formatting corrections for new BT nodes

Signed-off-by: Pau Reverté <pau.reverte@eurecat.org>

* Original copyright

Signed-off-by: Pau Reverté <pau.reverte@eurecat.org>

* Added test for GetCurrentPose, ConcatenatePaths and ArePosesNear

Signed-off-by: Pau Reverté <pau.reverte@eurecat.org>

* Correct copyright for GetCurrentPose

Signed-off-by: Pau Reverté <pau.reverte@eurecat.org>

* GetCurrentPose heritages from BT::ActionNodeBase

Signed-off-by: Pau Reverté <pau.reverte@eurecat.org>

* ArePosesNear uses isStatusActive

Signed-off-by: Pau Reverté <pau.reverte@eurecat.org>

* Added route_server to server_handler for BT test in building

Signed-off-by: Pau Reverté <pau.reverte@eurecat.org>

* GetCurrentPose, ArePosesNear and ConcatenatePaths closer to main branch structure

Signed-off-by: Pau Reverté <pau.reverte@eurecat.org>

* Removed new BT with routes and nav2_system_tests additions for testing this tree, back to original

Signed-off-by: Pau Reverté <pau.reverte@eurecat.org>

* Removed override of halt function for get_current_pose_action.cpp

Signed-off-by: Pau Reverté <pau.reverte@eurecat.org>

* Removed default values for input ports of GetCurrentPose

Signed-off-by: Pau Reverté <pau.reverte@eurecat.org>

---------

Signed-off-by: Pau Reverté <pau.reverte@eurecat.org>
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.

Missing BT Nodes Impede Route Graph Navigation from Off-Route Start/Goal in Jazzy

3 participants