Skip to content

Conversation

@mini-1235
Copy link
Collaborator

Supersedes #5561

Until now, the special OccupancyGrid value "99" attributed to the inscribed inflated obstacles was mapped to 251 on conversion to Costmap2D, using the default linear relation. This is incorrect since a special value exists in the Costmap2D for inscribed obstacles: 253.

This commit makes sure that the correct value is used in case of inflated obstacle.

Basic Info

Info Please fill out this column
Ticket(s) this addresses /
Primary OS tested on Ubuntu
Robotic platform tested on Custom simulation
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

Description of documentation updates required from your changes

Description of how this change was tested

Future work that may be required in bullet points

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

…ribed inflated obstacles

Until now, the special OccupancyGrid value "99" attributed to the
inscribed inflated obstacles was mapped to 251 on conversion to
Costmap2D, using the default linear relation. This is incorrect since a
special value exists in the Costmap2D for inscribed obstacles: 253.

This commit makes sure that the correct value is used in case of
inflated obstacle.

Signed-off-by: Dylan De Coeyer <[email protected]>
Signed-off-by: mini-1235 <[email protected]>
@mini-1235
Copy link
Collaborator Author

Trying to pick up #5561, I am not sure what's happening, but I can see all tests passing right now:

[costmap_tests-4] [ RUN      ] TestNode.testInflation
[costmap_tests-4] �[0m[INFO 1765539450.996109206] [inflation_test_node]: 
[costmap_tests-4] 	inflation_test_node lifecycle node launched. 
[costmap_tests-4] 	Waiting on external lifecycle transitions to activate
[costmap_tests-4] 	See https://design.ros2.org/articles/node_lifecycle.html for more information. (printLifecycleNodeNotification() at /root/nav2_ws/src/navigation2/nav2_ros_common/include/nav2_ros_common/lifecycle_node.hpp:378)�[0m
[costmap_tests-4] �[0m[INFO 1765539450.996337353] [inflation_test_node]: Subscribing to the map topic (/map) with transient local durability (onInitialize() at /root/nav2_ws/src/navigation2/nav2_costmap_2d/plugins/static_layer.cpp:84)�[0m
[costmap_tests-4] �[0m[INFO 1765539450.999181839] [inflation_test_node]: Subscribed to Topics:  (onInitialize() at /root/nav2_ws/src/navigation2/nav2_costmap_2d/plugins/obstacle_layer.cpp:122)�[0m
[costmap_tests-4] �[0m[INFO 1765539450.999549334] [inflation_test_node]: StaticLayer: Resizing costmap to 10 X 10 at 1.000000 m/pix (processMap() at /root/nav2_ws/src/navigation2/nav2_costmap_2d/plugins/static_layer.cpp:203)�[0m
[costmap_tests-4] �[0m[INFO 1765539450.999891032] [inflation_test_node]: Destroying (~LifecycleNode() at /root/nav2_ws/src/navigation2/nav2_ros_common/include/nav2_ros_common/lifecycle_node.hpp:94)�[0m
[costmap_tests-4] �[33m[WARN 1765539450.999915421] [rclcpp_lifecycle]: LifecycleNode is not shut down: Node still in state(1) in destructor (~LifecycleNode() at ./src/lifecycle_node.cpp:159)�[0m
[costmap_tests-4] [       OK ] TestNode.testInflation (6 ms)

@codecov
Copy link

codecov bot commented Dec 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
...ostmap_2d/include/nav2_costmap_2d/static_layer.hpp 100.00% <ø> (ø)
nav2_costmap_2d/plugins/static_layer.cpp 74.54% <100.00%> (+0.23%) ⬆️
nav2_costmap_2d/src/costmap_2d_ros.cpp 86.84% <100.00%> (+0.03%) ⬆️

... and 10 files with indirect coverage changes

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

Signed-off-by: mini-1235 <[email protected]>
Signed-off-by: mini-1235 <[email protected]>
@SteveMacenski SteveMacenski merged commit fc0c18f into ros-navigation:main Dec 15, 2025
17 checks passed
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.

3 participants