jaxlie._so2

Module Contents

Classes

SO2

Special orthogonal group for 2D rotations. Broadcasting rules are the

class jaxlie._so2.SO2(parameters)[source]

Bases: jaxlie.SOBase

Inheritance diagram of jaxlie.SO2

Special orthogonal group for 2D rotations. Broadcasting rules are the same as for numpy.

Internal parameterization is (cos, sin). Tangent parameterization is (omega,). .. py:attribute:: unit_complex

type:

jax.Array

Internal parameters. (cos, sin). Shape should be (*, 2).

__repr__()[source]

Return repr(self).

Return type:

str

static from_radians(theta)[source]

Construct a rotation object from a scalar angle.

Parameters:

theta (jaxlie.hints.Scalar) –

Return type:

SO2

as_radians()[source]

Compute a scalar angle from a rotation object.

Return type:

jax.Array

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:

SO2

classmethod from_matrix(matrix)[source]

Get group member from matrix representation.

Parameters:

matrix (jaxlie.hints.Array) – Matrix representaiton.

Returns:

Group member.

Return type:

SO2

as_matrix()[source]

Get transformation as a matrix. Homogeneous for SE groups.

Return type:

jax.Array

parameters()[source]

Get underlying representation.

Return type:

jax.Array

apply(target)[source]

Applies group action to a point.

Parameters:

target (jaxlie.hints.Array) – Point to transform.

Returns:

Transformed point.

Return type:

jax.Array

multiply(other)[source]

Composes this transformation with another.

Returns:

self @ other

Parameters:

other (SO2) –

Return type:

SO2

classmethod exp(tangent)[source]

Computes expm(wedge(tangent)).

Parameters:

tangent (jaxlie.hints.Array) – Tangent vector to take the exponential of.

Returns:

Output.

Return type:

SO2

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

inverse()[source]

Computes the inverse of our transform.

Returns:

Output.

Return type:

SO2

normalize()[source]

Normalize/projects values and returns.

Returns:

Normalized group member.

Return type:

SO2

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:

SO2