From dca9ae32830bdd3e3b5b2357174a340dd0659746 Mon Sep 17 00:00:00 2001 From: Georg Flick Date: Thu, 30 Jan 2025 13:42:07 +0100 Subject: [PATCH] Fix dynamic callback for footprint clearing enable the else condition is a duplication of the one before and was so never executed. Signed-off-by: Georg Flick --- nav2_costmap_2d/plugins/static_layer.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nav2_costmap_2d/plugins/static_layer.cpp b/nav2_costmap_2d/plugins/static_layer.cpp index c067e1a0071..ac43c018673 100644 --- a/nav2_costmap_2d/plugins/static_layer.cpp +++ b/nav2_costmap_2d/plugins/static_layer.cpp @@ -496,9 +496,7 @@ StaticLayer::dynamicParametersCallback( height_ = size_y_; has_updated_data_ = true; current_ = false; - } - } else if (param_type == ParameterType::PARAMETER_BOOL) { - if (param_name == name_ + "." + "footprint_clearing_enabled") { + } else if (param_name == name_ + "." + "footprint_clearing_enabled") { footprint_clearing_enabled_ = parameter.as_bool(); } }