Skip to main content

A physics engine in reduced coordinates implemented with JAX.

Project description

JAXsim

A scalable physics engine implemented with JAX. With JIT batteries 🔋

⚠ This project is still experimental, APIs could change without notice. ️⚠

⚠ This simulator currently focuses on locomotion applications. Only contacts with ground are supported. ️⚠

Features

  • Physics engine in reduced coordinates implemented with JAX in Python.
  • Supported JIT compilation of Python code for increased performance.
  • Transparent support to execute the simulation on CPUs, GPUs, and TPUs.
  • Possibility to run parallel multi-body simulations on hardware accelerators for significantly increased throughput.
  • Support of SDF models (and, upon conversion, URDF models).
  • Collision detection between bodies and uneven ground surface.
  • Continuous soft contacts model with no friction cone approximations.
  • Full support of inertial properties of bodies.
  • Revolute, prismatic, and fixed joints support.
  • Integrators: forward Euler, semi-implicit Euler, Runge-Kutta 4.
  • High-level classes to compute multi-body dynamics quantities from simulation state.
  • High-level classes supporting both object-oriented and functional programming.
  • Optional validation of JAX pytrees to prevent JIT re-compilation.

Planned features:

  • Reinforcement Learning module developed in JAX.
  • Finalization of differentiable physics through the simulation.

Installation

You can install the project with pypa/pip, preferably in a virtual environment:

pip install jaxsim

Have a look to setup.cfg for a complete list of optional dependencies. You can install all of them by specifying jaxsim[all].

Note: if you need GPU support, please follow the official installation instruction of JAX.

Credits

The physics module of JAXsim is based on the theory of the Rigid Body Dynamics Algorithms book authored 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 of developing JAXsim stems from google/brax. Here below we summarize the differences between the projects:

  • JAXsim simulates multibody dynamics in reduced coordinates, while brax uses maximal coordinates.
  • 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, under the assumption that 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.
  • While supported thanks to the usage of JAX, differentiating through the simulator has not yet been studied.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Citing

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

Maintainers

@diegoferigo

License

BSD3

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

jaxsim-0.1.dev153.tar.gz (56.0 kB view details)

Uploaded Source

Built Distribution

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

jaxsim-0.1.dev153-py3-none-any.whl (68.6 kB view details)

Uploaded Python 3

File details

Details for the file jaxsim-0.1.dev153.tar.gz.

File metadata

  • Download URL: jaxsim-0.1.dev153.tar.gz
  • Upload date:
  • Size: 56.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for jaxsim-0.1.dev153.tar.gz
Algorithm Hash digest
SHA256 2f8387da7f88b50138908490840b760a4753ccc299597082dbc007e08a08850f
MD5 b5eeffcf8cac8b4e351d0b1c490b4598
BLAKE2b-256 4b7e58e1b0a15169919a86bdad4e4066adc89bb3ffea68d6b7dea0d7dec30381

See more details on using hashes here.

File details

Details for the file jaxsim-0.1.dev153-py3-none-any.whl.

File metadata

  • Download URL: jaxsim-0.1.dev153-py3-none-any.whl
  • Upload date:
  • Size: 68.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for jaxsim-0.1.dev153-py3-none-any.whl
Algorithm Hash digest
SHA256 8bb49f60fe689eb4c1845619734e95e7db0ef2a8936de333a65fad63138ddf53
MD5 5462ae8d9d8c5a69c1399318aac9edc3
BLAKE2b-256 4fd54eccda784b44c338c1aaac0145ec705fbf8134a116f3dbc242c1d81e551f

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