Skip to content

Conversation

@doisyg
Copy link
Contributor

@doisyg doisyg commented Jul 30, 2025


Basic Info

Info Please fill out this column
Ticket(s) this addresses (add tickets here #1)
Primary OS tested on Ubuntu
Robotic platform tested on Dexory robot
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

Related to #5398

When a static layer detects a change of size, resolution or origin, it triggers a resize of the underlying master costmap which deletes all the costmap values of other layers.
However because the detection change is done with an inequality on float numbers, resize can be triggered for non significant changes (like due to different trailing numbers between double and float, or slightly different values loaded from a map yaml). Hence an update of one layer could effectively delete the data of all other layers.

This PR modifies the resize trigger to happen only for changes of resolution and origin bigger than EPSILON. Setting EPSILON to 1mm to be consistent with the map saving origin and resolution accuracy. But this value can be discussed. In practice 1e-6 works well (10x higher than the float smallest increment around 1.0).

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

Signed-off-by: Guillaume Doisy <[email protected]>
@SteveMacenski
Copy link
Member

How about 1e-5, I think 0.01 mm is good in practice. Anything lower than that isn't consequential. I usually use 1e-6 generically for epsilon values, so I'm happy with either. I don't think 1e-3 is enough though

@codecov
Copy link

codecov bot commented Jul 30, 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.31% <100.00%> (+0.85%) ⬆️

... and 310 files with indirect coverage changes

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

@doisyg
Copy link
Contributor Author

doisyg commented Jul 31, 2025

How about 1e-5

Deal

Signed-off-by: Guillaume Doisy <[email protected]>
@doisyg doisyg force-pushed the limit_static_map_resize branch from d9607db to d5a46ae Compare July 31, 2025 07:53
@SteveMacenski SteveMacenski merged commit fba0358 into ros-navigation:main Jul 31, 2025
16 checks passed
SakshayMahna pushed a commit to SakshayMahna/navigation2 that referenced this pull request Aug 8, 2025
* [DEX] limit comparison precision

Signed-off-by: Guillaume Doisy <[email protected]>

* EPSILON 1e-5

Signed-off-by: Guillaume Doisy <[email protected]>

---------

Signed-off-by: Guillaume Doisy <[email protected]>
Co-authored-by: Guillaume Doisy <[email protected]>
SteveMacenski pushed a commit that referenced this pull request Aug 19, 2025
* [DEX] limit comparison precision

Signed-off-by: Guillaume Doisy <[email protected]>

* EPSILON 1e-5

Signed-off-by: Guillaume Doisy <[email protected]>

---------

Signed-off-by: Guillaume Doisy <[email protected]>
Co-authored-by: Guillaume Doisy <[email protected]>
SteveMacenski pushed a commit that referenced this pull request Aug 19, 2025
* [DEX] limit comparison precision

Signed-off-by: Guillaume Doisy <[email protected]>

* EPSILON 1e-5

Signed-off-by: Guillaume Doisy <[email protected]>

---------

Signed-off-by: Guillaume Doisy <[email protected]>
Co-authored-by: Guillaume Doisy <[email protected]>
SteveMacenski added a commit that referenced this pull request Aug 20, 2025
* Conserve curvature with LIMIT action (#5255)

* Conserve curvature with LIMIT action

Signed-off-by: Tony Najjar <[email protected]>

* fix format

Signed-off-by: Tony Najjar <[email protected]>

* fix test

Signed-off-by: Tony Najjar <[email protected]>

---------

Signed-off-by: Tony Najjar <[email protected]>

* Adding epsilon for voxel_layer precision loss (#5314)

* Adding epsilon for voxel_layer precision loss

Signed-off-by: bhx <[email protected]>

* Update nav2_costmap_2d/plugins/voxel_layer.cpp

Signed-off-by: Steve Macenski <[email protected]>

* Update nav2_costmap_2d/plugins/voxel_layer.cpp

Signed-off-by: Steve Macenski <[email protected]>

* Update nav2_costmap_2d/plugins/voxel_layer.cpp

Signed-off-by: Steve Macenski <[email protected]>

---------

Signed-off-by: bhx <[email protected]>
Signed-off-by: Steve Macenski <[email protected]>
Co-authored-by: Steve Macenski <[email protected]>

* fix: correct ThroughActionResult type alias in would_a_planner_recovery_help_condition (#5326)

The ThroughActionResult type alias was incorrectly referencing Action::Result 
instead of ThroughAction::Result, causing the condition to not work properly 
for ComputePathThroughPoses actions.

Fixes #5324

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>

* Adding slow down at target heading to RPP Controller (#5361)

* Adding slow down at target heading to RPP

Signed-off-by: SteveMacenski <[email protected]>

* Update test_regulated_pp.cpp

Signed-off-by: Steve Macenski <[email protected]>

---------

Signed-off-by: SteveMacenski <[email protected]>
Signed-off-by: Steve Macenski <[email protected]>

* Eexception rethrow in dockRobot method (#5364)

Signed-off-by: Alberto Tudela <[email protected]>

* Add global min obstacle height in voxel layer (#5389)

* Add min obstacle height in voxel layer

Signed-off-by: mini-1235 <[email protected]>

* Fix linting

Signed-off-by: Maurice <[email protected]>

---------

Signed-off-by: mini-1235 <[email protected]>
Signed-off-by: Maurice <[email protected]>

* [DEX] Enforce 3 digits precision (#5398)

Signed-off-by: Guillaume Doisy <[email protected]>
Co-authored-by: Guillaume Doisy <[email protected]>

* [static_layer] limit comparison precision (#5405)

* [DEX] limit comparison precision

Signed-off-by: Guillaume Doisy <[email protected]>

* EPSILON 1e-5

Signed-off-by: Guillaume Doisy <[email protected]>

---------

Signed-off-by: Guillaume Doisy <[email protected]>
Co-authored-by: Guillaume Doisy <[email protected]>

* Smooth path even if goal pose is so much near to the robot (#5423)

* Smooth path even if goal pose is so much near to the robot

Signed-off-by: CihatAltiparmak <[email protected]>

* Apply suggestions

Signed-off-by: CihatAltiparmak <[email protected]>

* Remove unnecessary diff

Signed-off-by: CihatAltiparmak <[email protected]>

---------

Signed-off-by: CihatAltiparmak <[email protected]>

* Fix KeepoutFilter on the ARM architecture (#5436)

Signed-off-by: Sushant Chavan <[email protected]>

* Fix missing dependency (#5460)

* bump to 1.3.8 for Jazzy release Aug 19, 2025

Signed-off-by: SteveMacenski <[email protected]>

* load balance CI

Signed-off-by: SteveMacenski <[email protected]>

---------

Signed-off-by: Tony Najjar <[email protected]>
Signed-off-by: bhx <[email protected]>
Signed-off-by: Steve Macenski <[email protected]>
Signed-off-by: SteveMacenski <[email protected]>
Signed-off-by: Alberto Tudela <[email protected]>
Signed-off-by: mini-1235 <[email protected]>
Signed-off-by: Maurice <[email protected]>
Signed-off-by: Guillaume Doisy <[email protected]>
Signed-off-by: CihatAltiparmak <[email protected]>
Signed-off-by: Sushant Chavan <[email protected]>
Co-authored-by: Tony Najjar <[email protected]>
Co-authored-by: hutao <[email protected]>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Alberto Tudela <[email protected]>
Co-authored-by: mini-1235 <[email protected]>
Co-authored-by: Guillaume Doisy <[email protected]>
Co-authored-by: Guillaume Doisy <[email protected]>
Co-authored-by: Cihat Kurtuluş Altıparmak <[email protected]>
Co-authored-by: Sushant Chavan <[email protected]>
Co-authored-by: Tim Clephas <[email protected]>
SteveMacenski added a commit that referenced this pull request Aug 20, 2025
* enable_groot_monitoring_ false (#5246)

Signed-off-by: Guillaume Doisy <[email protected]>
Co-authored-by: Guillaume Doisy <[email protected]>

* Add min_distance_to_obstacle parameter to RPP (#4543)

* min_distance_to_obstacle

Signed-off-by: Guillaume Doisy <[email protected]>

* suggestion to time base and combine

Signed-off-by: Guillaume Doisy <[email protected]>

* typo

Signed-off-by: Guillaume Doisy <[email protected]>

* use min_approach_linear_velocity

Signed-off-by: Guillaume Doisy <[email protected]>

---------

Signed-off-by: Guillaume Doisy <[email protected]>
Co-authored-by: Guillaume Doisy <[email protected]>

* Parametrizing obstacle layer tf filter tolerance (#5261)

Signed-off-by: Marco Bassa <[email protected]>

* Fix backport compiler warning (#5277)

Signed-off-by: Steve Macenski <[email protected]>

* Add missing include of algorithm in differential_motion_model.cpp (#5293)

Signed-off-by: Silvio Traversaro <[email protected]>

* Remove unused unistd.h header from route_tool.cpp (#5292)

Signed-off-by: Silvio Traversaro <[email protected]>

* Adding epsilon for voxel_layer precision loss (#5314)

* Adding epsilon for voxel_layer precision loss

Signed-off-by: bhx <[email protected]>

* Update nav2_costmap_2d/plugins/voxel_layer.cpp

Signed-off-by: Steve Macenski <[email protected]>

* Update nav2_costmap_2d/plugins/voxel_layer.cpp

Signed-off-by: Steve Macenski <[email protected]>

* Update nav2_costmap_2d/plugins/voxel_layer.cpp

Signed-off-by: Steve Macenski <[email protected]>

---------

Signed-off-by: bhx <[email protected]>
Signed-off-by: Steve Macenski <[email protected]>
Co-authored-by: Steve Macenski <[email protected]>

* fix: correct ThroughActionResult type alias in would_a_planner_recovery_help_condition (#5326)

The ThroughActionResult type alias was incorrectly referencing Action::Result 
instead of ThroughAction::Result, causing the condition to not work properly 
for ComputePathThroughPoses actions.

Fixes #5324

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>

* outputting tracker feedback on ComputeAndTrack BT node (#5327)

* outputting tracker feedback on BT node

Signed-off-by: Alexander Yuen <[email protected]>

* initializing outputs

Signed-off-by: Alexander Yuen <[email protected]>

* outputting last state on success

Signed-off-by: Alexander Yuen <[email protected]>

* linting

Signed-off-by: Alexander Yuen <[email protected]>

* fixed nav2_tree_nodes.xml

Signed-off-by: Alexander Yuen <[email protected]>

* Update nav2_behavior_tree/include/nav2_behavior_tree/plugins/action/compute_and_track_route_action.hpp

Co-authored-by: Steve Macenski <[email protected]>
Signed-off-by: alexanderjyuen <[email protected]>

* consolidated function to set outputs null, only setOutput with active feedback

Signed-off-by: Alexander Yuen <[email protected]>

* add class to method

Signed-off-by: Alexander Yuen <[email protected]>

* linting

Signed-off-by: Alexander Yuen <[email protected]>

---------

Signed-off-by: Alexander Yuen <[email protected]>
Signed-off-by: alexanderjyuen <[email protected]>
Co-authored-by: Steve Macenski <[email protected]>

* Adding slow down at target heading to RPP Controller (#5361)

* Adding slow down at target heading to RPP

Signed-off-by: SteveMacenski <[email protected]>

* Update test_regulated_pp.cpp

Signed-off-by: Steve Macenski <[email protected]>

---------

Signed-off-by: SteveMacenski <[email protected]>
Signed-off-by: Steve Macenski <[email protected]>

* Include <stdexcept> in docking_exceptions.hpp for exception handling (#5363)

Signed-off-by: Alberto Tudela <[email protected]>

* Eexception rethrow in dockRobot method (#5364)

Signed-off-by: Alberto Tudela <[email protected]>

* Add global min obstacle height in voxel layer (#5389)

* Add min obstacle height in voxel layer

Signed-off-by: mini-1235 <[email protected]>

* Fix linting

Signed-off-by: Maurice <[email protected]>

---------

Signed-off-by: mini-1235 <[email protected]>
Signed-off-by: Maurice <[email protected]>

* [DEX] Enforce 3 digits precision (#5398)

Signed-off-by: Guillaume Doisy <[email protected]>
Co-authored-by: Guillaume Doisy <[email protected]>

* [static_layer] limit comparison precision (#5405)

* [DEX] limit comparison precision

Signed-off-by: Guillaume Doisy <[email protected]>

* EPSILON 1e-5

Signed-off-by: Guillaume Doisy <[email protected]>

---------

Signed-off-by: Guillaume Doisy <[email protected]>
Co-authored-by: Guillaume Doisy <[email protected]>

* corner case bin check (#5413)

Signed-off-by: Guillaume Doisy <[email protected]>
Co-authored-by: Guillaume Doisy <[email protected]>

* Add IndexType definition for Nanoflann KDTree in `node_spatial_tree`. (#5420)

* fix: Add KDTree type definition to include unsigned int for IndexType

Signed-off-by: Ericsii <[email protected]>

* code format

Signed-off-by: Ericsii <[email protected]>

---------

Signed-off-by: Ericsii <[email protected]>

* Smooth path even if goal pose is so much near to the robot (#5423)

* Smooth path even if goal pose is so much near to the robot

Signed-off-by: CihatAltiparmak <[email protected]>

* Apply suggestions

Signed-off-by: CihatAltiparmak <[email protected]>

* Remove unnecessary diff

Signed-off-by: CihatAltiparmak <[email protected]>

---------

Signed-off-by: CihatAltiparmak <[email protected]>

* Fix KeepoutFilter on the ARM architecture (#5436)

Signed-off-by: Sushant Chavan <[email protected]>

* Fix missing dependency (#5460)

* Support loading multiple behavior tree files as subtrees (#5426)

* Support loading multiple behavior tree files as subtrees

Signed-off-by: Jad El Hajj <[email protected]>

* Fix code style

Signed-off-by: Jad El Hajj <[email protected]>

* Added default param value

Signed-off-by: Jad El Hajj <[email protected]>

* Added recursive check to loadBehaviorTree and adapted unit test accordingly

Signed-off-by: Jad El Hajj <[email protected]>

* Removed nested loadBehaviorTree check in navigators

Signed-off-by: Jad El Hajj <[email protected]>

* Removed whitespace cpplint

Signed-off-by: Jad El Hajj <[email protected]>

* Fixed goalReceived

Signed-off-by: Jad El Hajj <[email protected]>

* Let loadbehaviorTree use its own search_directories var

Signed-off-by: Jad El Hajj <[email protected]>

* PR fixes-format-lint and test

Signed-off-by: Jad El Hajj <[email protected]>

* fix pointer

Signed-off-by: Jad El Hajj <[email protected]>

* Added unit test for BT xml validity

Signed-off-by: Jad El Hajj <[email protected]>

* CPPLint

Signed-off-by: Jad El Hajj <[email protected]>

* Check non existent search directory for bt

Signed-off-by: Jad El Hajj <[email protected]>

* CPPLint

Signed-off-by: Jad El Hajj <[email protected]>

* Fixed BT tests

Signed-off-by: Jad El Hajj <[email protected]>

* Fixed BT tests

Signed-off-by: Jad El Hajj <[email protected]>

---------

Signed-off-by: Jad El Hajj <[email protected]>

* bump 1.4.0 to 1.4.1 for aug 19 sync

Signed-off-by: SteveMacenski <[email protected]>

* Fixing backport error

Signed-off-by: SteveMacenski <[email protected]>

* load balance CI

Signed-off-by: SteveMacenski <[email protected]>

* Fixing BT Navigator backport merge conflict issue

Signed-off-by: SteveMacenski <[email protected]>

---------

Signed-off-by: Guillaume Doisy <[email protected]>
Signed-off-by: Marco Bassa <[email protected]>
Signed-off-by: Steve Macenski <[email protected]>
Signed-off-by: Silvio Traversaro <[email protected]>
Signed-off-by: bhx <[email protected]>
Signed-off-by: Alexander Yuen <[email protected]>
Signed-off-by: alexanderjyuen <[email protected]>
Signed-off-by: SteveMacenski <[email protected]>
Signed-off-by: Alberto Tudela <[email protected]>
Signed-off-by: mini-1235 <[email protected]>
Signed-off-by: Maurice <[email protected]>
Signed-off-by: Ericsii <[email protected]>
Signed-off-by: CihatAltiparmak <[email protected]>
Signed-off-by: Sushant Chavan <[email protected]>
Signed-off-by: Jad El Hajj <[email protected]>
Co-authored-by: Guillaume Doisy <[email protected]>
Co-authored-by: Guillaume Doisy <[email protected]>
Co-authored-by: Marco Bassa <[email protected]>
Co-authored-by: Silvio Traversaro <[email protected]>
Co-authored-by: hutao <[email protected]>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: alexanderjyuen <[email protected]>
Co-authored-by: Alberto Tudela <[email protected]>
Co-authored-by: mini-1235 <[email protected]>
Co-authored-by: YLFeng <[email protected]>
Co-authored-by: Cihat Kurtuluş Altıparmak <[email protected]>
Co-authored-by: Sushant Chavan <[email protected]>
Co-authored-by: Tim Clephas <[email protected]>
Co-authored-by: Jad EL HAJJ <[email protected]>
RBT22 pushed a commit to EnjoyRobotics/navigation2 that referenced this pull request Sep 11, 2025
* Conserve curvature with LIMIT action (ros-navigation#5255)

* Conserve curvature with LIMIT action

Signed-off-by: Tony Najjar <[email protected]>

* fix format

Signed-off-by: Tony Najjar <[email protected]>

* fix test

Signed-off-by: Tony Najjar <[email protected]>

---------

Signed-off-by: Tony Najjar <[email protected]>

* Adding epsilon for voxel_layer precision loss (ros-navigation#5314)

* Adding epsilon for voxel_layer precision loss

Signed-off-by: bhx <[email protected]>

* Update nav2_costmap_2d/plugins/voxel_layer.cpp

Signed-off-by: Steve Macenski <[email protected]>

* Update nav2_costmap_2d/plugins/voxel_layer.cpp

Signed-off-by: Steve Macenski <[email protected]>

* Update nav2_costmap_2d/plugins/voxel_layer.cpp

Signed-off-by: Steve Macenski <[email protected]>

---------

Signed-off-by: bhx <[email protected]>
Signed-off-by: Steve Macenski <[email protected]>
Co-authored-by: Steve Macenski <[email protected]>

* fix: correct ThroughActionResult type alias in would_a_planner_recovery_help_condition (ros-navigation#5326)

The ThroughActionResult type alias was incorrectly referencing Action::Result 
instead of ThroughAction::Result, causing the condition to not work properly 
for ComputePathThroughPoses actions.

Fixes ros-navigation#5324

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>

* Adding slow down at target heading to RPP Controller (ros-navigation#5361)

* Adding slow down at target heading to RPP

Signed-off-by: SteveMacenski <[email protected]>

* Update test_regulated_pp.cpp

Signed-off-by: Steve Macenski <[email protected]>

---------

Signed-off-by: SteveMacenski <[email protected]>
Signed-off-by: Steve Macenski <[email protected]>

* Eexception rethrow in dockRobot method (ros-navigation#5364)

Signed-off-by: Alberto Tudela <[email protected]>

* Add global min obstacle height in voxel layer (ros-navigation#5389)

* Add min obstacle height in voxel layer

Signed-off-by: mini-1235 <[email protected]>

* Fix linting

Signed-off-by: Maurice <[email protected]>

---------

Signed-off-by: mini-1235 <[email protected]>
Signed-off-by: Maurice <[email protected]>

* [DEX] Enforce 3 digits precision (ros-navigation#5398)

Signed-off-by: Guillaume Doisy <[email protected]>
Co-authored-by: Guillaume Doisy <[email protected]>

* [static_layer] limit comparison precision (ros-navigation#5405)

* [DEX] limit comparison precision

Signed-off-by: Guillaume Doisy <[email protected]>

* EPSILON 1e-5

Signed-off-by: Guillaume Doisy <[email protected]>

---------

Signed-off-by: Guillaume Doisy <[email protected]>
Co-authored-by: Guillaume Doisy <[email protected]>

* Smooth path even if goal pose is so much near to the robot (ros-navigation#5423)

* Smooth path even if goal pose is so much near to the robot

Signed-off-by: CihatAltiparmak <[email protected]>

* Apply suggestions

Signed-off-by: CihatAltiparmak <[email protected]>

* Remove unnecessary diff

Signed-off-by: CihatAltiparmak <[email protected]>

---------

Signed-off-by: CihatAltiparmak <[email protected]>

* Fix KeepoutFilter on the ARM architecture (ros-navigation#5436)

Signed-off-by: Sushant Chavan <[email protected]>

* Fix missing dependency (ros-navigation#5460)

* bump to 1.3.8 for Jazzy release Aug 19, 2025

Signed-off-by: SteveMacenski <[email protected]>

* load balance CI

Signed-off-by: SteveMacenski <[email protected]>

---------

Signed-off-by: Tony Najjar <[email protected]>
Signed-off-by: bhx <[email protected]>
Signed-off-by: Steve Macenski <[email protected]>
Signed-off-by: SteveMacenski <[email protected]>
Signed-off-by: Alberto Tudela <[email protected]>
Signed-off-by: mini-1235 <[email protected]>
Signed-off-by: Maurice <[email protected]>
Signed-off-by: Guillaume Doisy <[email protected]>
Signed-off-by: CihatAltiparmak <[email protected]>
Signed-off-by: Sushant Chavan <[email protected]>
Co-authored-by: Tony Najjar <[email protected]>
Co-authored-by: hutao <[email protected]>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Alberto Tudela <[email protected]>
Co-authored-by: mini-1235 <[email protected]>
Co-authored-by: Guillaume Doisy <[email protected]>
Co-authored-by: Guillaume Doisy <[email protected]>
Co-authored-by: Cihat Kurtuluş Altıparmak <[email protected]>
Co-authored-by: Sushant Chavan <[email protected]>
Co-authored-by: Tim Clephas <[email protected]>
BCKSELFDRIVEWORLD pushed a commit to BCKSELFDRIVEWORLD/navigation2 that referenced this pull request Sep 23, 2025
* [DEX] limit comparison precision

Signed-off-by: Guillaume Doisy <[email protected]>

* EPSILON 1e-5

Signed-off-by: Guillaume Doisy <[email protected]>

---------

Signed-off-by: Guillaume Doisy <[email protected]>
Co-authored-by: Guillaume Doisy <[email protected]>
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