Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

JAXsim

A scalable physics engine and multibody dynamics library implemented with JAX. With JIT batteries 🔋

[!WARNING] This project is still experimental, APIs could change without notice.

[!NOTE] This simulator currently focuses on locomotion applications. Only contacts with ground are supported.

Features

  • Physics engine in reduced coordinates implemented with JAX in Python.
  • JIT compilation of Python code for increased performance.
  • Transparent support to execute logic on CPUs, GPUs, and TPUs.
  • Parallel multi-body simulations on hardware accelerators for significantly increased throughput.
  • Support for SDF models (and, upon conversion, URDF models).
  • Collision detection between bodies and uneven ground surface.
  • Soft contacts model supporting full friction cone and sticking / slipping transition.
  • Complete support for inertial properties of rigid bodies.
  • Revolute, prismatic, and fixed joints support.
  • Integrators: forward Euler, semi-implicit Euler, Runge-Kutta 4.
  • High-level classes for object-oriented programming.
  • High-level classes to compute multi-body dynamics quantities from the simulation state.
  • High-level classes wrapping the low-level functional RBDAs with support of multiple velocities representations.
  • Default validation of JAX pytrees to prevent JIT re-compilations.
  • Preliminary support for automatic differentiation of RBDAs.

Documentation

The JAXsim API documentation is available at jaxsim.readthedocs.io.

Installation

You can install the project using conda:

conda install jaxsim -c conda-forge

Alternatively, you can use pypa/pip, preferably in a virtual environment:

pip install jaxsim

Check setup.cfg for the complete list of optional dependencies. Install all of them with jaxsim[all].

Note: For GPU support, follow the official installation instructions of JAX.

Quickstart

Explore and learn how to use the library through practical demonstrations available in the examples folder.

Credits

The physics module of JAXsim is based on the theory of the Rigid Body Dynamics Algorithms book by Roy Featherstone. We structured part of our logic following its accompanying code. The physics engine is developed entirely in Python using JAX.

The inspiration for developing JAXsim originally stemmed from early versions of google/brax. Here below we summarize the differences between the projects:

  • JAXsim simulates multibody dynamics in reduced coordinates, while brax v1 uses maximal coordinates.
  • The new v2 APIs of brax (and the new MJX) were then implemented in reduced coordinates, following an approach comparable to JAXsim, with major differences in contact handling.
  • The rigid-body algorithms used in JAXsim allow to efficiently compute quantities based on the Euler-Poincarè formulation of the equations of motion, necessary for model-based robotics research.
  • JAXsim supports SDF (and, indirectly, URDF) models, assuming the model is described with the recent Pose Frame Semantics.
  • Contrarily to brax, JAXsim only supports collision detection between bodies and a compliant ground surface.
  • The RBDAs of JAXsim support automatic differentiation, but this functionality has not been thoroughly tested.

Contributing

We welcome contributions from the community. Please read the contributing guide to get started.

Citing

@software{ferigo_jaxsim_2022,
  author = {Diego Ferigo and Silvio Traversaro and Daniele Pucci},
  title = {{JAXsim}: A Physics Engine in Reduced Coordinates and Multibody Dynamics Library for Control and Robot Learning},
  url = {http://github.com/ami-iit/jaxsim},
  year = {2022},
}

People

Author Maintainers

License

BSD3

Metadata

Release files for jaxsim 0.2.dev388

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jaxsim 0.2.dev388
File Size Uploaded
jaxsim-0.2.dev388.tar.gz 178.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jaxsim 0.2.dev388
File Interpreter ABI Platform
jaxsim-0.2.dev388-py3-none-any.whl Python 3 none any Details

Total release size: 294.3 kB

Release files / jaxsim-0.2.dev388.tar.gz

Download URL jaxsim-0.2.dev388.tar.gz
Size 178.3 kB
Tags Source
SHA-256 checksum
How to use checksums
792413adfcafbbe4eb4c028ca3cfcddbac8dbc03631a46c2ea060f51dee3af30
BLAKE2b-256 checksum
How to use checksums
becca5ab76f8c06bd26d08dc8ca2877d31a9a51381f0230c426fe6e80666bd9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.2

Release files / jaxsim-0.2.dev388-py3-none-any.whl

Download URL jaxsim-0.2.dev388-py3-none-any.whl
Size 116.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c909ca28c85d63a3cdc7ccd628d0d5a125226bd6ee86e3b3da605396f11a4d92
BLAKE2b-256 checksum
How to use checksums
0b01af44f59fe3219f1fb579df06cdfbbab65b14381c87053a438daf7287594a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.2

Release history Release notifications | RSS feed

0.9.0

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

This release

0.2.dev388 This release

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page