upkie  11.0.0
Open-source wheeled biped robots

◆ rotation_matrix_from_rpy()

np.ndarray upkie.utils.rotations.rotation_matrix_from_rpy ( Tuple[float, float, float]  rpy)

Convert URDF roll-pitch-yaw angles to a rotation matrix.

URDF uses fixed-axis XYZ convention, so the resulting rotation matrix is:

\[ R = R_z(\mathrm{yaw}) R_y(\mathrm{pitch}) R_x(\mathrm{roll}) \]

Parameters
rpyTuple of (roll, pitch, yaw) angles in radians.
Returns
Rotation matrix.