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

Fixes for nav2_smac_planner to build with -Werror. #4635

Conversation

clalancette
Copy link
Contributor

@clalancette clalancette commented Aug 21, 2024


Basic Info

Info Please fill out this column
Ticket(s) this addresses Follow-up to #4634
Primary OS tested on Ubuntu 24.04
Robotic platform tested on N/A
Does this PR contain AI generated software? No

Description of contribution in a few bullet points

This is a follow-up PR to #4634 where we change nav2_smac_planner to use nav2_package. This turns on additional compiler warnings, along with -Werror, so it requires some fixes to go along with it.

I want to highlight one controversial change in here. The UNKNOWN constant in constants.hpp was causing shadowing problems with UNKNOWN embedded inside of enum class elsewhere in the code. So I renamed that constant (along with the rest) to UNKNOWN_COST. This breaks the API, but resolves the error.

Description of documentation updates required from your changes

It will possibly be necessary to update the documentation to mention the API break in constants.hpp.


Future work that may be required in bullet points

None 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

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
@clalancette clalancette force-pushed the clalancette/smac-planner-error-fixes branch from e3e07ef to cd73ae4 Compare August 21, 2024 14:20
Copy link

codecov bot commented Aug 21, 2024

Codecov Report

Attention: Patch coverage is 96.42857% with 1 line in your changes missing coverage. Please review.

Files Patch % Lines
nav2_smac_planner/src/node_hybrid.cpp 92.30% 1 Missing ⚠️
Files Coverage Δ
...ac_planner/include/nav2_smac_planner/constants.hpp 100.00% <ø> (ø)
...c_planner/include/nav2_smac_planner/node_basic.hpp 100.00% <100.00%> (ø)
...2_smac_planner/include/nav2_smac_planner/types.hpp 100.00% <ø> (ø)
nav2_smac_planner/src/analytic_expansion.cpp 86.15% <ø> (ø)
nav2_smac_planner/src/collision_checker.cpp 96.87% <100.00%> (ø)
nav2_smac_planner/src/costmap_downsampler.cpp 93.54% <100.00%> (ø)
nav2_smac_planner/src/node_2d.cpp 98.03% <100.00%> (ø)
nav2_smac_planner/src/smac_planner_hybrid.cpp 86.84% <ø> (+0.22%) ⬆️
nav2_smac_planner/src/smoother.cpp 94.50% <100.00%> (ø)
nav2_smac_planner/src/node_hybrid.cpp 87.59% <92.30%> (ø)

... and 2 files with indirect coverage changes

@SteveMacenski
Copy link
Member

SteveMacenski commented Aug 21, 2024

Christ. This kind of amateur shit I have no excuse for. I don't know how nav2_package() got overlooked for this package. A few of these probably created real bugs. This was a really good nitpick note to uncover. Thanks Chris!

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
@SteveMacenski SteveMacenski merged commit 226b196 into ros-navigation:main Aug 21, 2024
11 checks passed
@clalancette clalancette deleted the clalancette/smac-planner-error-fixes branch August 21, 2024 21:25
josephduchesne pushed a commit to josephduchesne/navigation2 that referenced this pull request Dec 10, 2024
* Fixes for nav2_smac_planner to build with -Werror.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>

* Feedback from review.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>

---------

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Signed-off-by: Joseph Duchesne <josephgeek@gmail.com>
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