Skip to content

Commit

Permalink
Append ros namespace to target container if available.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbharatheesha committed Dec 13, 2024
1 parent f9ab937 commit ae1920c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions launch_ros/launch_ros/actions/load_composable_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,13 @@ def execute(
'target container is neither a ComposableNodeContainer nor a SubstitutionType')
return

# Check if a global ros_namespace has been set with push ros namespace.
base_ns = context.launch_configurations.get('ros_namespace', None)
if base_ns is not None:
self.__final_target_container_name = make_namespace_absolute(
prefix_namespace(base_ns, self.__final_target_container_name)
)

# Create a client to load nodes in the target container.
self.__rclpy_load_node_client = get_ros_node(context).create_client(
composition_interfaces.srv.LoadNode, '{}/_container/load_node'.format(
Expand Down

0 comments on commit ae1920c

Please sign in to comment.