Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nav2_smac_planner: handle corner case where start and goal are on the same cell #4793

Conversation

DylanDeCoeyer-Quimesis
Copy link
Contributor

@DylanDeCoeyer-Quimesis DylanDeCoeyer-Quimesis commented Dec 12, 2024

This case was already properly handled in the smac_planner_2d (since PR #2488), but it was still leading to an A* backtrace failure in the smac_planner_hybrid and smac_planner_lattice. Let's harmonize the handling of this case.


Basic Info

Info Please fill out this column
Ticket(s) this addresses #4792
Primary OS tested on Ubuntu
Robotic platform tested on
Does this PR contain AI generated software? No

Description of contribution in a few bullet points

Description of documentation updates required from your changes


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

@DylanDeCoeyer-Quimesis DylanDeCoeyer-Quimesis force-pushed the fix_smac_planner_backtrace_failure branch 5 times, most recently from 5030af6 to 2f13bf1 Compare December 12, 2024 11:15
Copy link

codecov bot commented Dec 12, 2024

Codecov Report

Attention: Patch coverage is 90.00000% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
nav2_smac_planner/src/smac_planner_2d.cpp 50.00% 1 Missing ⚠️
nav2_smac_planner/src/smac_planner_hybrid.cpp 93.33% 1 Missing ⚠️
nav2_smac_planner/src/smac_planner_lattice.cpp 92.30% 1 Missing ⚠️
Files with missing lines Coverage Δ
nav2_smac_planner/src/smac_planner_2d.cpp 93.20% <50.00%> (-0.43%) ⬇️
nav2_smac_planner/src/smac_planner_hybrid.cpp 86.85% <93.33%> (+0.08%) ⬆️
nav2_smac_planner/src/smac_planner_lattice.cpp 86.49% <92.30%> (+0.11%) ⬆️

... and 3 files with indirect coverage changes

… same cell

This case was already properly handled in the smac_planner_2d, but it
was still leading to an A* backtrace failure in the smac_planner_hybrid
and smac_planner_lattice. Let's harmonize the handling of this case.

This commit fixes issue ros-navigation#4792.

Signed-off-by: Dylan De Coeyer <[email protected]>
@DylanDeCoeyer-Quimesis DylanDeCoeyer-Quimesis force-pushed the fix_smac_planner_backtrace_failure branch from 2f13bf1 to a912059 Compare December 12, 2024 11:55
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, LGTM. Make sure to do these same comments in the State Lattice planner & add into the unit tests a plan where the start and goal are the same bin to exercise the change in unit testing

nav2_smac_planner/src/smac_planner_hybrid.cpp Outdated Show resolved Hide resolved
nav2_smac_planner/src/smac_planner_hybrid.cpp Show resolved Hide resolved
@DylanDeCoeyer-Quimesis DylanDeCoeyer-Quimesis force-pushed the fix_smac_planner_backtrace_failure branch from f820898 to 09eec6a Compare December 13, 2024 11:46
Copy link
Contributor

mergify bot commented Dec 13, 2024

@DylanDeCoeyer-Quimesis, your PR has failed to build. Please check CI outputs and resolve issues.
You may need to rebase or pull in main due to API changes (or your contribution genuinely fails).

@DylanDeCoeyer-Quimesis DylanDeCoeyer-Quimesis force-pushed the fix_smac_planner_backtrace_failure branch from 09eec6a to 728054f Compare December 13, 2024 14:45
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, LGTM. Test just needs to actually test the result of the exercised bit

nav2_smac_planner/test/test_smac_2d.cpp Outdated Show resolved Hide resolved
@DylanDeCoeyer-Quimesis DylanDeCoeyer-Quimesis force-pushed the fix_smac_planner_backtrace_failure branch 2 times, most recently from 5b44e9e to eba884f Compare December 16, 2024 09:17
Copy link
Contributor

mergify bot commented Dec 16, 2024

@DylanDeCoeyer-Quimesis, your PR has failed to build. Please check CI outputs and resolve issues.
You may need to rebase or pull in main due to API changes (or your contribution genuinely fails).

Add a plan where the start and goal are placed on the same cell.

Signed-off-by: Dylan De Coeyer <[email protected]>
@DylanDeCoeyer-Quimesis DylanDeCoeyer-Quimesis force-pushed the fix_smac_planner_backtrace_failure branch from eba884f to 81ee425 Compare December 16, 2024 09:31
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.

Great work, thanks!

@SteveMacenski SteveMacenski merged commit 27ba98a into ros-navigation:main Dec 17, 2024
11 checks passed
masf7g pushed a commit to quasi-robotics/navigation2 that referenced this pull request Dec 19, 2024
… same cell (ros-navigation#4793)

* nav2_smac_planner: handle corner case where start and goal are on the same cell

This case was already properly handled in the smac_planner_2d, but it
was still leading to an A* backtrace failure in the smac_planner_hybrid
and smac_planner_lattice. Let's harmonize the handling of this case.

This commit fixes issue ros-navigation#4792.

Signed-off-by: Dylan De Coeyer <[email protected]>

* nav2_smac_planner: use goal orientation when path is made of one point

Signed-off-by: Dylan De Coeyer <[email protected]>

* nav2_smac_planner: publish raw path also when start and goal are on the same cell

Signed-off-by: Dylan De Coeyer <[email protected]>

* nav2_smac_planner: add corner case to unit tests

Add a plan where the start and goal are placed on the same cell.

Signed-off-by: Dylan De Coeyer <[email protected]>

---------

Signed-off-by: Dylan De Coeyer <[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.

SmacPlanner backtrace failure when goal is close to the start pose
2 participants