After some research, for now, I understand scipy
has right-handed axis coordinate system, and left-handed rotation.
For example
from scipy.spatial.transform import Rotation as R
np.array([0,1,0]) @ R.from_euler("XYZ", [0,0,30], degrees=True).as_matrix() # should be [0.5,sqrt(3)/2,0]
But I can not figure out the different between extrinsic
and intrinsic
rotation.
For my understanding.
extrinsic
should use a fixed axis, and intrinsic
should use rotatable axis.
So, if I understand this correctly.
Here "XYZ" means intrinsic rotation
, you can find it at the official doc
# should be [-0.5,sqrt(3)/2,-1]
# But it is [0.5,sqrt(3)/2,-1], seems like the `extrinsic rotation`
np.array([0,1,1]) @ R.from_euler("YZX", [180,30,0], degrees=True).as_matrix()
# should be [0.5,sqrt(3)/2,-1]
# But it is [-0.5,sqrt(3)/2,-1], seems like the `intrinsic rotation`
np.array([0,1,1]) @ R.from_euler("yzx", [180,30,0], degrees=True).as_matrix()
Am I misunderstand this?