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?
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!