IMU-Data from *.bag-File
Hey there,
I'm sitting here since hours and can't get the information i want to. How I'm trying to: First of all: I'm using Matlab and the Toolbox for ROS. I have a File which is called "xyz.bag" and i want to save the startTime, the angularvelocity, linearacceleration and the rostime in some variables of a new struct.
I tried it like this:
bag.Rosbag = rosbag('xyz.bag');
bag.imutopic = select(bag.Rosbag, 'Topic', 'vectornav/IMU');
imu_data = read_imudata_from_rosbag(bag)
function imu_data=read_imudata_from_rosbag(bag)
imu_data.startTime = ??? <-- tried with bag.Rosbag.StartTime (hadn't worked up to yet) and a lot more function like readMessages an so on
imu_data.angularvelocity = ??? <-- how to get this one?
imu_data.linearacceleration = ??? <--- <-- how to get this one?
imu_data.rostime = ??? <--- <-- how to get this one?
end
Could you help me to get a solution for it? I'm really trying to understand it but i don't know how to get further. It's frustrating no to get any step further.
Thank you very much for every help.