Skip to main content

A differentiable fully featured physics engine

Project description

Stanford Nimble Logo

Tests

Stanford Nimble

pip3 install nimblephysics

** BETA SOFTWARE **

Read our docs and the paper.

Use physics as a non-linearity in your neural network. A single timestep, nimble.timestep(state, controls), is a valid PyTorch function.

Forward pass illustration

We support an analytical backwards pass, that works even through contact and friction.

Backpropagation illustration

It's as easy as:

from nimble import timestep

# Everything is a PyTorch Tensor, and this is differentiable!!
next_state = timestep(world, current_state, control_forces)

Nimble started life as a fork of the popular DART physics engine, with analytical gradients and a PyTorch binding. We've worked hard to maintain as much backwards compatability as we can, so many simulations that worked in DART should translate directly to Nimble.

Check out our website for more information.

Installing on Arm64 Macs (M1, M2, etc)

We don't yet publish Arm64 binaries to PyPI from our CI system, so you may not be able to pip3 install nimblephysics from a new Arm64 Mac. We will endeavor to manually push binaries occassionally, but until GitHub Actions supports using Arm64 Mac runners, that may run a bit behind.

Currently, the pre-built Arm64 binaries are ONLY AVAILABLE ON PYTHON 3.9. So if you create a virtual environment with Python 3.9, and then pip3 install nimblephysics, that should work.

If you really need another Python version for some reason, the solution is to clone this repo, then run

  • ci/mac/install_dependencies.sh
  • ci/mac/manually_build_arm64_wheels.sh That will install the dependencies you need, and then build and install the Python package. Please create Issues if you run into problems, and we'll do our best to fix them.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

nimblephysics-0.10.42-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (69.8 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

nimblephysics-0.10.42-cp311-cp311-macosx_10_9_x86_64.whl (41.5 MB view hashes)

Uploaded CPython 3.11 macOS 10.9+ x86-64

nimblephysics-0.10.42-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (69.8 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

nimblephysics-0.10.42-cp310-cp310-macosx_10_9_x86_64.whl (41.4 MB view hashes)

Uploaded CPython 3.10 macOS 10.9+ x86-64

nimblephysics-0.10.42-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (69.8 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

nimblephysics-0.10.42-cp39-cp39-macosx_10_9_x86_64.whl (41.4 MB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

nimblephysics-0.10.42-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (69.8 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

nimblephysics-0.10.42-cp38-cp38-macosx_10_9_x86_64.whl (41.4 MB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

Supported by

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