warp.quat_to_rpy#
- warp.quat_to_rpy(q: quatf) vec3f[source]#
Return the roll, pitch, and yaw angles in radians of the rotation
q.This is the inverse of
quat_rpy(), which applies roll, pitch, and yaw in that order about the fixedx,y, andzaxes (extrinsic x-y-z).Near gimbal lock, where pitch approaches
pi/2or-pi/2, the returned roll and yaw are inaccurate and might not reproduceq.quat_to_euler(q, 0, 1, 2)uses the same convention and handles gimbal lock.- Parameters:
q – Rotation quaternion, with unit length.
- Returns:
(roll, pitch, yaw)in radians, with roll and yaw in[-pi, pi]and pitch in[-pi/2, pi/2].- Return type: