math - Python: Rotation Matrix to Angles -
given rotation matrix
| r00 r01 r02 | r = | r10 r11 r12 | | r20 r21 r22 | and specific rotation sequence 'abc' a, b, c taken 'xyz'. there general solution (for arbitrary rotation sequence) available in python translate rotation matrix rotation angles around x, y, , z axis?
it seems every rotation sequence has separate solution. given sequence "zyx" resulting symbolic expression rotation matrix is
| cy cz -cy sz sy | rxyz = │ sx sy cz + cx sz -sx sy sz + cx cz -sx cy │ | -cx sy cz + sx sz cx sy sz + sx cz cx cy | with c , s cosine , sine. x, y, z indices note rotation around x, y, , z axis. that, set of equations may derived, namely:
cy cz = r00 - cy sz = r01 - sx cy = r02 sx sy cz + cx sz = r10 ... those need resolved @ least 1 angle expression each axis. then, 'arcsin' or 'arccos' applied real angle. seems symbolic math needs performed each sequence separately.
Comments
Post a Comment