Skip to content

Commit 745af36

Browse files
Always join with parent namespace
Signed-off-by: Luca Della Vedova <lucadv@intrinsic.ai>
1 parent 7ad9241 commit 745af36

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

nav2_costmap_2d/plugins/static_layer.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,12 +151,11 @@ StaticLayer::getParameters()
151151
node->get_parameter(name_ + "." + "map_topic", private_map_topic);
152152
node->get_parameter("map_topic", global_map_topic);
153153
if (!private_map_topic.empty()) {
154-
// global_map_topic_ is already in parent namespace, so we only need to process
155-
// the local topic
156-
map_topic_ = joinWithParentNamespace(private_map_topic);
154+
map_topic_ = private_map_topic;
157155
} else {
158156
map_topic_ = global_map_topic;
159157
}
158+
map_topic_ = joinWithParentNamespace(map_topic_);
160159
node->get_parameter(
161160
name_ + "." + "map_subscribe_transient_local",
162161
map_subscribe_transient_local_);

0 commit comments

Comments
 (0)