argoverse / av2-api

Argoverse 2: Next generation datasets for self-driving perception and forecasting.
https://argoverse.github.io/user-guide/
MIT License
307 stars 71 forks source link

Regarding ego pose transformation matrices #188

Closed SM1991CODES closed 1 year ago

SM1991CODES commented 1 year ago

Hi, I collect the ego pose in city coordinates as: w_T_f0 = frame_0.city_SE3_ego.matrix().numpy()[0] # world -> frame_0

I expect the 4x4 matrix to be orthogonal => inverse should be equal to transpose. However, I see this: image

Please help me understand what am I missing.

benjaminrwilson commented 1 year ago

Hi @SM1991CODES,

The sub-matrix w_T_f0[:3, :3] is orthogonal because w_T_f0.T[:3, :3] equals np.linalg.inv(w_T_f0)[:3, :3]. This corresponds to the 3D rotation that belongs to $SO(3)$ (https://en.wikipedia.org/wiki/Orthogonal_group#Special_orthogonal_group). Why do you expect w_T_f0 to be orthogonal?

SM1991CODES commented 1 year ago

Ah yes, sorry, only rotation part is orthogonal, I missed that part and was taking the whole 4x4 matrix. Got it!! Thanks.