← all repositories
erwincoumans/tiny-differentiable-simulator

Simulate robots, backpropagate through collisions

It exists to make rigid-body physics fully differentiable for robot learning.

1.4k stars C++ Domain AppsML Frameworks
tiny-differentiable-simulator
Not currently ranked — collecting fresh signals.
star history

What it does

Tiny Differentiable Simulator is a header-only C++ (and CUDA) physics engine with zero dependencies. It simulates rigid-body dynamics—forward and inverse—along with contact resolution via impulse-level LCP or nonlinear spring-dampers, plus actuator models for motors, servos, and series-elastic joints. The whole library is templatized so you can drop in automatic-differentiation scalars like CppAD or Stan Math types, or stick with plain float and double; it even bundles fixed-point integer math if you need deterministic cross-platform results.

The interesting bit

Because every operation is templated on the scalar type, the same codebase that runs your real-time visualization can also emit forward- or reverse-mode physics gradients for thousands of parallel GPU simulations. That turns the simulator itself into a differentiable layer you can train through.

Key highlights

  • Header-only, zero dependencies, C++17.
  • Supports forward- and reverse-mode AD via CppAD, Stan Math fvar, ceres::Jet, or standard numeric types.
  • Includes fixed-point math for deterministic, cross-platform reproducibility.
  • Runs thousands of parallel sims on a single RTX 2080 at 50 FPS.
  • Built-in URDF parser and two visualizers: native OpenGL 3+ and web-based MeshCat via ZMQ.

Verdict

Grab it if you are building differentiable robotics pipelines or sim-to-real RL and need physics gradients without dragging in a heavy framework. Skip it if you just need a game-engine physics drop-in with artist-friendly tooling.

Frequently asked

What is erwincoumans/tiny-differentiable-simulator?
It exists to make rigid-body physics fully differentiable for robot learning.
Is tiny-differentiable-simulator open source?
Yes — erwincoumans/tiny-differentiable-simulator is open source, released under the Apache-2.0 license.
What language is tiny-differentiable-simulator written in?
erwincoumans/tiny-differentiable-simulator is primarily written in C++.
How popular is tiny-differentiable-simulator?
erwincoumans/tiny-differentiable-simulator has 1.4k stars on GitHub.
Where can I find tiny-differentiable-simulator?
erwincoumans/tiny-differentiable-simulator is on GitHub at https://github.com/erwincoumans/tiny-differentiable-simulator.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.