MCPcopy Create free account
hub / github.com/MotrixLab/insactor / axis_angle_to_matrix

Function axis_angle_to_matrix

data/rotation_utils/conversions.py:475–488  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

473
474
475def 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

Callers 2

kitml_converter.pyFile · 0.85

Calls 2

axis_angle_to_quaternionFunction · 0.85
quaternion_to_matrixFunction · 0.70

Tested by

no test coverage detected