Skip to content

Commit ae1920c

Browse files
committed
Append ros namespace to target container if available.
1 parent f9ab937 commit ae1920c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

launch_ros/launch_ros/actions/load_composable_nodes.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,13 @@ def execute(
220220
'target container is neither a ComposableNodeContainer nor a SubstitutionType')
221221
return
222222

223+
# Check if a global ros_namespace has been set with push ros namespace.
224+
base_ns = context.launch_configurations.get('ros_namespace', None)
225+
if base_ns is not None:
226+
self.__final_target_container_name = make_namespace_absolute(
227+
prefix_namespace(base_ns, self.__final_target_container_name)
228+
)
229+
223230
# Create a client to load nodes in the target container.
224231
self.__rclpy_load_node_client = get_ros_node(context).create_client(
225232
composition_interfaces.srv.LoadNode, '{}/_container/load_node'.format(

0 commit comments

Comments
 (0)