matthew-brett / transforms3d

3 dimensional spatial transformations
http://matthew-brett.github.io/transforms3d/
Other
467 stars 83 forks source link

mat2axangle() should preserve rotation direction #19

Closed EdsterG closed 5 years ago

EdsterG commented 6 years ago

The following sequence of calls shouldn't fail:

mat = transforms3d.axangles.axangle2mat([1,1,1], 4*np.pi/3)
 _, angle = transforms3d.axangles.mat2axangle(mat)
assert angle == 4*np.pi/3, "should be the same"

Looks like axangle2mat is picking the direction based on smallest distance. However, in robotic applications it's important to preserve the direction of rotation encoded in the matrix representation. Preserving the original direction should be default.