ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

I believe I've answered my own question. I got it to work by adding a launch_arguments argument to the IncludeLaunchDescription command:

Before:

ld = IncludeLaunchDescription(
    launch.launch_description_sources.PythonLaunchDescriptionSource(
        os.path.join(pkg_prefix, 'B.launch.py')))

After:

ld = IncludeLaunchDescription(
    launch.launch_description_sources.PythonLaunchDescriptionSource(
        os.path.join(pkg_prefix, 'B.launch.py')),
    launch_arguments={
        'parameter_name1': 'parameter_value1',
        'parameter_name2': 'parameter_value2'
    }.items()
)

Note that both parameter name and value are strings. The value can also be a launch.Substitution, but I don't know how those work. The string value works for my purposes.