rosbag loading specific messages

6 views (last 30 days)
Morten Nissov
Morten Nissov on 7 Mar 2019
I am curious if there's a better way to load information from ROS bag files.
My current work flow is:
bag = rosbag(FILE_LOCATION)
bagSel = select(bag,'Topic','/mavros/imu/data')
X_imu_raw = timeseries(bagSel)
t_imu_angvel = X_imu_raw.Time - bag.StartTime
X_imu_angvel = X_immu_raw.Data(:,8:10) % problem line
When having to load a lot of different message sets this becomes very cumbersome. I'm not sure how to pull sets of messages from the timerseries, for example I could write:
and it will return the angular velocity around the X axis. I would ideally like to write something like:
and pull all of the angular velocity messages from the topic (x,y, and z) but i'm not sure if it is possible nor how to do it?

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by