Convert rotations given as axis/angle to rotation matrices. Args: axis_angle: Rotations given as a vector in axis angle form, as a tensor of shape (..., 3), where the magnitude is the angle turned anticlockwise in radians around the vector's dire
(axis_angle: torch.Tensor)
| 473 | |
| 474 | |
| 475 | def axis_angle_to_matrix(axis_angle: torch.Tensor) -> torch.Tensor: |
| 476 | """ |
| 477 | Convert rotations given as axis/angle to rotation matrices. |
| 478 | |
| 479 | Args: |
| 480 | axis_angle: Rotations given as a vector in axis angle form, |
| 481 | as a tensor of shape (..., 3), where the magnitude is |
| 482 | the angle turned anticlockwise in radians around the |
| 483 | vector's direction. |
| 484 | |
| 485 | Returns: |
| 486 | Rotation matrices as tensor of shape (..., 3, 3). |
| 487 | """ |
| 488 | return quaternion_to_matrix(axis_angle_to_quaternion(axis_angle)) |
| 489 | |
| 490 | |
| 491 |
no test coverage detected