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

Revision history [back]

Ok so it should be:

remap = '<old_topic>:=<new_topic>'
LaunchDescription(
    [
        ExecuteProcess(
            cmd=['ros2', 'bag', 'play', rosbag_file, '--remap', remap],
            output='screen'
        ),
        ReadyToTest(),
    ]

And for multiple remaps:

remap1 = '<old_topic>:=<new_topic>'
remap2 = '<old_topic>:=<new_topic>'
LaunchDescription(
    [
        ExecuteProcess(
            cmd=['ros2', 'bag', 'play', rosbag_file, '--remap', remap1, remap2],
            output='screen'
        ),
        ReadyToTest(),
    ]