Learning outcomes
- Derive the mass-weighted acceleration projection.
- Relate Gauss's principle to Udwadia–Kalaba.
- Distinguish exact equality constraints from compliant engine constraints.
Prerequisites: Linear algebra, ODEs, and earlier lectures in this sequence.
The least-change viewpoint
Let
Stationarity gives
Udwadia–Kalaba form
Define
In code, factorization-based solves often avoid explicitly forming a matrix square root. The formula clarifies the geometry, while the multiplier solve is convenient for the small full-rank practice.
Worked unequal-mass example
Let
A Euclidean projection gives
MuJoCo soft constraints
MuJoCo solves its own regularized constraint problem with compliance and solver parameters. Its constraint forces need not enforce zero geometric penetration or exactly match rigid Lagrange multipliers. solref and solimp influence the modeled response. Increasing numerical solver accuracy does not remove deliberately modeled compliance.
The link to Gauss's principle is conceptual: both organize dynamics around inertia-weighted corrections. They are not identical algorithms or interchangeable parameterizations MuJoCo computation.
Practice and exercise
Practice 5 verifies the analytic unequal-mass example, then examines drift stabilization. An extension uses a MuJoCo equality constraint and varies solref while keeping timestep and solver tolerance fixed.
Check: A compliant constraint has a small nonzero position error at equilibrium. Is that automatically a solver bug? Answer: no. Determine whether the error follows the chosen compliance model. Compare model parameters and numerical convergence separately.