Skip to content

Conversation

@tonynajjar
Copy link
Contributor

@tonynajjar tonynajjar commented Aug 27, 2025


Basic Info

Info Please fill out this column
Ticket(s) this addresses (add tickets here #1)
Primary OS tested on (Ubuntu, MacOS, Windows)
Robotic platform tested on (Steve's Robot, gazebo simulation of Tally, hardware turtlebot)
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

Story:

1- I turned on MPPI's enforce_path_inversion and noticed that the pruned path was flake-ly being cut short to one of the poses that were used to generate the global plan with computePlanThroughPoses
2- I put my investigation hat and found out that in MPPI's findFirstPathInversion, the dot_product was sometimes -0.0000000(peanuts) -> negative -> path inversion. Turns out points in points OAB, B was sometimes very slightly before A so the vector was pointing in the other direction.
3- Looking into the planner server, computePlanThroughPoses does start the concatenated path exactly where the first one ends and thus this PR.

I think I experienced a similar issue in the past with RPP but can't find the conversation


Description of contribution in a few bullet points

  • Change computePlanThroughPoses to skip the first pose of the paths to concatenate

Description of documentation updates required from your changes

Description of how this change was tested

No more early false positive inversion points


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: Tony Najjar <[email protected]>
@codecov
Copy link

codecov bot commented Aug 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
nav2_planner/src/planner_server.cpp 92.92% <100.00%> (+0.06%) ⬆️

... and 8 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: Tony Najjar <[email protected]>
@SteveMacenski SteveMacenski merged commit c057c95 into ros-navigation:main Aug 27, 2025
17 of 18 checks passed
bkoensgen pushed a commit to bkoensgen/navigation2 that referenced this pull request Aug 29, 2025
* fix-duplicate-poses

Signed-off-by: Tony Najjar <[email protected]>

* Update nav2_planner/src/planner_server.cpp

Co-authored-by: Steve Macenski <[email protected]>
Signed-off-by: Tony Najjar <[email protected]>

---------

Signed-off-by: Tony Najjar <[email protected]>
Co-authored-by: Steve Macenski <[email protected]>
armgits pushed a commit to armgits/navigation2 that referenced this pull request Sep 5, 2025
* fix-duplicate-poses

Signed-off-by: Tony Najjar <[email protected]>

* Update nav2_planner/src/planner_server.cpp

Co-authored-by: Steve Macenski <[email protected]>
Signed-off-by: Tony Najjar <[email protected]>

---------

Signed-off-by: Tony Najjar <[email protected]>
Co-authored-by: Steve Macenski <[email protected]>
armgits pushed a commit to armgits/navigation2 that referenced this pull request Sep 5, 2025
* fix-duplicate-poses

Signed-off-by: Tony Najjar <[email protected]>

* Update nav2_planner/src/planner_server.cpp

Co-authored-by: Steve Macenski <[email protected]>
Signed-off-by: Tony Najjar <[email protected]>

---------

Signed-off-by: Tony Najjar <[email protected]>
Co-authored-by: Steve Macenski <[email protected]>
Signed-off-by: Abhishekh Reddy <[email protected]>
silanus23 pushed a commit to silanus23/navigation2 that referenced this pull request Sep 18, 2025
* fix-duplicate-poses

Signed-off-by: Tony Najjar <[email protected]>

* Update nav2_planner/src/planner_server.cpp

Co-authored-by: Steve Macenski <[email protected]>
Signed-off-by: Tony Najjar <[email protected]>

---------

Signed-off-by: Tony Najjar <[email protected]>
Co-authored-by: Steve Macenski <[email protected]>
SteveMacenski added a commit that referenced this pull request Sep 19, 2025
* fix-duplicate-poses

Signed-off-by: Tony Najjar <[email protected]>

* Update nav2_planner/src/planner_server.cpp

Co-authored-by: Steve Macenski <[email protected]>
Signed-off-by: Tony Najjar <[email protected]>

---------

Signed-off-by: Tony Najjar <[email protected]>
Co-authored-by: Steve Macenski <[email protected]>
SteveMacenski added a commit that referenced this pull request Sep 19, 2025
* fix-duplicate-poses

Signed-off-by: Tony Najjar <[email protected]>

* Update nav2_planner/src/planner_server.cpp

Co-authored-by: Steve Macenski <[email protected]>
Signed-off-by: Tony Najjar <[email protected]>

---------

Signed-off-by: Tony Najjar <[email protected]>
Co-authored-by: Steve Macenski <[email protected]>
SteveMacenski added a commit that referenced this pull request Sep 20, 2025
* Fix dynamic param SmacPlannerLattice  (#5478)

* Fix SmacPlannerLattice dynamic parameter early exit

Signed-off-by: Tony Najjar <[email protected]>

* remove comment

Signed-off-by: Tony Najjar <[email protected]>

---------

Signed-off-by: Tony Najjar <[email protected]>

* Fix duplicate poses with computePlanThroughPoses (#5488)

* fix-duplicate-poses

Signed-off-by: Tony Najjar <[email protected]>

* Update nav2_planner/src/planner_server.cpp

Co-authored-by: Steve Macenski <[email protected]>
Signed-off-by: Tony Najjar <[email protected]>

---------

Signed-off-by: Tony Najjar <[email protected]>
Co-authored-by: Steve Macenski <[email protected]>

* Fix seg fault (#5501)

* Fix segmentation fault

Signed-off-by: Tony Najjar <[email protected]>

* fix linting

Signed-off-by: Tony Najjar <[email protected]>

---------

Signed-off-by: Tony Najjar <[email protected]>

* Add a service for enabling/disabling the collision monitor (#5493)

* Added std_srvs package to dependencies

Signed-off-by: Abhishekh Reddy <[email protected]>

* Declared service and callback for enabling/disabling collision monitor

Signed-off-by: Abhishekh Reddy <[email protected]>

* Declared a variable to store collision monitor enable/disable state

Signed-off-by: Abhishekh Reddy <[email protected]>

* Added initialization for collision monitor enable/disable service

Signed-off-by: Abhishekh Reddy <[email protected]>

* Implemented service callback for collision monitor enable/disable service

Signed-off-by: Abhishekh Reddy <[email protected]>

* Removed std_srvs package dependency

Signed-off-by: Abhishekh Reddy <[email protected]>

* Added Toggle interface

Signed-off-by: Abhishekh Reddy <[email protected]>

* Replaced Trigger interface with the new Toggle interface

Signed-off-by: Abhishekh Reddy <[email protected]>

* Added default initialization for enabled flag

Signed-off-by: Abhishekh Reddy <[email protected]>

* Fixed toggle service name

Signed-off-by: Abhishekh Reddy <[email protected]>

* Updated toggle logic for collision monitor

Signed-off-by: Abhishekh Reddy <[email protected]>

* Added a new line at the end of file

Signed-off-by: Abhishekh Reddy <[email protected]>

* Update nav2_collision_monitor/src/collision_monitor_node.cpp

Co-authored-by: Steve Macenski <[email protected]>
Signed-off-by: Abhishekh Reddy <[email protected]>

* Update nav2_collision_monitor/src/collision_monitor_node.cpp

Co-authored-by: Steve Macenski <[email protected]>
Signed-off-by: Abhishekh Reddy <[email protected]>

* Added enabled check for logging

Signed-off-by: Abhishekh Reddy <[email protected]>

* Added a unit test for toggle service

Signed-off-by: Abhishekh Reddy <[email protected]>

* Made the getter const and added a comment

Signed-off-by: Abhishekh Reddy <[email protected]>

* Replaced rclcpp::spin_some

Signed-off-by: Abhishekh Reddy <[email protected]>

---------

Signed-off-by: Abhishekh Reddy <[email protected]>
Co-authored-by: Steve Macenski <[email protected]>

* bump Jazzy to 1.3.9 for release

Signed-off-by: SteveMacenski <[email protected]>

* Change service type for collision monitor

Signed-off-by: Steve Macenski <[email protected]>

* Fix backport error

Signed-off-by: SteveMacenski <[email protected]>

* update

Signed-off-by: SteveMacenski <[email protected]>

---------

Signed-off-by: Tony Najjar <[email protected]>
Signed-off-by: Abhishekh Reddy <[email protected]>
Signed-off-by: SteveMacenski <[email protected]>
Signed-off-by: Steve Macenski <[email protected]>
Co-authored-by: Tony Najjar <[email protected]>
Co-authored-by: Abhishekh Reddy <[email protected]>
SteveMacenski added a commit that referenced this pull request Sep 20, 2025
* Return early from edge interpolation for zero-length edges (#5453)

* Return early from edge interpolation for zero-length edges

Signed-off-by: Emerson Knapp <[email protected]>

* Move the check and add a test

Signed-off-by: Emerson Knapp <[email protected]>

---------

Signed-off-by: Emerson Knapp <[email protected]>

* nav2_route vizualization marker rendering performance improvement (#5452)

* nav2_route vizualization marker use sphere_list and line_list for rendering performance

Signed-off-by: Emerson Knapp <[email protected]>

* Fix unit test and break out magic constants into named values

Signed-off-by: Emerson Knapp <[email protected]>

---------

Signed-off-by: Emerson Knapp <[email protected]>

* Fix dynamic param SmacPlannerLattice  (#5478)

* Fix SmacPlannerLattice dynamic parameter early exit

Signed-off-by: Tony Najjar <[email protected]>

* remove comment

Signed-off-by: Tony Najjar <[email protected]>

---------

Signed-off-by: Tony Najjar <[email protected]>

* Fix duplicate poses with computePlanThroughPoses (#5488)

* fix-duplicate-poses

Signed-off-by: Tony Najjar <[email protected]>

* Update nav2_planner/src/planner_server.cpp

Co-authored-by: Steve Macenski <[email protected]>
Signed-off-by: Tony Najjar <[email protected]>

---------

Signed-off-by: Tony Najjar <[email protected]>
Co-authored-by: Steve Macenski <[email protected]>

* Fix seg fault (#5501)

* Fix segmentation fault

Signed-off-by: Tony Najjar <[email protected]>

* fix linting

Signed-off-by: Tony Najjar <[email protected]>

---------

Signed-off-by: Tony Najjar <[email protected]>

* Route graph vis fixes: Fixes regressions from #5452 (#5507)

* Fixes for route graph

Signed-off-by: SteveMacenski <[email protected]>

* Fix route graph vis

Signed-off-by: SteveMacenski <[email protected]>

---------

Signed-off-by: SteveMacenski <[email protected]>

* Removing openMP dep on MPPI (#5506)

Signed-off-by: SteveMacenski <[email protected]>

* Add debug topic to visualize whether MPPI critic has an effect on costs (#5485)

* Publish criticsStats

Signed-off-by: Tony Najjar <[email protected]>

* linting

Signed-off-by: Tony Najjar <[email protected]>

* change header to stamp

Signed-off-by: Tony Najjar <[email protected]>

* make unique_pointer

Signed-off-by: Tony Najjar <[email protected]>

* typo

Signed-off-by: Tony Najjar <[email protected]>

* Add readme

Signed-off-by: Tony Najjar <[email protected]>

* add to readme

Signed-off-by: Tony Najjar <[email protected]>

* fixes

Signed-off-by: Tony Najjar <[email protected]>

---------

Signed-off-by: Tony Najjar <[email protected]>

* fix(nav2_theta_star_planner): Correct typo in CMakeLists ament_export_dependencies (#5514)

Signed-off-by: JPLDevMaster <[email protected]>

* Fix/dependency and header (#5520)

* Add missing dependency declaration

Signed-off-by: Sushant Chavan <[email protected]>

* Remove unused header

Signed-off-by: Sushant Chavan <[email protected]>

---------

Signed-off-by: Sushant Chavan <[email protected]>

* bump to 1.4.2 for kilted release

Signed-off-by: SteveMacenski <[email protected]>

* Adding critic manager for refactor

Signed-off-by: SteveMacenski <[email protected]>

* Update API refactor

Signed-off-by: SteveMacenski <[email protected]>

* API updates

Signed-off-by: SteveMacenski <[email protected]>

* Fix formatting issues in critic_manager.hpp

Signed-off-by: Steve Macenski <[email protected]>

---------

Signed-off-by: Emerson Knapp <[email protected]>
Signed-off-by: Tony Najjar <[email protected]>
Signed-off-by: SteveMacenski <[email protected]>
Signed-off-by: JPLDevMaster <[email protected]>
Signed-off-by: Sushant Chavan <[email protected]>
Signed-off-by: Steve Macenski <[email protected]>
Co-authored-by: Emerson Knapp <[email protected]>
Co-authored-by: Tony Najjar <[email protected]>
Co-authored-by: João Penha Lopes <[email protected]>
Co-authored-by: Sushant Chavan <[email protected]>
BCKSELFDRIVEWORLD pushed a commit to BCKSELFDRIVEWORLD/navigation2 that referenced this pull request Sep 23, 2025
* fix-duplicate-poses

Signed-off-by: Tony Najjar <[email protected]>

* Update nav2_planner/src/planner_server.cpp

Co-authored-by: Steve Macenski <[email protected]>
Signed-off-by: Tony Najjar <[email protected]>

---------

Signed-off-by: Tony Najjar <[email protected]>
Co-authored-by: Steve Macenski <[email protected]>
RBT22 pushed a commit to EnjoyRobotics/navigation2 that referenced this pull request Oct 28, 2025
* Fix dynamic param SmacPlannerLattice  (ros-navigation#5478)

* Fix SmacPlannerLattice dynamic parameter early exit

Signed-off-by: Tony Najjar <[email protected]>

* remove comment

Signed-off-by: Tony Najjar <[email protected]>

---------

Signed-off-by: Tony Najjar <[email protected]>

* Fix duplicate poses with computePlanThroughPoses (ros-navigation#5488)

* fix-duplicate-poses

Signed-off-by: Tony Najjar <[email protected]>

* Update nav2_planner/src/planner_server.cpp

Co-authored-by: Steve Macenski <[email protected]>
Signed-off-by: Tony Najjar <[email protected]>

---------

Signed-off-by: Tony Najjar <[email protected]>
Co-authored-by: Steve Macenski <[email protected]>

* Fix seg fault (ros-navigation#5501)

* Fix segmentation fault

Signed-off-by: Tony Najjar <[email protected]>

* fix linting

Signed-off-by: Tony Najjar <[email protected]>

---------

Signed-off-by: Tony Najjar <[email protected]>

* Add a service for enabling/disabling the collision monitor (ros-navigation#5493)

* Added std_srvs package to dependencies

Signed-off-by: Abhishekh Reddy <[email protected]>

* Declared service and callback for enabling/disabling collision monitor

Signed-off-by: Abhishekh Reddy <[email protected]>

* Declared a variable to store collision monitor enable/disable state

Signed-off-by: Abhishekh Reddy <[email protected]>

* Added initialization for collision monitor enable/disable service

Signed-off-by: Abhishekh Reddy <[email protected]>

* Implemented service callback for collision monitor enable/disable service

Signed-off-by: Abhishekh Reddy <[email protected]>

* Removed std_srvs package dependency

Signed-off-by: Abhishekh Reddy <[email protected]>

* Added Toggle interface

Signed-off-by: Abhishekh Reddy <[email protected]>

* Replaced Trigger interface with the new Toggle interface

Signed-off-by: Abhishekh Reddy <[email protected]>

* Added default initialization for enabled flag

Signed-off-by: Abhishekh Reddy <[email protected]>

* Fixed toggle service name

Signed-off-by: Abhishekh Reddy <[email protected]>

* Updated toggle logic for collision monitor

Signed-off-by: Abhishekh Reddy <[email protected]>

* Added a new line at the end of file

Signed-off-by: Abhishekh Reddy <[email protected]>

* Update nav2_collision_monitor/src/collision_monitor_node.cpp

Co-authored-by: Steve Macenski <[email protected]>
Signed-off-by: Abhishekh Reddy <[email protected]>

* Update nav2_collision_monitor/src/collision_monitor_node.cpp

Co-authored-by: Steve Macenski <[email protected]>
Signed-off-by: Abhishekh Reddy <[email protected]>

* Added enabled check for logging

Signed-off-by: Abhishekh Reddy <[email protected]>

* Added a unit test for toggle service

Signed-off-by: Abhishekh Reddy <[email protected]>

* Made the getter const and added a comment

Signed-off-by: Abhishekh Reddy <[email protected]>

* Replaced rclcpp::spin_some

Signed-off-by: Abhishekh Reddy <[email protected]>

---------

Signed-off-by: Abhishekh Reddy <[email protected]>
Co-authored-by: Steve Macenski <[email protected]>

* bump Jazzy to 1.3.9 for release

Signed-off-by: SteveMacenski <[email protected]>

* Change service type for collision monitor

Signed-off-by: Steve Macenski <[email protected]>

* Fix backport error

Signed-off-by: SteveMacenski <[email protected]>

* update

Signed-off-by: SteveMacenski <[email protected]>

---------

Signed-off-by: Tony Najjar <[email protected]>
Signed-off-by: Abhishekh Reddy <[email protected]>
Signed-off-by: SteveMacenski <[email protected]>
Signed-off-by: Steve Macenski <[email protected]>
Co-authored-by: Tony Najjar <[email protected]>
Co-authored-by: Abhishekh Reddy <[email protected]>
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