How to run composable node launch file in debug mode with gdb

asked 2023-05-15 07:17:46 -0600

bvbdort gravatar image

I am using ros2 foxy. My launch file is similar to the following. How to run the nodes talker and listener in debug mode using gdb. With regular nodes, it can be done with 'prefix' argument. How can we do it with the composable node in launch file.

import launch
from launch_ros.actions import ComposableNodeContainer
from launch_ros.descriptions import ComposableNode


def generate_launch_description():
    """Generate launch description with multiple components."""
    container = ComposableNodeContainer(
            name='my_container',
            namespace='',
            package='rclcpp_components',
            executable='component_container',
            composable_node_descriptions=[
                ComposableNode(
                    package='composition',
                    plugin='composition::Talker',
                    name='talker'),
                ComposableNode(
                    package='composition',
                    plugin='composition::Listener',
                    name='listener')
            ],
            output='screen',
    )

    return launch.LaunchDescription([container])
edit retag flag offensive close merge delete

Comments

I also have the doubt

SS6141 gravatar image SS6141  ( 2023-06-16 05:04:18 -0600 )edit