:orphan: :py:mod:`jaxlie._so2` ===================== .. py:module:: jaxlie._so2 Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: jaxlie.SO2 .. py:class:: SO2(parameters) Bases: :py:obj:`jaxlie.SOBase` .. autoapi-inheritance-diagram:: jaxlie.SO2 :parts: 1 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)``. .. py:method:: __repr__() Return repr(self). .. py:method:: from_radians(theta) :staticmethod: Construct a rotation object from a scalar angle. .. py:method:: as_radians() Compute a scalar angle from a rotation object. .. py:method:: identity(batch_axes = ()) :classmethod: Returns identity element. :param batch_axes: Any leading batch axes for the output transform. :returns: Identity element. .. py:method:: from_matrix(matrix) :classmethod: Get group member from matrix representation. :param matrix: Matrix representaiton. :returns: Group member. .. py:method:: as_matrix() Get transformation as a matrix. Homogeneous for SE groups. .. py:method:: parameters() Get underlying representation. .. py:method:: apply(target) Applies group action to a point. :param target: Point to transform. :returns: Transformed point. .. py:method:: multiply(other) Composes this transformation with another. :returns: self @ other .. py:method:: exp(tangent) :classmethod: Computes ``expm(wedge(tangent))``. :param tangent: Tangent vector to take the exponential of. :returns: Output. .. py:method:: log() Computes ``vee(logm(transformation matrix))``. :returns: Output. Shape should be ``(tangent_dim,)``. .. py:method:: adjoint() Computes the adjoint, which transforms tangent vectors between tangent spaces. More precisely, for a transform ``GroupType``\ : .. code-block:: 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)``. .. py:method:: inverse() Computes the inverse of our transform. :returns: Output. .. py:method:: normalize() Normalize/projects values and returns. :returns: Normalized group member. .. py:method:: jlog() Computes the Jacobian of the logarithm of the group element when a local perturbation is applied. This is equivalent to the inverse of the right Jacobian, or: .. code-block:: jax.jacrev(lambda x: (T @ exp(x)).log())(jnp.zeros(tangent_dim)) where ``T`` is the group element and ``exp(x)`` is the tangent vector. :returns: The Jacobian of the logarithm, having the dimensions ``(tangent_dim, tangent_dim,)`` or batch of these Jacobians. .. py:method:: sample_uniform(key, batch_axes = ()) :classmethod: Draw a uniform sample from the group. Translations (if applicable) are in the range [-1, 1]. :param key: PRNG key, as returned by ``jax.random.PRNGKey()``. :param batch_axes: Any leading batch axes for the output transforms. Each sampled transform will be different. :returns: Sampled group member.