LoginSignup
2
1

More than 3 years have passed since last update.

【ROS2】python形式のlaunchでbagファイルを再生する方法

Posted at

はじめに

ROS2のlaunch.pyでbagファイルを再生する方法について記述します.

テスト環境

  • Ubuntu 18.04
  • ROS Eloquent

bagの再生の方法

import launch

def generate_launch_description():
    return launch.LaunchDescription([
        launch.actions.ExecuteProcess(
            cmd=['ros2', 'bag', 'play', 'your_bag_dir'],
            output='screen'
        )
    ])

関連記事

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1