Skip to main content

Matrix Lie groups in JAX

Project description

jaxlie

build mypy lint codecov pypi_dowlnoads

[ API reference ] [ PyPI ]

jaxlie is a library containing implementations of Lie groups commonly used for rigid body transformations, targeted at computer vision & robotics applications written in JAX. Heavily inspired by the C++ library Sophus.

We implement Lie groups as high-level (data)classes:

Group Description Parameterization
jaxlie.SO2 Rotations in 2D. (real, imaginary): unit complex (∈ S1)
jaxlie.SE2 Proper rigid transforms in 2D. (real, imaginary, x, y): unit complex & translation
jaxlie.SO3 Rotations in 3D. (qw, qx, qy, qz): wxyz quaternion (∈ S3)
jaxlie.SE3 Proper rigid transforms in 3D. (qw, qx, qy, qz, x, y, z): wxyz quaternion & translation

Where each group supports:

  • Forward- and reverse-mode AD-friendly exp(), log(), adjoint(), apply(), multiply(), inverse(), identity(), from_matrix(), and as_matrix() operations. (see ./examples/se3_example.py)
  • Taylor approximations near singularities.
  • Helpers for optimization on manifolds (see ./examples/se3_optimization.py, jaxlie.manifold.*).
  • Compatibility with standard JAX function transformations. (see ./examples/vmap_example.py)
  • Broadcasting for leading axes.
  • (Un)flattening as pytree nodes.
  • Serialization using flax.

We also implement various common utilities for things like uniform random sampling (sample_uniform()) and converting from/to Euler angles (in the SO3 class).


Install (Python >=3.7)

# Python 3.6 releases also exist, but are no longer being updated.
pip install jaxlie

Misc

jaxlie was originally written when I was learning about Lie groups for our IROS 2021 paper (link):

@inproceedings{yi2021iros,
    author={Brent Yi and Michelle Lee and Alina Kloss and Roberto Mart\'in-Mart\'in and Jeannette Bohg},
    title = {Differentiable Factor Graph Optimization for Learning Smoothers},
    year = 2021,
    BOOKTITLE = {2021 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jaxlie-1.5.0.tar.gz (26.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jaxlie-1.5.0-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

File details

Details for the file jaxlie-1.5.0.tar.gz.

File metadata

  • Download URL: jaxlie-1.5.0.tar.gz
  • Upload date:
  • Size: 26.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for jaxlie-1.5.0.tar.gz
Algorithm Hash digest
SHA256 d9981df6e1cc6a63c6c65d647c2f4848685afd10f725f4964b7e68a1b434c3df
MD5 5bdd426ccf1bab3ce3686fb152fce0af
BLAKE2b-256 30edc7c701f5635d7e276d0ccba2e28fc0259d23474593b9028f3707f4c4e5f2

See more details on using hashes here.

File details

Details for the file jaxlie-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: jaxlie-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 24.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for jaxlie-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 44cc55aab07f9ee49e681e7f2a957338337f548fa4d53e81450f563273757a96
MD5 917c89738d22a1b0fde1bf2c4eb82dfe
BLAKE2b-256 06cf9084fbc451c3773e6623b94b18b40e949479c567c9af8dea4d23484c0336

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page