Research-focused C++23 physics engine for robotics, animation, and machine learning, with Python bindings
Research-focused C++23 physics engine for robotics, animation, and machine learning, with Python bindings
DART (Dynamic Animation and Robotics Toolkit) is an open-source, research-focused physics engine for robotics, animation, and machine learning. It provides transparent kinematics, dynamics, collision, and constraint-solving foundations for users who need more than a black-box simulator. DART uses generalized coordinates for articulated rigid body systems and Featherstone's Articulated Body Algorithm for accurate, stable motion dynamics.
[!IMPORTANT] Which DART is this? This
mainbranch tracks DART 7, an in-progress redesign that is not yet recommended for production use. Its documentation is thelatestsite.For a stable release, use DART 6 LTS: documentation ·
release-6.20branch.
Python
import dartpy as dart
import numpy as np
world = dart.World(time_step=1.0 / 1000.0)
# Add a 1 kg rigid body one metre above the origin.
options = dart.RigidBodyOptions()
options.mass = 1.0
options.position = np.array([0.0, 0.0, 1.0])
box = world.add_rigid_body("box", options)
# Lock topology, then simulate 100 steps.
world.enter_simulation_mode()
for _ in range(100):
world.step()
print(f"t = {world.time:.3f} s, box z = {float(box.translation[2]):.3f} m")C++
The DART 7 C++ simulation facade is available in source builds while the final
public header transaction is still in progress. Use the C++ API shape recorded
in docs/design/simulation_cpp_api.md
for current source-checkout examples; DART 6 C++ snippets remain on the
release-6.* branches for compatibility-line users.
The quick-start snippets above target the current main branch and DART 7 API.
The tracked DART 7 wheel lane builds CPython 3.14 wheels on Linux, macOS, and
Windows, but PyPI currently serves the stable DART 6 line as the latest
non-yanked dartpy package. Use the source checkout path for the DART 7 Python
facade until a non-yanked DART 7 wheel is published.
| Method | Command |
|---|---|
| source checkout (DART 7 today) | pixi run build from this repository |
| uv/pip (DART 7 after wheel publish) | uv add dartpy --prerelease allow / pip install --pre dartpy |
| pixi (DART 6 stable today) | pixi add dartpy |
| conda (DART 6 stable today) | conda install -c conda-forge dartpy |
| Platform | Command |
|---|---|
| Cross-platform (recommended) | pixi add dartsim-cpp or conda install -c conda-forge dartsim-cpp |
| Ubuntu | sudo apt install libdart-all-dev |
| Arch Linux | yay -S libdart |
| FreeBSD | pkg install dartsim |
| macOS | brew install dartsim |
| Windows | vcpkg install dartsim:x64-windows |
These snippets create a tiny model in code, so they do not depend on sample data
files being present. The Python snippet targets a DART 7 source build; if
dart.World or add_rigid_body is missing, the environment resolved a stable
DART 6 package and should use the stable documentation.
Python source build
Run this after pixi run build from a source checkout:
PYTHONPATH=build/default/cpp/Release/python pixi run python -No open issues yet, or sync has not completed.