# Ostrich: Taking Large Strides Through Stiff Contact in Differentiable Dynamics

Robotics.world

> Differentiable simulators promise to let robots be optimized by following gradients through their own physics, but when contacts are stiff and persistent — a wheel pressing hard on high-friction…

**arXiv**: 2609.08800 · Preprint · not peer-reviewed

**Published**: 2026-09-08

**Authors**: Aleš Kučera, Karel Zimmermann

## In plain words

Differentiable simulators promise to let robots be optimized by following gradients through their own physics, but when contacts are stiff and persistent — a wheel pressing hard on high-friction ground — current engines make you choose between three things you want all at once: accurate simulation, trustworthy gradients, and affordable per-iteration cost.

## AI summary

## Overview

**Research area:** Differentiable physics simulation for robotics — specifically rigid-body simulation with hard frictional contact, and the gradient computation that lets trajectory optimization and policy learning pass through that contact.

**Technical level:** Advanced. The paper assumes familiarity with implicit time integration, complementarity problems, Newton solvers, Schur complements, and adjoint/implicit-function-theorem differentiation.

**Scope (one sentence):** The authors present Ostrich, a GPU-parallel differentiable rigid-body simulator that resolves hard contact and Coulomb friction with a non-smooth Newton solver at timesteps around 10⁻¹ s and computes reverse-mode gradients by an adjoint that reuses the forward Schur complement at O(1) memory per timestep, then benchmark it against MJX and NVIDIA Newton Semi-Implicit on a real pallet-traversal dataset, a control-synthesis task, world-scaling throughput, and mesh-terrain trajectory optimization.

## What This Paper Is About

Differentiable simulators promise to let robots be optimized by following gradients through their own physics, but when contacts are stiff and persistent — a wheel pressing hard on high-friction ground — current engines make you choose between three things you want all at once: accurate simulation, trustworthy gradients, and affordable per-iteration cost. Tape-based engines like MJX and Newton Semi-Implicit need tiny timesteps to keep soft contact numerically tractable, and their backpropagation memory grows linearly with the number of timesteps; surrogate models save memory by approximating contact away but lose the contact geometry that the optimization depends on. Ostrich's goal is to get all three by solving hard contact implicitly at large timesteps and differentiating the *converged* residual rather than the solver's internal iterations.

## Key Contributions

1. **A non-smooth Newton forward solver that is stable at macroscopic timesteps.** Ostrich uses backward Euler with hard Non-Linear Complementarity Problem contacts (Fischer-Burmeister form) and Coulomb friction, and remains stable at h ∼ 10⁻¹ s — the paper reports a usable plateau up to h = 0.1 s on real-robot data, roughly 50× larger than MuJoCo's and about 200× larger than Newton Semi-Implicit's.
2. **An adjoint backward pass that reuses the forward Schur complement.** Gradients are obtained by applying the Implicit Function Theorem to the converged residual: a single Preconditioned Conjugate Residual solve with the identical Schur operator A = J M̃⁻¹ Jᵀ + C from the forward pass yields reverse-mode gradients at O(1) memory per timestep, independent of the number of Newton/PCR iterations.
3. **Three solver-level extensions beyond the base non-smooth Newton formulation of Macklin et al.:** control (PD servo) targets formulated as implicit constraints solved jointly with contact and well posed at any positive gain; best-iterate backtracking that returns the lowest-residual iterate instead of relying on a line search; and friction-projection safeguards (clamping the friction impulse to the Coulomb cone, keeping W ≥ 0) so that intermediate iterates returned by backtracking are physically admissible.
4. **Scaling to arbitrary triangle meshes and thousands of parallel worlds on one GPU**, demonstrated on ~12,500-face mesh terrain and up to 8,192 worlds (32,768 with checkpointing) on a single 24 GB RTX 3090.

## Main Findings

- **Sim-to-real accuracy is preserved at a 50× larger timestep.** On ten held-out real pallet traversals, Ostrich reaches 0.208 m combined position-and-yaw error, Semi-Implicit 0.268 m, and MuJoCo 0.315 m — a spread of at most 0.11 m — while Ostrich holds that floor up to h = 0.1 s, versus 2 ms for MuJoCo and a divergence beyond 0.5 ms for Semi-Implicit. The shared error floor is attributed to the constant-μ friction model rather than any contact solver, because measured per-run turn efficiency varies (0.11–0.30 on four runs).
- **Gradients succeed where the baselines fail.** On a box-obstacle control-synthesis task (25 random trials, 50 Adam iterations, success = final position error < 0.2 m and terminal speed < 0.3 m/s), Ostrich succeeds on 100% of trials at 0.065 m median final position error; MJX succeeds on 16% (0.32 m median), and Semi-Implicit on 8% (2/25) at 0.58 m median after salvaging its best finite iterate, since its exact reverse-mode gradient is non-finite beyond a ~2 s horizon.
- **One warm optimization iteration is 211× faster than MJX's.** Ostrich: 0.55 s per warm iteration, versus 116 s for MJX and 2.6 s for Semi-Implicit. Setup costs are also very different: 1 s for Ostrich, 84 s for MJX, and 29 min per trial for Semi-Implicit. End to end, a 50-iteration run costs 29 s for Ostrich versus 1.6 h for MJX and 0.5 h for Semi-Implicit, with median losses of 0.042, 0.28, and 0.59 respectively.
- **It scales to 8,192 worlds on one 24 GB GPU.** Peak throughput is 348 world-iterations/s for Ostrich at 8,192 worlds, versus 12 for checkpointed MJX at its 4,096-world memory cap (a 29× gap) and 23 for Semi-Implicit at 512 worlds (out of memory at 1,024). Plain-BPTT MJX exhausts the card at 8 worlds; Semi-Implicit tapes 12,000 steps over the 6 s horizon, Ostrich only 60. Checkpointed Ostrich sustains 171–173 world-iterations/s up to 32,768 worlds on 21.7 GB.
- **Mesh-terrain trajectory optimization works over a 10 s horizon.** Across 50 random instances on a ~12,500-face heightmap (T = 125, h = 80 ms), the per-seed best RMSE has median 0.143 m (0.208 ± 0.178 m mean ± std), with 90% (45/50) below 0.5 m and 70% (35/50) below 0.2 m. On this horizon the full position pull-back amplifies contact sensitivity (adjoint norm growing ~1.13× per step), so the adjoint truncates it, holding contact geometry fixed within each step.
- **First-order gradients beat evolution strategies on sample efficiency, not on single-problem wall-clock.** ES with population 64 matches 50 Adam iterations at a median 0.8× the budget on one problem, but spends about 1,800 rollouts per solved problem against 50 forward-adjoint pairs — a 35× gap — and at 300 parameters needs twice the rollouts, 1.5× the budget, and reaches 4× the matched-budget loss.
- **The adjoint is numerically validated.** Against centered finite differences on CPU: maximum relative error 0.02% on an impulsive contact-boundary test, ≤0.4% across all wheel DOFs (per-scenario maxima 0.04–0.33%, central differences with step 10⁻²), and ≤1.6% on cart-pole losses over horizons up to 50 steps; the checks run in continuous integration.

## Methodology in Plain English

The robot's motion is discretized with backward Euler, meaning the next state is defined implicitly by an equation that has to be solved rather than simply evaluated. Every physical interaction the paper needs — joints, non-penetration, friction, and motor servos — is written as a residual equation that equals zero at the correct answer. Contact is expressed with the Fischer-Burmeister function, which encodes the three conditions "no penetration, non-negative pushing force, and not both at once" as a single equation equal to zero; friction is derived from maximal dissipation and written as a residual with a compliance weight W that interpolates between sticking and sliding.

A Newton-style solver repeatedly linearizes this whole system. Because the position update is linear in velocity, position is eliminated by substitution, and a Schur complement eliminates velocity too, leaving a smaller system in the constraint impulses alone, which is solved matrix-free with Preconditioned Conjugate Residual. At large timesteps Newton can overshoot, so rather than a line search the solver runs a fixed budget and returns the iterate with the smallest residual, subject to a floor on the iteration index — and friction safeguards keep that returned iterate inside the Coulomb cone so that timestep-consistent friction still holds.

The key gradient trick: because the answer is defined implicitly, the authors never differentiate through the solver's iterations. They apply the Implicit Function Theorem at the converged state, which turns the backward pass into one linear solve for an adjoint variable. That adjoint system has exactly the same matrix A as the forward Newton step, so the forward pass's operator and preconditioner are reused, and no extra matrix assembly is needed. One vector-Jacobian sweep on a recorded residual evaluation at the converged state supplies the dependence on the previous pose, including contact point and normal geometry that the authors did not hand-derive.

Experiments compare against MuJoCo (CPU, for forward accuracy), MJX with `implicitfast` and JAX AD, and NVIDIA Newton Semi-Implicit, on a 106 kg custom three-wheeled robot with 5.5 kg wheels of 35 cm radius and 75 cm wheelbase. Of six surveyed differentiable simulators, only these two baselines could run the scene as differentiable comparisons: Genesis produced near-zero rigid-body gradients, Brax's positional pipeline would not simulate stably and its generalized QP pipeline returned non-finite gradients, Newton's XPBD only approximates gradients, Dojo is CPU-only and dormant, and TinyDiffSim supports only primitives.

## Why This Matters

The paper reframes the practical question for differentiable simulation: since simulation accuracy at identified parameters separates the tested engines by little, the decisive property is the largest timestep at which an engine stays accurate — and that is what determines whether gradient-based control synthesis is feasible at all. Ostrich shows that hard-contact implicit differentiation can be combined with GPU parallelism, arbitrary mesh geometry, and thousands of parallel worlds, which was previously split across CPU-only exact solvers (Dojo, Nimble) and GPU engines restricted to primitive geometry (TinyDiffSim).

Real-world applications:

- **Wheeled and legged locomotion over rough, high-friction terrain**, where mesh-level contact normals and localized slip must be represented rather than smoothed away — the paper's own mesh-terrain demo targets this.
- **Model-predictive control and trajectory optimization on real hardware**, where the single-world regime ("interactive and MPC") runs at 0.53 s per optimization iteration versus 126 s for checkpointed MJX.
- **Batch policy learning and reinforcement learning**, where 8,192 parallel worlds at 348 world-iterations/s on one GPU make large-scale gradient-based training practical.
- **Contact-rich manipulation and vehicle dynamics studies requiring sim-to-real fidelity**, since the forward model tracks measured real pallet climbs at timesteps two orders of magnitude larger than penalty-based engines.

Industry relevance: the throughput and memory numbers target the practical constraint of robotics teams — a single 24 GB workstation GPU — and the paper notes single-world experiments fit in 4 GB for Ostrich and Semi-Implicit and 6 GB for MJX, meaning most of the reported capability does not require the largest card. The friction-model observation (a constant-μ model imposes a shared error floor) is directly actionable for anyone calibrating simulation against fleet data.

## Future Directions

- **Richer friction models.** The authors attribute the common sim-to-real error floor across all three engines to the constant-μ friction model, since measured per-run turn efficiency varies (0.11–0.30) while the model realizes exactly one value. Learning or state-dependent friction is the obvious next step, and Ostrich's differentiable parameters θ make that natural.
- **Stabilizing the full position pull-back over long horizons.** The mesh-terrain experiment truncates the contact-geometry derivative because the adjoint norm grows ~1.13× per step and gives no usable descent direction; making that term usable over 10 s and beyond is left open.
- **Scaling and checkpointing strategy.** Checkpointed Ostrich already sustains 171–173 world-iterations/s to 32,768 worlds on 21.7 GB; pushing further, and finding better recomputation schedules than one forward re-execution per step, is a direct extension. Semi-Implicit checkpointing was implemented and validated but not timed because per-step tape re-recording made it impractical.
- **Extending the formulation beyond rigid bodies and primitive-free scenes.** The paper's framing contrasts its approach with simulators limited to planes, spheres, and capsules; carrying the same adjoint-reuse argument to soft bodies, articulated systems with more complex actuators, or richer contact models (the paper models no torque saturation) are untested directions.

## Target Audience

Robotics researchers and graduate students working on differentiable simulation, trajectory optimization, and model-based control; practitioners building MPC or policy-learning pipelines who need gradients through stiff contact on a single GPU; and simulator developers interested in implicit-differentiation and complementarity-based contact formulations. Readers without background in implicit integration, Schur complements, and adjoint methods will find Sections III and IV-C demanding, though the experimental tables and the framing of the accuracy/gradient/cost tradeoff are accessible to a broader robotics audience.

## Authors’ abstract

Three properties determine whether a differentiable simulator can drive gradient-based optimization through contact: simulation accuracy, gradient reliability, and per-iteration cost. Tape-based engines such as MJX and Newton Semi-Implicit require timesteps small enough to keep contacts numerically tractable, and their backpropagation memory grows linearly with the number of timesteps T. Surrogate models bound memory by approximating contact away, but the resulting gradients…

[The full abstract on arXiv](https://arxiv.org/abs/2609.08800)

[Read the original paper](https://arxiv.org/abs/2609.08800)

## Related papers

- [Propagating Elevation-Map Uncertainty Through the Contact Maximum in Closed Form](https://robotics.world/paper/propagating-elevation-map-uncertainty-through-the-contact-maximum-in-2610.06103) 2026-10-05 · cs.RO · Also by Aleš Kučera, Karel Zimmermann
- [Mapless, Stabilizing, and Anti-Stuck Flipper Control for Articulated Tracked Robots](https://robotics.world/paper/mapless-stabilizing-and-anti-stuck-flipper-control-for-articulated-2610.13838) 2026-10-09 · cs.RO · Also by Karel Zimmermann
- [CQDC-Warp: GPU-Accelerated Differentiable Quasi-Dynamic Simulation for Contact-Rich Manipulation](https://robotics.world/paper/cqdc-warp-gpu-accelerated-differentiable-quasi-dynamic-simulation-for-2610.21349) 2026-10-15 · cs.RO · Key terms of the title in common
- [Differentiable Contact Dynamics for Legged Locomotion: Policy Learning and Contact-Implicit Trajectory Optimization](https://robotics.world/paper/differentiable-contact-dynamics-for-legged-locomotion-policy-learning-2610.35852) 2026-10-26 · cs.RO · Key terms of the title in common
- [Differentiable Dynamics for Autonomous Micro-Mobility Navigation](https://robotics.world/paper/differentiable-dynamics-for-autonomous-micro-mobility-navigation-2609.31885) 2026-09-25 · cs.RO · Key terms of the title in common

---

Canonical: https://robotics.world/paper/ostrich-taking-large-strides-through-stiff-contact-in-differentiable-2609.08800
