Skip to content

Fix for setting dynamically the footprint_clearing_enabled parameter in the StaticLayer costmap_2d plugin#4885

Merged
SteveMacenski merged 1 commit intoros-navigation:mainfrom
georgflick:gf/fix_static_layer_param
Jan 30, 2025
Merged

Fix for setting dynamically the footprint_clearing_enabled parameter in the StaticLayer costmap_2d plugin#4885
SteveMacenski merged 1 commit intoros-navigation:mainfrom
georgflick:gf/fix_static_layer_param

Conversation

@georgflick
Copy link
Contributor

@georgflick georgflick commented Jan 30, 2025

In the StaticLayer costmap2d_plugin , the parameter footprint_clearing_enabled was never changed dynamically in the callback, because the else if condition has a duplicated condition (same as in line 490 and line 500), so it never executed setting that parameter.


Basic Info

Info Please fill out this column
Ticket(s) this addresses None
Primary OS tested on Ubuntu 24.04
Robotic platform tested on None
Does this PR contain AI generated software? No

Description of contribution in a few bullet points

  • Fixes the dynamical parameter change of the parameter footprint_clearing_enabled via a ros2 callback
  • The else if condition was a duplicate of the one before, so it was never executed. This change is fixing it.

Description of documentation updates required from your changes

Not needed.

Description of how this change was tested

ros2 param set /local_costmap/local_costmap obstacle_layer.footprint_clearing_enabled False or True to disable/enable it

Future work that may be required in bullet points

None

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

@georgflick georgflick force-pushed the gf/fix_static_layer_param branch 2 times, most recently from 992ea26 to 6da35cd Compare January 30, 2025 13:02
the else condition is a duplication of the one before and was so never
executed.

Signed-off-by: Georg Flick <georg.flick@enway.ai>
@georgflick georgflick force-pushed the gf/fix_static_layer_param branch from 6da35cd to dca9ae3 Compare January 30, 2025 13:04
@codecov
Copy link

codecov bot commented Jan 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
nav2_costmap_2d/plugins/static_layer.cpp 73.55% <100.00%> (-0.23%) ⬇️

... and 1 file with indirect coverage changes

@SteveMacenski SteveMacenski merged commit 447c8ce into ros-navigation:main Jan 30, 2025
8 checks passed
@SteveMacenski
Copy link
Member

Thanks!

@SteveMacenski
Copy link
Member

Backporting to jazzy

mergify bot pushed a commit that referenced this pull request Jan 30, 2025
the else condition is a duplication of the one before and was so never
executed.

Signed-off-by: Georg Flick <georg.flick@enway.ai>
(cherry picked from commit 447c8ce)
SteveMacenski pushed a commit that referenced this pull request Jan 30, 2025
the else condition is a duplication of the one before and was so never
executed.

Signed-off-by: Georg Flick <georg.flick@enway.ai>
(cherry picked from commit 447c8ce)

Co-authored-by: Georg Flick <54032815+georgflick@users.noreply.github.com>
masf7g pushed a commit to quasi-robotics/navigation2 that referenced this pull request Feb 5, 2025
the else condition is a duplication of the one before and was so never
executed.

Signed-off-by: Georg Flick <georg.flick@enway.ai>
stevedanomodolor pushed a commit to stevedanomodolor/navigation2 that referenced this pull request Apr 29, 2025
the else condition is a duplication of the one before and was so never
executed.

Signed-off-by: Georg Flick <georg.flick@enway.ai>
Signed-off-by: stevedanomodolor <stevedan.o.omodolor@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants