LoginSignup
2
0

ros1のbagファイルをros2で使えるようにする!!

Last updated at Posted at 2023-07-10

・まずは,rosbagsをインストールする

$pip3 install rosbags

上記のコマンドを打ち込み,下記のエラーが出力されるかもしれない.
megken@megken-System-Product-Name:~$ pip3 install rosbags
Command 'pip3' not found, but can be installed with:
エラーが発生したら次のコマンドを打ち込んでください

$sudo apt update
$sudo apt install python3-pip

・次に,bagファイルをros2用にするために

$rosbags-convert '変換したいbagファイル'
$export PATH=$PATH:~/.local/bin

⇑rosbags-convertコマンドがないと言われたら打つ

変換後,以下のようなフォルダが作成される.その中に,db3とyamlが入っていれば成功

・実際に動かしてみる

$ros2 bag play '変換後のファイルを挿入'
2
0
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
0