Skip to content

Bugfix inactive publishers (backport #5748)#5836

Closed
mergify[bot] wants to merge 1 commit intokiltedfrom
mergify/bp/kilted/pr-5748
Closed

Bugfix inactive publishers (backport #5748)#5836
mergify[bot] wants to merge 1 commit intokiltedfrom
mergify/bp/kilted/pr-5748

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Jan 5, 2026

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

This is an automatic backport of pull request #5748 done by [Mergify](https://mergify.com).

* Do not publish costmap unless active

Signed-off-by: Christopher Thompson <cthompson@metalsharkboats.com>

* Fix style

Signed-off-by: Christopher Thompson <cthompson@metalsharkboats.com>

* Fix typo

Signed-off-by: Christopher Thompson <cthompson@metalsharkboats.com>

* Use layers isEnabled() to prevent publishing

Signed-off-by: Christopher Thompson <cthompson@metalsharkboats.com>

* Fix style

Signed-off-by: Christopher Thompson <cthompson@metalsharkboats.com>

* Add missing include for CostmapLayer type

Signed-off-by: Christopher Thompson <cthompson@metalsharkboats.com>

* Remove extra scoping

Signed-off-by: Christopher Thompson <cthompson@metalsharkboats.com>

---------

Signed-off-by: Christopher Thompson <cthompson@metalsharkboats.com>
Co-authored-by: Christopher Thompson <cthompson@metalsharkboats.com>
(cherry picked from commit b766611)
@mergify
Copy link
Contributor Author

mergify bot commented Jan 5, 2026

@mergify[bot], all pull requests must be targeted towards the main development branch.
Once merged into main, it is possible to backport to @kilted, but it must be in main
to have these changes reflected into new distributions.

@mini-1235 mini-1235 closed this Jan 5, 2026
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