Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

This is possible from a launch file using extra_arguments, e.g.:

def generate_launch_description():
    """Generate launch description with multiple components."""
    container = ComposableNodeContainer(
            node_name='my_container',
            node_namespace='',
            package='rclcpp_components',
            node_executable='component_container',
            composable_node_descriptions=[
                ComposableNode(
                    package='composition',
                    node_plugin='composition::Talker',
                    node_name='talker',
                    extra_arguments=[{'use_intra_process_comms': True}]),
                ComposableNode(
                    package='composition',
                    node_plugin='composition::Listener',
                    node_name='listener',
                    extra_arguments=[{'use_intra_process_comms': True}])
            ],
            output='screen',
    )

I think that this was introduced in Eloquent.

I'm not sure if this is possible from the command line.

This is possible from a launch file using extra_arguments, e.g.:

def generate_launch_description():
    """Generate launch description with multiple components."""
    container = ComposableNodeContainer(
            node_name='my_container',
            node_namespace='',
            package='rclcpp_components',
            node_executable='component_container',
            composable_node_descriptions=[
                ComposableNode(
                    package='composition',
                    node_plugin='composition::Talker',
                    node_name='talker',
                    extra_arguments=[{'use_intra_process_comms': True}]),
                ComposableNode(
                    package='composition',
                    node_plugin='composition::Listener',
                    node_name='listener',
                    extra_arguments=[{'use_intra_process_comms': True}])
            ],
            output='screen',
    )

It's also possible to pass extra_arguments on the command line, see documentation at ros2 component load --help.

I think believe that this was introduced in Eloquent.

I'm not sure if this is possible from the command line.