Skip to content

Support stamped footprints in costmap_2d #5345

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

Conversation

Sushant-Chavan
Copy link
Contributor


Basic Info

Info Please fill out this column
Primary OS tested on (Ubuntu)
Robotic platform tested on Propreitary
Does this PR contain AI generated software? No

Description of contribution in a few bullet points

  • This PR adds a parameter to choose between Polygon/PolygonStamped subscriber for receiving the footprint in the Costmap2DROS.
  • By default Costmap2DROS subscribes to Polygon footprints
  • PolygonStamped footprints can be subscribed to by setting the subscribe_to_stamped_footprint parameter to True
  • Also includes some cleanup, tiny optimizations, and minor refactoring to parts of code in the vicinity of the above changes

Description of documentation updates required from your changes

None

Description of how this change was tested

Tested that the Costmap2DROS can receive and properly process PolygonStamped footprint messages on a proprietary robot


Future work that may be required in bullet points

N/A

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: Sushant Chavan <gitecsvc@gmail.com>
@Sushant-Chavan Sushant-Chavan force-pushed the feature/stamped_footprint_sub branch from 2b1b657 to a19e736 Compare July 10, 2025 12:30
Copy link

codecov bot commented Jul 10, 2025

Codecov Report

Attention: Patch coverage is 80.00000% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
nav2_costmap_2d/src/costmap_2d_ros.cpp 55.55% 4 Missing ⚠️
Files with missing lines Coverage Δ
...tmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp 100.00% <ø> (ø)
nav2_costmap_2d/src/footprint.cpp 97.53% <100.00%> (+0.06%) ⬆️
nav2_costmap_2d/src/footprint_subscriber.cpp 100.00% <100.00%> (ø)
nav2_costmap_2d/src/costmap_2d_ros.cpp 86.54% <55.55%> (-1.10%) ⬇️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

No issue here. In the future though, maybe we should just make a separate topic and just subscribe to both. For Costmap2D though I'm not all that sensitive to changes like this, we need a major refactor either way.

@SteveMacenski SteveMacenski merged commit 2a8619f into ros-navigation:main Jul 14, 2025
15 of 16 checks passed
@Sushant-Chavan Sushant-Chavan deleted the feature/stamped_footprint_sub branch July 16, 2025 11:16
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