Skip to content

fix nav_to_pose planning every iteration#6029

Merged
SteveMacenski merged 1 commit intoros-navigation:mainfrom
adivardi:av/fix_nav_to_pose
Mar 16, 2026
Merged

fix nav_to_pose planning every iteration#6029
SteveMacenski merged 1 commit intoros-navigation:mainfrom
adivardi:av/fix_nav_to_pose

Conversation

@adivardi
Copy link
Copy Markdown
Contributor

@adivardi adivardi commented Mar 12, 2026

Basic Info

Info Please fill out this column
Ticket(s) this addresses -
Primary OS tested on Ubuntu
Robotic platform tested on simulation
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

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

Description of documentation updates required from your changes

none

Description of how this change was tested

Test in simulation.
Without this fix, the BT replans every tick of the RateController while the goal is far away.
With the fix, it should not only replan iff the conditions above are verified


Future work that may be required in bullet points

I am not using any of the other demo BTs, so I didn't check if any modifications to them are needed

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

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>
@adivardi adivardi force-pushed the av/fix_nav_to_pose branch from 859505c to b622578 Compare March 12, 2026 13:10
Copy link
Copy Markdown
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.

@mini-1235 can you review, since this was your recent project?

Copy link
Copy Markdown
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 catching this! I think I misunderstood the original intent of this Behavior Tree in the previous PR

@SteveMacenski SteveMacenski merged commit b7f5bfa into ros-navigation:main Mar 16, 2026
16 of 17 checks passed
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.

3 participants