pytransform3d.rotations
.euler_from_matrix#
- pytransform3d.rotations.euler_from_matrix(R, i, j, k, extrinsic, strict_check=True)[source]#
General method to extract any Euler angles from active rotation matrix.
- Parameters:
- Rarray-like, shape (3, 3)
Active rotation matrix
- iint from [0, 1, 2]
The first rotation axis (0: x, 1: y, 2: z)
- jint from [0, 1, 2]
The second rotation axis (0: x, 1: y, 2: z)
- kint from [0, 1, 2]
The third rotation axis (0: x, 1: y, 2: z)
- extrinsicbool
Do we use extrinsic transformations? Intrinsic otherwise.
- strict_checkbool, optional (default: True)
Raise a ValueError if the rotation matrix is not numerically close enough to a real rotation matrix. Otherwise we print a warning.
- Returns:
- euler_anglesarray, shape (3,)
Extracted rotation angles in radians about the axes i, j, k in this order. The first and last angle are normalized to [-pi, pi]. The middle angle is normalized to either [0, pi] (proper Euler angles) or [-pi/2, pi/2] (Cardan / Tait-Bryan angles).
- Raises:
- ValueError
If basis is invalid
References
[1]Shuster, M. D., Markley, F. L. (2006). General Formula for Extracting the Euler Angles. Journal of Guidance, Control, and Dynamics, 29(1), pp 2015-221, doi: 10.2514/1.16622. https://arc.aiaa.org/doi/abs/10.2514/1.16622