ronin icon indicating copy to clipboard operation
ronin copied to clipboard

Difference between the global frames of 3d tracking phone and IMU phone?

Open TianweiXing opened this issue 3 years ago • 2 comments

Thanks for the nice work and repo. I have a question about Equ(1) in the RoNIN paper' Supplementary Material: it says we need to find the rotation from WI to WT. But I don't quite understand why these two coordinate frames are different? (I know the WT is the coordinate frame where ground-truth trajectories are defined on, but isn't WI the same global coordinate?)

I think the raw acc/gyro data are collected in IMU phone device coordinate. So when converting acc/gyro into the global coordinate frame, can I just use R_(LI)^(WI) directly?

And lastly, is the relative rotation R_(LI)^(LT) a fixed rotation? Or is it changing constantly during user's movement? When looking at this code: https://github.com/Sachini/ronin/blob/142e0e34c383eb6b824550a245ea4ad682025ec6/source/data_glob_speed.py#L56 I think the rotation here is constant. Is that correct?

Thanks a lot!

TianweiXing avatar Oct 12 '21 00:10 TianweiXing

We use the game rotation vector to get R_L^W and while Z axis of W_I and W_T are aligned along gravity direction, X and Y are chosen randomly at the start. Therefore the east and west axes are not the same across different sessions or devices.

You can use R_(LI)^(WI) directly during inference. But if you need to compare with groundtruth (in training/testing) they need to be in same coordinate frame, therefore the transformation is needed.

R_(LI)^(LT) is computed by a special calibration process in the start of data collection which is stored as 'start_calibration' which is used to compute R_(WI)^(WT). After that since there's relative motion between devices R_(LI)^(LT) is not a constant but R_(WI)^(WT) is.

Sachini avatar Oct 12 '21 17:10 Sachini

Hi, Many thanks for the explanation of these terms. If my thinking is correct, R_(WI)^(WT) is a rotation about the global z-direction (heading) since W_I and W_T have the same, or at least very similar, pitch and roll angles (inclination/ attitude if you like). The spatial alignment procedure carried out before the start of the sequence effectively finds the rotation matrix/ quaternion that aligns the sensor axes of the two devices (it is then stored in start_calibration) and is used to 'reveal' the heading correction required to align W_I with W_T. This transformation occurs on ln. 58 of data_glob_speed: ori_q = init_rotor * ori_q All the best, D.

DMaton avatar Dec 07 '21 22:12 DMaton