0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ros2のbagをcsvに変換する

Last updated at Posted at 2024-07-05

本記事では,ros2のbagファイルをcsvに変換する方法を説明します.

・ros2bag_to_csvをコマンドで実行する方法

(execute)

ros2 topic echo /nmea_1/nmea_sentence nmea_msgs/msg/Sentence --csv --qos-history keep_all --qos-reliability reliable > nmea_output.csv 
ros2 topic echo /localization/gnss/pose_with_covariance geometry_msgs/msg/PoseWithCovarianceStamped --csv --qos-history keep_all --qos-reliability reliable > gnss.csv
ros2 topic echo /localization/pose_estimator/pose_with_covariance geometry_msgs/msg/PoseWithCovarianceStamped --csv --qos-history keep_all --qos-reliability reliable > ndt.csv
ros2 topic echo /localization/pose_twist_fusion_filter/biased_pose_with_covariance geometry_msgs/msg/PoseWithCovarianceStamped --csv --qos-history keep_all --qos-reliability reliable > ekf.csv

(example)

ros2 topic echo /YOUR_TOPIC your_msgs/msg/YourMsgType --csv --qos-history keep_all --qos-reliability reliable > output.csv

(execute)

ros2 bag play -r 100 '/home/megken/rosbag2_2024_06_11-19_34_20' 

(example)

ros2 bag play -r 100 YOUR_BAG_DIR

参考URL
https://zenn.dev/xen_nippon/articles/0ae35719f6cc44

・NMEAセンテンスについて
参考URL
https://ales-corp.co.jp/technical-information-nmea/

・DEG形式からDMM形式変換
参考URL
https://www.tokyo2show.co.jp/knowledge/?p=15

0
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
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?