rosbag loading specific messages

3 次查看(过去 30 天)
Morten Nissov
Morten Nissov 2019-3-7
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:
timeseries(bagSel,'AngularVelocity.X')
and it will return the angular velocity around the X axis. I would ideally like to write something like:
timeseries(bagSel,'AngularVelocity')
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?

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 ROS Bag File Logging and Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by