From 745af36add45b98f4c75be1fb1a5e37a95a1416c Mon Sep 17 00:00:00 2001 From: Luca Della Vedova Date: Mon, 25 Nov 2024 12:11:13 +0800 Subject: [PATCH] Always join with parent namespace Signed-off-by: Luca Della Vedova --- nav2_costmap_2d/plugins/static_layer.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nav2_costmap_2d/plugins/static_layer.cpp b/nav2_costmap_2d/plugins/static_layer.cpp index 8e0aa0eb1e..249fd9effd 100644 --- a/nav2_costmap_2d/plugins/static_layer.cpp +++ b/nav2_costmap_2d/plugins/static_layer.cpp @@ -151,12 +151,11 @@ StaticLayer::getParameters() node->get_parameter(name_ + "." + "map_topic", private_map_topic); node->get_parameter("map_topic", global_map_topic); if (!private_map_topic.empty()) { - // global_map_topic_ is already in parent namespace, so we only need to process - // the local topic - map_topic_ = joinWithParentNamespace(private_map_topic); + map_topic_ = private_map_topic; } else { map_topic_ = global_map_topic; } + map_topic_ = joinWithParentNamespace(map_topic_); node->get_parameter( name_ + "." + "map_subscribe_transient_local", map_subscribe_transient_local_);