SJTU-ViSYS / M2DGR

M2DGR: a Multi-modal and Multi-scenario Dataset for Ground Robots(RA-L2021 & ICRA2022)
MIT License
838 stars 110 forks source link

Quaternion rotation jumps in MoCap data #54

Closed adaruna3 closed 1 year ago

adaruna3 commented 1 year ago

Hi,

Thank you for providing this dataset. I am interested in using the MoCap and IMU data for the indoor part of the dataset.

I have noticed that the MoCap data randomly experiences large jumps in values of the quaternion rotations. Are these errors due to the MoCap system? Or is there some sporadic gimbal lock phenomenon I should account for?

Once specific instance is on lines 150-165 of the ground truth data for room_01.txt. See the below lines in the screen shot: image

This is not the only instance for that trajectory. There are many instances of such jumps in this trajectory as well as all trajectories using the MoCap for ground truth. Here I have plotted the positions of the MoCap frame and Realsense 435i IMU frame. You can see the MoCap frame (green) is steady while the Realsense 435i IMU frame (red) jumps randomly above and below the MoCap frame. mocap_no_filter_room_01

I am more certain this is not an error in my code. If I add a simple filter that removes the MoCap data which sporadically jumps using the following lines of code... image (1)

... then the trajectories align well: mocap_with_filter_room_01_b

Since I would prefer to keep these data points, is there some issue with the MoCap that you know of which I can account for this using a few lines of code? I am considering trying some guesses at 180 degree rotations until I find a close enough rotational alignment with the trajectory.

Thanks for your time and efforts!! Angel

sjtuyinjie commented 1 year ago

Thanks for your comment. The mocap system sometimes might not track the robot well, leading to an abrupt change in quaternions. It is strongly recommended that you use a filter for more accurate data