Skip to content

Conversation

@pele1410
Copy link

@pele1410 pele1410 commented Dec 1, 2025

Basic Info

Info Please fill out this column
Ticket(s) this addresses #5710
Primary OS tested on Ubuntu 24.04 docker container
Robotic platform tested on Gazebo simulation of a USV
Does this PR contain AI generated software? No
Was this PR description generated by AI software? No

Description of contribution in a few bullet points

Prevent the costmap_2d_publisher from trying to publish when it is not active.

Description of documentation updates required from your changes

N/A

Description of how this change was tested

Replicated the steps to produce the issue in #5710 and did not see the issue.


Future work that may be required in bullet points

This is not likely the root cause for the out-of-bounds index access but:

  • it seems logically correct to prevent publication unless active
  • it has the affect of side-stepping the issue

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-*.

Christopher Thompson added 3 commits December 1, 2025 12:53
Signed-off-by: Christopher Thompson <cthompson@metalsharkboats.com>
Signed-off-by: Christopher Thompson <cthompson@metalsharkboats.com>
Signed-off-by: Christopher Thompson <cthompson@metalsharkboats.com>
@pele1410
Copy link
Author

pele1410 commented Dec 1, 2025

Updated against main branch instead of jazzy


void Costmap2DPublisher::publishCostmap()
{
if(!active_) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if(!active_) {
if (!active_) {

Copy link
Member

Choose a reason for hiding this comment

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

Where is active_ ever set to true?

Copy link
Author

Choose a reason for hiding this comment

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

That is a good question. I naively thought it was already used and working. Will look into this.

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.

nav2_container crash when subscribing to static_layer_raw_updates

2 participants