url-kaist / kaistviodataset

"Visual-Inertial Dataset" (RA-L'21 with ICRA'21): it contains harsh motions for VO/VIO, like pure rotation or fast rotation with various motion types.
GNU General Public License v3.0
75 stars 7 forks source link

What is orientation.w in the dataset? #6

Closed HimGautam closed 2 years ago

HimGautam commented 2 years ago

Hi, I am trying to write ekf using your dataset. I had a few queries about your dataset:

  1. Are the values of orientation in IMU section obtained after filtering, for e.g. by Extended Kalman Filter?
  2. Your orientation values in IMU section and in Motion Capture section is not synchronised. Is there a way to synchronise them for use in state estimation process?
  3. What is the orientation.w in both IMU and Motion Capture section of the dataset?

Thanks Himanshu

zinuok commented 2 years ago

Dear HimGautam,

sorry for the late reply.

  1. the orientation values in /mavros/imu/data are obtained through filtering in the AHRS in Pixhawk. However, the linear acceleration values are raw sensor data. (you can refer mavros QnA 1 and mavros QnA 2)
  2. What do you mean by synchronized? If it's about time, you can either get the closest timestamp or just linearly interpolate the data. (since IMU values ​​can be linearly approximated)
  3. As you know, w usually stands for the real part of a quaternion. Because the coordinate systems of IMU and motion capture are different, the w value in the two topics will be different.

As for question 3, I do not know where and how you will use the w, but the direction perpendicular to gravity is unobservable with the IMU raw sensor data alone. This is why the general VIO system estimates the state by considering the initial body frame as the world frame after finding the gravity direction first. For VIO performance evaluation, tools such as evo or rpg are mainly used to align ground truth and estimation (using SVD or inverse transformations; you may have to use this way for your work). Unfortunately, therefore, the direct transformation between motion capture and IMU coordinates is not provided.

Thank you

HimGautam commented 2 years ago

Hi @zinuok,

Thank you for replying. I am about to implement Extended Kalman Filter using your dataset. While analysing it, I found that your IMU gave the data at a frequency of 100Hz while your Motion Capture System was at 50 Hz. So, suppose I have orientation value O1_MOCAP from motion capture system. Now I want to know which IMU value is the one corresponding to my O1_MOCAP value. In short, I have to reduce the datapoints of IMU such that number of datapoints in IMU and Motion Capture System are the same. So how do I do that?

zinuok commented 2 years ago

Dear @HimGautam

In those two ROS messages(IMU and Mocap:GT), you can find the timestamp for each message. Using that, you should compare the time difference between two messages and find the IMU message whose timestamp is nearest to each Mocap time

zinuok commented 2 years ago

@HimGautam you can refer to this VINS-Mono code for your synchronization & data association.

If you have any other questions or comments, please feel free to re-open this issue :)

Sincerely, Jinwoo Jeon

HimGautam commented 2 years ago

Hi @zinuok, While implementing EKF for attitude estimation, I encountered the matrices Q (process covariance) and R (measurement covariance). I read somewhere that R matrix comes with the IMU. So can you tell me the R matrix values. Also, it will be really helpful if you can help me with Q matrix also.

Thanks, Himanshu

zinuok commented 2 years ago

@HimGautam Actually, I have no experience in implementing EKF. So the followings are just my recommendations.

However, I can give you an example repository which implemented EKF attitude estimation from IMU data: EKF-attitude

HimGautam commented 2 years ago

So I am using the acceleration values as measurement. I've use the covariance matrix as the covariance of acceleration but its not working. What should be the initial value of Q? Also, what coordinate system have you used. Is it North East Down (NED) or is it East North Up (ENU) ?

zinuok commented 2 years ago

Sorry for the late replay, the IMU in our ROS bag is recorded via MAVROS, which translates NED frames for usual aerospace system to ENU frames for ROS.