diff --git a/image_proc/launch/image_proc.launch.py b/image_proc/launch/image_proc.launch.py index 91af35f7f..42626f01a 100644 --- a/image_proc/launch/image_proc.launch.py +++ b/image_proc/launch/image_proc.launch.py @@ -41,16 +41,24 @@ def generate_launch_description(): + + arg_namespace = DeclareLaunchArgument( + name='namespace', default_value='', + description=('namespace for all components loaded') + ) + composable_nodes = [ ComposableNode( package='image_proc', plugin='image_proc::DebayerNode', name='debayer_node', + namespace=LaunchConfiguration('namespace'), ), ComposableNode( package='image_proc', plugin='image_proc::RectifyNode', name='rectify_mono_node', + namespace=LaunchConfiguration('namespace'), # Remap subscribers and publishers remappings=[ ('image', 'image_mono'), @@ -62,6 +70,7 @@ def generate_launch_description(): package='image_proc', plugin='image_proc::RectifyNode', name='rectify_color_node', + namespace=LaunchConfiguration('namespace'), # Remap subscribers and publishers remappings=[ ('image', 'image_color'), @@ -82,7 +91,7 @@ def generate_launch_description(): image_processing_container = ComposableNodeContainer( condition=LaunchConfigurationEquals('container', ''), name='image_proc_container', - namespace='', + namespace=LaunchConfiguration('namespace'), package='rclcpp_components', executable='component_container', composable_node_descriptions=composable_nodes, @@ -98,6 +107,7 @@ def generate_launch_description(): ) return LaunchDescription([ + arg_namespace, arg_container, image_processing_container, load_composable_nodes,