archimedes.spatial.quaternion_to_eulerΒΆ
- archimedes.spatial.quaternion_to_euler(q: ndarray, seq: str = 'xyz') ndarrayΒΆ
Convert unit quaternion to roll-pitch-yaw Euler angles.
This method uses the same notation and conventions as the SciPy Rotation class. See the SciPy documentation and
euler_to_quaternion()for more details.The algorithm is based on the method described in [1] as implemented in SciPy.
- Parameters:
q (array_like, shape (4,)) β Unit quaternion representing rotation, in the format [q0, q1, q2, q3] where q0 is the scalar part.
seq (str, optional) β Sequence of axes for Euler angles (default is βxyzβ).
- Returns:
Euler angle sequence corresponding to the quaternion.
- Return type:
np.ndarray, shape (3,)
References