Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
TianweiXing opened this issue Oct 12, 2021 · 2 comments

Comments

@TianweiXing
Copy link

TianweiXing commented Oct 12, 2021

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:

rot_imu_to_tango = quaternion.quaternion(*self.info['start_calibration'])

I think the rotation here is constant. Is that correct?

Thanks a lot!

@TianweiXing TianweiXing changed the title Difference Difference between the global frames of 3d tracking phone and IMU phone? Oct 12, 2021
@Sachini
Copy link
Owner

Sachini commented Oct 12, 2021

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.

@DMaton
Copy link

DMaton commented Dec 7, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants