Convert 3d vector of axis-angle rotation to 6d rotation representation. Shape: - Input: :Torch:`(N, 3)` - Output: :Torch:`(N, 6)`
(angle_axis)
| 23 | return rot_mat |
| 24 | |
| 25 | def axis_angle_to_rot6d(angle_axis): |
| 26 | """Convert 3d vector of axis-angle rotation to 6d rotation representation. |
| 27 | Shape: |
| 28 | - Input: :Torch:`(N, 3)` |
| 29 | - Output: :Torch:`(N, 6)` |
| 30 | """ |
| 31 | rot_mat = tgm.angle_axis_to_rotation_matrix(angle_axis) # 4x4 rotation matrix |
| 32 | rot6d = rot_mat[:, :3, :2] |
| 33 | rot6d = rot6d.reshape(-1, 6) |
| 34 | |
| 35 | return rot6d |
| 36 | |
| 37 | def rot6d_to_axis_angle(rot6d): |
| 38 | """Convert 6d rotation representation to 3d vector of axis-angle rotation. |
no outgoing calls
no test coverage detected