Pytorch3d: euler_angles_to_matrix and matrix_to_euler_angles is not consistant?

Created on 18 Apr 2020  ·  2Comments  ·  Source: facebookresearch/pytorch3d

Hi,
I use following code to convert a matrix to euler and back,
BEFORE = MATRIX EULER = matrix_to_euler_angles(BEFORE, "XYZ") AFTER = euler_angles_to_matrix(EULER, "XYZ" )

And got that:
AFTER tensor([[[ 0.8888, 0.0357, -0.4569], [-0.4552, 0.1834, -0.8713], [ 0.0528, 0.9824, 0.1793]]], device='cuda:0',) BEFORE tensor([[[ 0.8888, 0.1516, -0.4325], [-0.4552, 0.1834, -0.8713], [ 0.0528, -0.9713, -0.2321]]], device='cuda:0')
The rotation matix has been changed after this opratiom. It is that I miss something, or the convertion method "XYZ" is wrong?

question

All 2 comments

The original MATRIX, BEFORE, is not a rotation matrix. Its determinant is approximately -1. It therefore does not make sense to express it in euler angles.

Thanks! That is right!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eliemichel picture eliemichel  ·  3Comments

OOF-dura picture OOF-dura  ·  3Comments

udemegane picture udemegane  ·  3Comments

ldepn picture ldepn  ·  3Comments

zhjscut picture zhjscut  ·  3Comments