Engineering journal

One Experiment, Two Physics Engines: Comparing MuJoCo and Gazebo Without Assuming They Agree

A retained cart experiment shows how to compare controllers within each engine, verify full-resolution telemetry and preserve a deliberately failing result.

About 4 min read

Compare the change. Preserve the engine.. SimWeave / PR #10 / retained native cart runs. Hold the task fixed: Same inputs, seed and gates. Pair within each engine: 20 passes / 20 expected failures. Verify before interpreting: 80 recordings / no new physics. Editorial diagram derived from the regression contract and retained CI cohort. Verified telemetry does not establish cross-engine equivalence.
Editorial diagram derived from the regression contract and retained CI cohort. Verified telemetry does not establish cross-engine equivalence.
Download technical figure · PNG · 1200 × 630

A common experiment format makes two simulation runs easier to compare. It does not make two physics engines interchangeable. SimWeave's first regression workflow keeps that distinction visible: declare the physical experiment once, compare a baseline and candidate within each engine, then verify the recorded evidence before interpreting the result.

The merged PR #10 (opens in a new tab) implements bounded regression suites and a comparison dashboard. This article reads its retained native CI evidence. It does not run a new simulation or establish a general robotics benchmark.

Start with a small, explicit experiment

The built-in task is a one-dimensional cart returning to a one-metre target. Each run lasts six seconds, with a 0.01-second timestep. A 3 N force pulse starts at two seconds and lasts 0.3 seconds. Position sensing includes noise with a standard deviation of 0.005 m.

Within each pair, physical inputs, seed, target and quality gates remain fixed. The positive candidate changes proportional gain from 8 to 8.5 while derivative gain stays at 4 and force is capped at 20 N. A comparison with a changed target is rejected: otherwise the two error measurements would describe different tasks. The pinned regression contract (opens in a new tab) defines these constraints.

Ask two different acceptance questions

First, does each controller satisfy the task? Final error must be at most 0.05 m. A failing baseline fails the comparison even if the candidate passes.

Second, did the candidate regress beyond the allowed amount? Candidate RMSE minus baseline RMSE must be at most 0.02 m. This is an absolute tolerance in metres, not a percentage improvement or a statistical significance test.

The retained native cohort contains ten seeds for each of MuJoCo and Gazebo. Every seed has a baseline and candidate, giving 40 recordings in the positive cohort. All twenty comparisons pass.

Seed-0 MuJoCo metricBaselineCandidateChange
RMSE / m0.2521720.246662-0.005509
Final error / m0.0002190.000266+0.000047
Control effort / N s3.7456343.893958+0.148325

The candidate reduces RMSE here while using more control effort. Its final error is slightly larger, though still comfortably inside the gate. That is a trade-off to inspect, not a claim that every metric improved. Rounded values above come from the retained comparison record; the case study exposes both engines and the full telemetry.

Keep a failure in the evidence

A second cohort deliberately sets the candidate's proportional and derivative gains to zero. It uses the same seeds, engines and physical task. All twenty comparisons fail, as intended.

For MuJoCo seed 0, the disabled controller ends with 1.416609 m final error and 0.866644 m RMSE. Its RMSE increase is 0.614473 m, well beyond the 0.02 m allowance. The baseline still passes. This negative control checks that the workflow can preserve and report a bad candidate instead of quietly treating successful execution as successful engineering.

The degraded suite's exit code is 1, meaning a quality or regression failure. Input, execution or storage errors have a separate code. The distinction matters when automation needs to tell an expected rejection from a broken test environment.

Verification answers a narrower question than physics validation

For this publication, the upstream verifier recomputed metrics, gates, scenario digests and telemetry digests from all eighty downloaded native recordings. Each contains 601 samples, including the initial state. Eight complete seed-0 recordings are retained on this site; aggregate counts refer to the larger downloaded CI cohort. The validation report (opens in a new tab) records the original native environment and qualification boundaries.

That verification checks internal consistency. It does not rerun physics, authenticate the producer, establish real-world fidelity or prove equivalence between MuJoCo 3.15.0 and Gazebo 8.15.0 with DART. Repetition also depends on the adapter, dependencies, platform and seed. A visually similar trajectory cannot remove those conditions.

The SimWeave case study makes the results inspectable with recorded plots and expandable gate readouts. AeroLoop explores a complementary question: how to interpret a particular controller or physics measurement when the experiment itself still has unresolved assumptions.

Update: evidence and decision workflows have merged

This article preserves the PR #10 experiment above. As of 15 October, PRs #11 through #14 have merged, adding evidence bundles and controlled reruns, statistical decisions, recoverable baseline catalogs, optional OIDC identity and signed recovery. The new decision article examines those separate boundaries and their retained evidence. Direct file-open and the end-to-end two-minute download target remain unverified.