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

Switch nav2_smac_planner to modern CMake idioms. #4634

Conversation

clalancette
Copy link
Contributor


Basic Info

Info Please fill out this column
Ticket(s) this addresses Follow-up to #4357
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

Switch nav2_smac_planner to use modern CMake idioms:

  1. Switch from ament_target_dependencies to target_link_libraries
  2. Don't compile the common files in this package more than once. Instead, compile those into a library, then link that library into all of the other ones.
  3. Export a CMake target so downstream packages can use it.
  4. Push the include directories down one level, which is best practice since Humble.

Description of documentation updates required from your changes

None needed.


Future work that may be required in bullet points

This is part of a larger series to switch Navigation2 to modern CMake idioms. After this PR, there 3 PRs to go.

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>
find_package(rcl_interfaces REQUIRED)
find_package(tf2 REQUIRED)
find_package(tf2_ros REQUIRED)
find_package(visualization_msgs REQUIRED)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nav2_package()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point.

When I turn that on locally, I get a host of new compiler warnings (which are then errors, because of -Werror). Would you like me to submit a separate PR where we only turn on nav2_package() and fix the warnings, or do you want me to just fix them all in this PR?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A new PR would be fine. Also, if you'd prefer, you could file a ticket with those errors and we can kick that can for another time entirely. I don't think that's critically in your path of what you're aiming to do, so I don't want to pile on - unless you'd like to :-)

@SteveMacenski SteveMacenski merged commit c2e4aab into ros-navigation:main Aug 20, 2024
11 checks passed
@clalancette clalancette deleted the clalancette/main-nav2-smac-planner branch August 21, 2024 00:01
josephduchesne pushed a commit to josephduchesne/navigation2 that referenced this pull request Dec 10, 2024
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