Skip to content

Stop replanning when near the goal if path is valid#5876

Merged
SteveMacenski merged 6 commits intoros-navigation:mainfrom
mini-1235:feat/bt_xml_update
Feb 19, 2026
Merged

Stop replanning when near the goal if path is valid#5876
SteveMacenski merged 6 commits intoros-navigation:mainfrom
mini-1235:feat/bt_xml_update

Conversation

@mini-1235
Copy link
Collaborator

@mini-1235 mini-1235 commented Jan 16, 2026


Basic Info

Info Please fill out this column
Ticket(s) this addresses Fixes #4003
Primary OS tested on Ubuntu
Robotic platform tested on Tb4
Does this PR contain AI generated software? (No; Yes and it is marked inline in the code)
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

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

Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>
@mini-1235
Copy link
Collaborator Author

I am planning to update the detailed behavior walkthrough, which requires generating the behavior tree via the script. I will open the docs PR once this one is approved

@codecov
Copy link

codecov bot commented Jan 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
...tree/plugins/action/truncate_path_local_action.cpp 100.00% <100.00%> (ø)

... and 15 files with indirect coverage changes

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

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.

Otherwise, approved :-)

@mini-1235
Copy link
Collaborator Author

Perhaps also: https://github.com/ros-navigation/navigation2/blob/83f344b115b2d40c0b326c970e0e871c38d18e6a/nav2_bt_navigator/behavior_trees/nav_to_pose_with_consistent_replanning_and_if_path_becomes_invalid.xml

I think the purpose of this demo is to stop replanning when the path is valid (regardless of whether the robot is near the goal), so I didn't update this demo

@SteveMacenski
Copy link
Member

I think the purpose of this demo is to stop replanning when the path is valid (regardless of whether the robot is near the goal), so I didn't update this demo

It has a timer to replan occasionally. That occasionally could happen when approaching the goal. If the path is still valid, I would like it not to regardless of the timer

@mini-1235
Copy link
Collaborator Author

I am going to hold this PR so that we can get ros-navigation/docs.nav2.org#854 merged in first

@mini-1235
Copy link
Collaborator Author

I will do the docs PR tomorrow, not feeling well today 🤒

Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>
Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>
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.

Plz just confirm that you tested this to work properly for me :-) Then I'll merge

@mini-1235
Copy link
Collaborator Author

Yes, I confirm that I have tested it :)

@SteveMacenski SteveMacenski merged commit c139fb7 into ros-navigation:main Feb 19, 2026
17 checks passed
Pana1v pushed a commit to Arnav-panjla/navigation2 that referenced this pull request Feb 21, 2026
)

* Stop replanning when near the goal if path is valid

Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>

* Update bts

Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>

* Update proximity threshold

Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>

* Set distance forward to -1

Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>

---------

Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>
Signed-off-by: panav <panav@10xconstruction.com>
Pana1v pushed a commit to Arnav-panjla/navigation2 that referenced this pull request Feb 21, 2026
)

* Stop replanning when near the goal if path is valid

Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>

* Update bts

Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>

* Update proximity threshold

Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>

* Set distance forward to -1

Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>

---------

Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>
Signed-off-by: panav <panav@10xconstruction.com>
Pana1v pushed a commit to Arnav-panjla/navigation2 that referenced this pull request Feb 21, 2026
)

* Stop replanning when near the goal if path is valid

Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>

* Update bts

Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>

* Update proximity threshold

Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>

* Set distance forward to -1

Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>

---------

Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>
Pana1v pushed a commit to Arnav-panjla/navigation2 that referenced this pull request Feb 22, 2026
)

* Stop replanning when near the goal if path is valid

Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>

* Update bts

Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>

* Update proximity threshold

Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>

* Set distance forward to -1

Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>

---------

Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>
Signed-off-by: panav <panav@10xconstruction.com>
Pana1v pushed a commit to Arnav-panjla/navigation2 that referenced this pull request Feb 22, 2026
)

* Stop replanning when near the goal if path is valid

Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>

* Update bts

Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>

* Update proximity threshold

Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>

* Set distance forward to -1

Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>

---------

Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>
Signed-off-by: panav <panav@10xconstruction.com>
Signed-off-by: Maurice <mauricepurnawan@gmail.com>
EricoMeger pushed a commit to EricoMeger/navigation2 that referenced this pull request Feb 22, 2026
)

* Stop replanning when near the goal if path is valid

Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>

* Update bts

Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>

* Update proximity threshold

Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>

* Set distance forward to -1

Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>

---------

Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>
adivardi added a commit to adivardi/navigation2 that referenced this pull request Mar 12, 2026
PR ros-navigation#5876 added `IsGoalNearby` condition to the sequence.
However, when to goal is far, this action is Always Failure => always trigger the Fallback and planning

Changed logic to replan if:
- path is invalid - always
- goal updated - always
- IsGoalNearby AND timer expired
adivardi added a commit to adivardi/navigation2 that referenced this pull request Mar 12, 2026
PR ros-navigation#5876 added `IsGoalNearby` condition to the sequence.
However, when to goal is far, this action is Always Failure => always trigger the Fallback and planning

Changed logic to replan if:
- path is invalid - always
- goal updated - always
- IsGoalNearby AND timer expired

Signed-off-by: Adi Vardi <adi.vardi@enway.ai>
SteveMacenski pushed a commit that referenced this pull request Mar 16, 2026
PR #5876 added `IsGoalNearby` condition to the sequence.
However, when to goal is far, this action is Always Failure => always trigger the Fallback and planning

Changed logic to replan if:
- path is invalid - always
- goal updated - always
- IsGoalNearby AND timer expired

Signed-off-by: Adi Vardi <adi.vardi@enway.ai>
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.

BT XML Idea: Stop replanning when near the goal if path is valid

2 participants