Po niektorých výskumov, teraz chápem, scipy
má pravotočivý osi súradnicového systému, a ľavou rukou a rotácie.
Napríklad
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]
Ale nemôžem prísť na to, rozdiel medzi extrinsic
a intrinsic
rotácie.
Pre moje chápanie.
extrinsic
mali použiť pevnú os, a intrinsic
mali používať otočná os.
Takže, ak som to pochopili správne.
Tu "XYZ" znamená intrinsic rotation
môžete ho nájsť na oficiálnej 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()
Som si mylne to?