Wednesday 23 December 2015

How to extract data from ROS bag

Extracting image from ros bag can use call back function directly and save the image. To save the data in text file, such as the camera matrix, rosbag play and then use the following command according to this

rostopic echo -p /camera/camera_info > data.txt

If you want to save a lot of data, such as the information from imu, see here

in the bag directory, run

rostopic echo -p -b airground_rig_s3_2013-03-18_21-38-48.bag /imu/data >imu.csv

and then you can open imu.csv in matlab.

No comments:

Post a Comment