Chapter 03  ·  Physics · Simulation · Rigid Body Dynamics

ImpulseForge

Physics that feels honest: impulse-level collision logic, friction, and MuJoCo cross-checks in one loop.

Impulse-based Collision Resolution Friction Modeling MuJoCo Integration Dynamic Simulation Logging Physics Benchmarking
Concept Note

Extend classic rigid-body collision formulations into a Python-native pipeline with full traceback.

Use MuJoCo for environment specification and rendering while retaining a custom solver.

Benchmark custom collision behavior directly against MuJoCo's built-in LCP solver outputs.

The Project Brief

A production-ready rigid body simulation framework built on MuJoCo for visualization and XML-based environment specification, with custom impulse-based collision resolution implemented in Python.

Framework capabilities:

  • Impulse-based collision detection and response for sphere–sphere, sphere–plane, and multi-body interactions.
  • Coulomb friction modeling with stiction and sliding regimes.
  • Single-sphere bounce, multi-sphere collisions, and inclined-plane simulations.
  • Comparative benchmarking against MuJoCo’s native LCP solver.

Implementation basis: Extends the formulations from “Nonconvex Rigid Bodies with Stacking” (Guendelman, Bridson & Fedkiw, SIGGRAPH 2003) to a Python-native simulation loop coupled with MuJoCo rendering.

Stack: Python · MuJoCo · NumPy · SciPy

Techniques

Impulse-based Collision Resolution Friction Modeling MuJoCo Integration Dynamic Simulation Logging Physics Benchmarking

Key Components

Impulse Solver
Custom collision & friction resolution
🌐
MuJoCo Render
XML-based environment + visualization
📐
Friction Model
Stiction and sliding Coulomb regimes
📊
Benchmarking
Custom vs. built-in LCP solver comparison

Project Highlights

1
Simulation Modes

README documents single-sphere, multi-sphere, collision, incline, and cube simulations with trajectory/height visualizations.

2
Implementation

Core collision/friction methods are centralized in physics modules with dedicated configuration and simulation runners.

3
Run Interface

CLI entrypoint supports selecting simulation variants and exporting recordings/plots for analysis.

Quickstart

1
Clone repo, create virtual environment, and install either via setup.py or requirements.txt.
2
Run simulation entrypoint with selected mode (for example: single_sphere or ball_collision).
3
Inspect generated plots and recordings to validate motion and impulse behavior.
"Every collision is a conversation between forces — and the math never lies."