rosbag loading specific messages

2 ビュー (過去 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 Center および File ExchangeSpecialized Messages についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by