Ask Your Question

Revision history [back]

You can replace the string concatenation with an array, e.g.:

import launch
from launch.actions import DeclareLaunchArgument, LogInfo
from launch.substitutions import LaunchConfiguration


def generate_launch_description():
    return launch.LaunchDescription([
        DeclareLaunchArgument('id', default_value='75', description='an id'),
        DeclareLaunchArgument('target', default_value=['robot_', LaunchConfiguration('id'), '/target']),
        LogInfo(msg=LaunchConfiguration('target'))
    ])