Skip to content

Commit

Permalink
Doc update
Browse files Browse the repository at this point in the history
  • Loading branch information
Romain BRÉGIER committed Apr 23, 2024
1 parent 319d130 commit 9f648f9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions docsource/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions roma/euler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -65,29 +65,29 @@ 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:
a batch of rotation vectors (...x3 tensor).
"""
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:
Expand Down

0 comments on commit 9f648f9

Please sign in to comment.