e3x.so3.rotations.euler_angles_from_rotation

e3x.so3.rotations.euler_angles_from_rotation(rot)[source]

Extracts Euler angles from a rotation matrix.

This function returns three values a, b, and c, corresponding to angles (in radians) for counterclockwise rotation about the x-, y-, and z-axes. The rotation about Euler angles is assumed to be performed in x, y, z order. See also rotation_euler for constructing rotation matrices from Euler angles and the conventions used.

Parameters:

rot (<class 'Float[Array, '... 3 3']'>) – An Array of shape (…, 3, 3) representing \(3\times3\) rotation matrices.

Return type:

Tuple[Float[Array, '...'], Float[Array, '...'], Float[Array, '...']]

Returns:

A tuple (a, b, c) representing the three Euler angles. Each entry in the tuple has shape (…).

Raises:

ValueError – If rot does not have shape (…, 3, 3).