Robotics StackExchange | Archived questions

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

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])

Asked by bvbdort on 2023-05-15 07:17:46 UTC

Comments

I also have the doubt

Asked by SS6141 on 2023-06-16 05:04:18 UTC

Answers