diff --git a/docsource/source/index.rst b/docsource/source/index.rst index 7aeeb67..888d629 100644 --- a/docsource/source/index.rst +++ b/docsource/source/index.rst @@ -58,8 +58,8 @@ Rotation matrix (rotmat) - We use column-vector convention, i.e. :math:`R X` is the transformation of a 1xD vector :math:`X` by a rotation matrix :math:`R`. Euler and Tait-Bryan angles (euler) - - Encoded as a ...xD tensor (with D=3 for typical Euler angle conventions) or a list of D tensors corresponding to each angle. - - We provide mappings between Euler angles and other rotation representations (use an other representation for actual computations). + - Encoded as a ...xD tensor or a list of D tensors corresponding to each angle (D=3 for typical Euler angles conventions). + - We provide mappings between Euler angles and other rotation representations. To perform actual computations, use an other representation. Mappings between rotation representations diff --git a/roma/euler.py b/roma/euler.py index 44ca312..b6e05b3 100644 --- a/roma/euler.py +++ b/roma/euler.py @@ -29,7 +29,7 @@ def euler_to_unitquat(convention: str, angles, degrees=False, normalize=True, dt or with respect to an 'intrinsic' coordinates system attached to the object under rotation (in which case axes are denoted in uppercase: 'X', 'Y', 'Z'). Intrinsic and extrinsic conventions cannot be mixed. angles (list of floats, list of tensors, or tensor): a list of angles associated to each axis, expressed in radians by default. - If a single tensor is provided, Euler angles are assumed to be stacked along the latest dimension. + If a single tensor is provided, Euler angles are assumed to be stacked along the last dimension. degrees (bool): if True, input angles are assumed to be expressed in degrees. Returns: @@ -65,14 +65,14 @@ def euler_to_unitquat(convention: str, angles, degrees=False, normalize=True, dt unitquats.append(q) return roma.quat_composition(unitquats, normalize=normalize) -def euler_to_rotvec(convention: str, angles : list, degrees=False, dtype=None, device=None): +def euler_to_rotvec(convention: str, angles, degrees=False, dtype=None, device=None): """ Convert Euler angles to rotation vector representation. Args: convention (string): 'xyz' for example. See :func:`~roma.euler.euler_to_unitquat()`. angles (list of floats, list of tensors, or tensor): a list of angles associated to each axis, expressed in radians by default. - If a single tensor is provided, Euler angles are assumed to be stacked along the latest dimension. + If a single tensor is provided, Euler angles are assumed to be stacked along the last dimension. degrees (bool): if True, input angles are assumed to be expressed in degrees. Returns: @@ -80,14 +80,14 @@ def euler_to_rotvec(convention: str, angles : list, degrees=False, dtype=None, d """ return roma.unitquat_to_rotvec(euler_to_unitquat(convention=convention, angles=angles, degrees=degrees, dtype=dtype, device=device)) -def euler_to_rotmat(convention: str, angles : list, degrees=False, dtype=None, device=None): +def euler_to_rotmat(convention: str, angles, degrees=False, dtype=None, device=None): """ Convert Euler angles to rotation matrix representation. Args: convention (string): 'xyz' for example. See :func:`~roma.euler.euler_to_unitquat()`. angles (list of floats, list of tensors, or tensor): a list of angles associated to each axis, expressed in radians by default. - If a single tensor is provided, Euler angles are assumed to be stacked along the latest dimension. + If a single tensor is provided, Euler angles are assumed to be stacked along the last dimension. degrees (bool): if True, input angles are assumed to be expressed in degrees. Returns: