RoboticsNumerical2026
MuJoCo Ackermann Steering
Finds the least-error polynomial fit for Ackermann steering geometry in MuJoCo.
Problem
MuJoCo cars approximate Ackermann steering with a quartic joint-equality polynomial; picking the coefficients badly causes visible steering misalignment across the range.
What I built
- Derived the quartic polycoef two ways — Taylor expansion of the exact geometry and a least-squares fit over the steering range.
- Built an error table (SSE / RMSE / max error) and argued why RMSE is the right metric to optimize (sample-count-independent, whole-range, in degrees).
- Exposed wheelbase, track width, steering lock, and sample count as CLI parameters with a comparison plot.
Impact
- Produces a ready-to-paste MuJoCo `polycoef` vector for a given car geometry.
- The least-squares fit minimizes typical (RMSE) steering error across the full lock range.
Stack
PythonNumPyMuJoCoMatplotlib