jaxlie._se2
Module Contents
Classes
Special Euclidean group for proper rigid transforms in 2D. Broadcasting |
- class jaxlie._se2.SE2(parameters)[source]
Bases:
jaxlie.SEBase
[jaxlie.SO2
]Special Euclidean group for proper rigid transforms in 2D. Broadcasting rules are the same as for numpy.
Internal parameterization is
(cos, sin, x, y)
. Tangent parameterization is(vx, vy, omega)
. .. py:attribute:: unit_complex_xy- type:
jax.Array
Internal parameters.
(cos, sin, x, y)
. Shape should be(*, 4)
.- static from_xy_theta(x, y, theta)[source]
Construct a transformation from standard 2D pose parameters.
Note that this is not the same as integrating over a length-3 twist.
- Parameters:
x (jaxlie.hints.Scalar) –
y (jaxlie.hints.Scalar) –
theta (jaxlie.hints.Scalar) –
- Return type:
- classmethod from_rotation_and_translation(rotation, translation)[source]
Construct a rigid transform from a rotation and a translation.
- Parameters:
rotation (jaxlie.SO2) – Rotation term.
translation (jaxlie.hints.Array) – translation term.
- Returns:
Constructed transformation.
- Return type:
- classmethod identity(batch_axes=())[source]
Returns identity element.
- Parameters:
batch_axes (jax_dataclasses.Static[Tuple[int, Ellipsis]]) – Any leading batch axes for the output transform.
- Returns:
Identity element.
- Return type:
- classmethod from_matrix(matrix)[source]
Get group member from matrix representation.
- Parameters:
matrix (jaxlie.hints.Array) – Matrix representaiton.
- Returns:
Group member.
- Return type:
- as_matrix()[source]
Get transformation as a matrix. Homogeneous for SE groups.
- Return type:
jax.Array
- classmethod exp(tangent)[source]
Computes
expm(wedge(tangent))
.- Parameters:
tangent (jaxlie.hints.Array) – Tangent vector to take the exponential of.
- Returns:
Output.
- Return type:
- log()[source]
Computes
vee(logm(transformation matrix))
.- Returns:
Output. Shape should be
(tangent_dim,)
.- Return type:
jax.Array
- adjoint()[source]
Computes the adjoint, which transforms tangent vectors between tangent spaces.
More precisely, for a transform
GroupType
:GroupType @ exp(omega) = exp(Adj_T @ omega) @ GroupType
In robotics, typically used for transforming twists, wrenches, and Jacobians across different reference frames.
- Returns:
Output. Shape should be
(tangent_dim, tangent_dim)
.- Return type:
jax.Array
- classmethod sample_uniform(key, batch_axes=())[source]
Draw a uniform sample from the group. Translations (if applicable) are in the range [-1, 1].
- Parameters:
key (jax.Array) – PRNG key, as returned by
jax.random.PRNGKey()
.batch_axes (jax_dataclasses.Static[Tuple[int, Ellipsis]]) – Any leading batch axes for the output transforms. Each sampled transform will be different.
- Returns:
Sampled group member.
- Return type: