Convert Pose Format
SUMMARY
convert_pose_format converts a pose's rotation component between deg, rad, quat, and rotvec, leaving the position unchanged.
UNITS
The pose's position component is in meters, in both the input and the output. Rotation is in degrees ("deg"), radians ("rad"/"rotvec"), or unitless ("quat").
The Skill
python
pose_rad = tfutils.convert_pose_format([0, 0, 0, 90, 90, 180], "deg", "rad")Parameter Configuration
| Parameter | Type | Default | Description |
|---|---|---|---|
pose | list | required | Position plus rotation, at least 6 elements: [x, y, z, ...]. |
in_rot_type | str | required | Rotation type of pose, one of "deg", "rad", "quat", "rotvec". |
out_rot_type | str | required | Desired rotation type of the returned pose. |
Returns
| Type | Description |
|---|---|
list | The pose with its rotation converted to out_rot_type, position unchanged. |
Raises
| Exception | Condition |
|---|---|
TypeError | pose is not a list. |
ValueError | pose has fewer than 6 elements. |
TypeError | in_rot_type or out_rot_type is not a string. |
ValueError | in_rot_type or out_rot_type is not one of "deg", "rad", "quat", "rotvec". |