MCPcopy Create free account
hub / github.com/MotrixLab/ViMoGen / quaternion_to_axis_angle

Function quaternion_to_axis_angle

motion_rep/rotation_transform.py:82–90  ·  view source on GitHub ↗

Convert 4d quaternion to 3d vector of axis-angle rotation. Shape: - Input: :Torch:`(..., 4)` - Output: :Torch:`(..., 3)`

(quaternion)

Source from the content-addressed store, hash-verified

80 return axis_angle
81
82def quaternion_to_axis_angle(quaternion):
83 """
84 Convert 4d quaternion to 3d vector of axis-angle rotation.
85 Shape:
86 - Input: :Torch:`(..., 4)`
87 - Output: :Torch:`(..., 3)`
88 """
89 angle_axis = tgm.quaternion_to_angle_axis(quaternion)
90 return angle_axis
91
92def axis_angle_to_quaternion(angle_axis):
93 """

Callers 1

quaternion_to_rot6dFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected