2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

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 --src /home/megken/0_data/higashiyama_tunnel/bag/2023-10-18_run1.bag --dst /home/megken/0_data/higashiyama_tunnel/converted_bag/
$rosbags-convert --src <input_bag> --dst <output_folder>
$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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?