Skip to content

Convert Rotation Format

SUMMARY

convert_rotation_format converts a rotation between deg, rad, quat, and rotvec representations.

The Skill

python
rotation_rad = tfutils.convert_rotation_format([90, 90, 180], "deg", "rad")

Parameter Configuration

ParameterTypeDefaultDescription
rotationlistrequiredThe rotation to convert.
in_rot_typestrrequiredRotation type of rotation, one of "deg", "rad", "quat", "rotvec".
out_rot_typestrrequiredDesired rotation type of the output.

Returns

TypeDescription
listThe rotation converted to out_rot_type.

Raises

ExceptionCondition
TypeErrorrotation is not a list.
TypeErrorin_rot_type or out_rot_type is not a string.
ValueErrorin_rot_type or out_rot_type is not one of "deg", "rad", "quat", "rotvec".