Skip to content

Commit

Permalink
fix(nav2_costmap_2d): make obstacle layer not current on enabled togg…
Browse files Browse the repository at this point in the history
…le (ros-navigation#4507)

Signed-off-by: Kemal Bektas <kemal.bektas@node-robotics.com>
Co-authored-by: Kemal Bektas <kemal.bektas@node-robotics.com>
  • Loading branch information
2 people authored and Marc-Morcos committed Jul 4, 2024
1 parent 5e4f6dd commit b733877
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nav2_costmap_2d/plugins/obstacle_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,11 @@ ObstacleLayer::dynamicParametersCallback(
max_obstacle_height_ = parameter.as_double();
}
} else if (param_type == ParameterType::PARAMETER_BOOL) {
if (param_name == name_ + "." + "enabled") {
if (param_name == name_ + "." + "enabled" && enabled_ != parameter.as_bool()) {
enabled_ = parameter.as_bool();
if (enabled_) {
current_ = false;
}
} else if (param_name == name_ + "." + "footprint_clearing_enabled") {
footprint_clearing_enabled_ = parameter.as_bool();
}
Expand Down

0 comments on commit b733877

Please sign in to comment.