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

Revision history [back]

Please modify your launch file with the following content:

#!/usr/bin/env python
# -*- coding: utf-8 -*-

from launch import LaunchDescription
from launch.actions import ExecuteProcess


def generate_launch_description():
    return LaunchDescription(
        [
            ExecuteProcess(
                cmd=[
                    "ros2",
                    "bag",
                    "play",
                    "--loop",
                    "path/to/bag.db3",
                ],
                output="screen",
            )
        ]
    )

The above answer is taken from here.