Skip to content

RaiSim vs MuJoCo ​

Eleven workloads cover articulated dynamics, rigid contacts, closed loops, ray queries, and deformable objects. The tables compare RaiSim and MuJoCo on the same machine, with three runs per backend. For tuning guidance, see Performance.

For the parallel CPU/GPU comparison, see RaiSim vs Newton.

Results ​

Median wall-clock seconds; lower is better. The smaller range below each median is the minimum–maximum of three runs. Speedup is MuJoCo's median divided by RaiSim's median. All rows run on a single thread and include scene construction and the benchmark loop; rendering is disabled.

WorkloadRaiSim (s)MuJoCo (s)Speedup
Chain, 10 links0.302
0.293–0.302
1.141
1.129–1.153
3.78×
Chain, 20 links0.575
0.573–0.586
3.999
3.949–4.013
6.96×
ANYmal standing5.513
5.471–5.638
14.126
14.063–14.698
2.56×
ANYmal falling0.299
0.294–0.303
0.780
0.779–0.784
2.61×
ANYmal on heightmap1.198
1.185–1.227
5.761
5.482–5.838
4.81×
Primitive speed3.744
3.493–3.912
8.832
8.829–9.354
2.36×
Strandbeest0.179
0.179–0.215
0.491
0.484–0.564
2.74×
Heightmap LiDAR0.889
0.850–0.935
22.869
22.539–23.141
25.71×
Primitive ray scaling0.016
0.016–0.017
2.427
2.420–2.445
147.16×
Deformable cloth0.415
0.415–0.417
4.947
4.888–4.960
11.92×
Deformable cube stack0.445
0.442–0.482
Unstable—

The eight-cube MuJoCo run reports numerical instability at 0.020 s. Its timing and speedup are omitted. Cloth and cube-stack backends use different deformable models; their parameters and comparison limits are in Workloads.

Horizontal bars showing MuJoCo time divided by RaiSim time for ten valid comparisons, on a logarithmic axis from 1 to 256 times.

Download the recorded results and exact arguments. Absolute timings depend on the machine, compiler, and scene. These ratios describe the recorded development build; use your application workload to evaluate the distributed 2.19.0 package.

Workloads ​

DOF counts generalized velocity coordinates; a floating base contributes six. A step count denotes simulation steps unless the row says queries or sensor updates.

Benchmark IDRunScene and settings
chain10_speed

100,000 steps

Δt = 1 ms

Fixed-base chain, 10 spherical joints, 30 DOF. Spring-dampers bend each link by 90°. No collision geometry or contacts; pure articulated dynamics.
chain20_speed

100,000 steps

Δt = 0.5 ms

The same spring chain with 20 spherical joints and 60 DOF. Released 90° from every spring's rest rotation, it whips at hundreds of rad/s; at 1 ms the default integration gains energy until it diverges.
anymal_standing

1,000,000 steps

Δt = 2 ms

ANYmal: floating base and 12 revolute joints, 18 DOF. PD control holds a stance on a plane, with about four persistent foot contacts. Primitive robot collision shapes; friction 0.8.
anymal_falling

100,000 steps

Δt = 2 ms

ANYmal, 18 DOF, falling freely with no ground or contacts.
heightmap_anymal_speed

200,000 steps

Δt = 2 ms

ANYmal, 18 DOF, on a 20 × 20 m fractal heightmap: 100 × 100 samples, three octaves. Tests robot–terrain contacts.
primitive_speed

100,000 steps

Δt = 2 ms

32 rigid bodies: sixteen 0.4 m boxes and sixteen spheres of radius 0.15 m, in a 4 × 4 grid at 0.6 m spacing. Spheres fall onto boxes above a ground plane; tests box–ground and sphere–box contacts.
strandbeest

3,000 steps

Δt = 1 ms

Twelve-legged linkage, 79 DOF and 42 hinge closures / 84 pin constraints, driven by a crank at one revolution per second. RaiSim imports OpenUSD; MuJoCo loads converted MJCF with connect equalities. This row includes import, unlike the simulation-only timing in earlier versions of this page.
heightmap_lidar

2,000 updates

Δt = 5 ms

Spinning LiDAR on ANYmal C over a 200 × 200 m heightmap, 400 × 400 samples. Uses 512 yaw × 64 pitch samples per revolution at 10 Hz, ±16.6° pitch and 0.8–40 m range. The robot settles for 200 steps, then stays fixed while sensor time advances. Both backends check hit ratio and terrain-surface error.
primitive_ray_scaling

10,000 queries

256 warmup rays

10,000 static primitives on a 2.5 m grid: spheres, boxes, capsules, and cylinders. The deterministic mixed workload casts vertical rays in an incoherent order, with 50% hits. Initial queries verify hits and target IDs; the timed loop consumes hit results. This row is one point in the scaling workload; change --objects and --workload to measure others.
deformable_cloth

2,000 steps

Δt = 1 ms

Unpinned 32 × 32 cloth grid: 1,024 particles, 1,922 triangles, 0.035 m spacing, dropped from 0.85 m onto a static sphere of radius 0.25 m and a plane. Six solver iterations. RaiSim uses XPBD distance compliance 10⁻⁵ with bending disabled; MuJoCo uses a 2D flex grid with edge equalities.
deformable_cube_stack

1,200 steps

Δt = 1 ms

Eight 0.3 m cubes, stacked above a plane; six solver iterations. Explicit arguments request resolution 4 and collision radius 0.04 m; the shared spacing guard increases resolution to 5. RaiSim uses 784 surface particles with internal struts, compliance 7.5 × 10⁻⁵ and effective collision radius 0.06525 m. MuJoCo uses 1,000 volumetric flex particles, Young's modulus 50 kPa and radius 0.005 m; that run becomes unstable.

Deformable rows compare these implementations and settings, without matching material response or solver accuracy. In particular, the cube stack uses different particle counts, masses, and collision radii. A timing ratio alone does not measure physical fidelity.

Method ​

SettingRecorded configuration
MachineAMD Ryzen 9 3950X, 16 cores / 32 threads, 64 GB RAM; x86-64.
SystemUbuntu 26.04.1 LTS, Linux 7.0.0-38-generic.
RunOctober 14, 2026; private development revision ded44a528 with local rendering fixes. Physics and benchmark sources match that revision.
BuildsClang 20.1.8, C++20, Release. RaiSim: -O3 -DNDEBUG -march=native -mtune=native; MuJoCo 3.13.0 built from source with -O3 -DNDEBUG -mavx.
ThreadingOne thread, pinned to CPU 8 with taskset; OMP_NUM_THREADS, OPENBLAS_NUM_THREADS, MKL_NUM_THREADS, and VECLIB_MAXIMUM_THREADS all set to 1. Benchmarks run serially, without rendering.
MeasurementThree calls per workload and backend. Median, minimum, and maximum of the launcher's wall-clock duration, including construction, warmup, validation, and the benchmark loop. Separate query-only timings appear in the downloadable results for primitive_ray_scaling. Speedups use unrounded medians.
ArgumentsDefault launcher arguments for ten workloads; explicit eight-cube arguments below replace the launcher's one-cube, 20-step quick check. Exact arguments for every row are in the downloadable JSON.

Private comparison suite. The launcher and MuJoCo backend are maintained in the engine repository and are not targets in raisim2Lib. The recorded commands are:

bash
export OMP_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1 MKL_NUM_THREADS=1 VECLIB_MAXIMUM_THREADS=1
taskset -c 8 ./build-benchmark/benchmark/benchmarks --backend=both --repeat 3 \
    -b chain10_speed -b chain20_speed -b anymal_standing -b anymal_falling \
    -b heightmap_anymal_speed -b primitive_speed -b strandbeest \
    -b heightmap_lidar -b primitive_ray_scaling -b deformable_cloth \
    --report --report-dir /tmp/raisim-benchmark-report
taskset -c 8 ./build-benchmark/benchmark/benchmarks --backend=both --repeat 3 \
    -b deformable_cube_stack --report --report-dir /tmp/raisim-cube-stack-report \
    -- --cubes=8 --resolution=4 --steps=1200 --iterations=6 --collision-radius=0.04

Measure the distributed package. Build the public timing examples from raisim2Lib and repeat your chosen run at least three times:

bash
cmake -S . -B build-examples -DCMAKE_BUILD_TYPE=Release -DRAISIM_EXAMPLE=ON
cmake --build build-examples --target anymal_standing_benchmark \
    articulated_system_benchmark --parallel 12
OMP_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1 MKL_NUM_THREADS=1 \
    ./build-examples/examples/anymal_standing_benchmark --steps=1000000

On Windows, build with --config Release and run build-examples\bin\anymal_standing_benchmark.exe. These public examples time RaiSim only, using their own scenes; they do not reproduce the private comparisons. Keep the package version, scene, timestep, step count, and machine fixed. See Build, Test, and Benchmark for other timing examples.

Runtime joint workloads ​

The engine-source runtime_joint_benchmark target measures runtime joints separately from the recorded RaiSim/MuJoCo comparisons above. Configure the benchmark build with -DRAISIM_BENCHMARK=ON and build with 12 jobs:

bash
cmake --build build-benchmark --target runtime_joint_benchmark --parallel 12
OMP_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1 MKL_NUM_THREADS=1 \
  ./build-benchmark/benchmark/runtime_joint_benchmark --copies 16 --steps 10000

All seven workloads use a 1 ms timestep, disabled sleeping, and no collision geometry interaction. Each reports the median microseconds per complete world step from five timed repetitions after one warmup. Checkpoint restoration, scene construction, and correctness checks are outside the timed loop.

WorkloadScene and correctness checks
unconstrainedcopies freely falling rigid spheres; checks finite state.
fixed, ball, hinge, slidercopies spheres supported against gravity by the selected joint type, with a world attachment. Checks finite state and supported position. Hinge and slider free axes are horizontal.
offset_fixedFixed joints attached 0.2/0.1/−0.1 m from each sphere's centre. The lever arm couples the linear and angular response, exercising the full eigensolver; checks pose, force, and reaction couple.
two_robot_dockingcopies pairs of separate fixed-base robots, each with one prismatic joint. A fixed dock joins their carriage links. A 1 N force applied to the first carriage accelerates both; checks matching positions/velocities and a 0.5 N transmitted force.

Timing covers the whole scene, rather than one joint; the docking workload has two articulated systems per copy. max_position_error is in metres and must remain below 1e-8. Invalid attachment or force-transfer results fail the run. Use --copies to measure scaling and --steps to change the timed duration. See Runtime joints for the APIs, tests, and runnable C++ and Python examples.

Optimization measurement ​

A local Linux x86-64 Clang 20 Release build on an AMD Ryzen 9 3950X measured the following medians for 16 copies, 10,000 steps per repetition, and one calling thread. Before and after use the same benchmark source, timestep, solver settings, and validation; only the runtime-joint implementation differs. Setup, checkpoint restore, and validation are excluded from the timed loop.

WorkloadBefore (µs/step)After (µs/step)
unconstrained4.1314.139
fixed38.30522.320
ball34.41117.684
hinge36.22921.769
slider36.44521.855
offset_fixed56.12547.823
two_robot_docking57.88735.526

The centred-joint and docking cases reduce step time by about 39–49%; the fully coupled offset case reduces it by about 15%. The unconstrained reference stays essentially unchanged. Runs with 1 and 64 copies also retain their validation checks and show improvements for every joint workload. These are development measurements, not a comparison between released package versions.

State and reaction-load traces from 34 native runtime-joint tests were also compared with the saved pre-optimization library. Differences remained at floating-point roundoff scale (maximum approximately 1.42e-14 in the recorded fields). Separate regressions require exact checkpoint replay for coupled contacts and changing active joint/body layouts; both passed 100 repetitions. Physical assertions, rank thresholds, and convergence settings are unchanged. See Determinism for cross-build expectations.

Articulated join workloads ​

The engine-source articulated_join_benchmark target compares an 8-link pendulum chain built with World::joinObjects(), in generalized coordinates, with the same chain held together by runtime hinge joints, and times rebuilding a robot with joinObjects() and detachJoint():

bash
cmake --build build-benchmark --target articulated_join_benchmark --parallel 12
OMP_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1 MKL_NUM_THREADS=1 \
  ./build-benchmark/benchmark/articulated_join_benchmark --copies 8 --links 8 --steps 5000

Each chain hangs from the world and swings under gravity with a 1 ms timestep. The chain workloads report the median microseconds per world step over five timed runs after one warmup, and the largest separation of a hinge's two sides. anymal_tool_join fixes a box to an ANYmal's base and detaches it again (--rebuilds times) and reports the median time of each call. Measured on an AMD Ryzen 9 3950X with one thread:

WorkloadResult
chain_joined (8 chains of 8 links)12.9 µs per step, hinge separation 1.4e-17 m
chain_runtime_joints (8 chains of 8 links)1350 µs per step, hinge separation 3.8e-6 m
anymal_tool_join133 µs to join, 134 µs to detach

See Joining objects for the API.

Dense-mesh contact workloads ​

Two additional source benchmarks exercise the Unitree G1's hand collision mesh: a closed half-sphere with 3,002 vertices and 6,000 triangles. They are separate from the eleven recorded comparisons above and require the engine source benchmark runner, which is not shipped in the public binary-package workspace.

Benchmark IDWorkload and measurements
mesh_primitive_proximityThe hand mesh is posed around a torso cylinder, pelvis box, limb cylinder, capsule and sphere at deterministic random orientations. Many poses overlap in their world AABBs while remaining separated. Defaults: 512 poses per primitive, 20 timed rounds. Reports mean narrowphase time, per-call median, 99th percentile and maximum, overlapping/contact pose counts, and RaiSim contact signatures.
g1_hand_self_collisionA fixed-base, 29-DoF G1 follows joint PD targets that swing its hands past the torso, pelvis and hips, with intermittent self-contact. Defaults: 20,000 steps at 2.5 ms. Reports mean, 99th percentile and maximum integration time, steps with self-contacts and hand contacts, total contacts, and a RaiSim contact/final-state signature.

Run from an engine source checkout after building the benchmark runner:

bash
OMP_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1 MKL_NUM_THREADS=1 \
  ./build-benchmark/benchmark/benchmarks \
  --bench mesh_primitive_proximity --backend=both -- --poses 512 --rounds 20
OMP_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1 MKL_NUM_THREADS=1 \
  ./build-benchmark/benchmark/benchmarks \
  --bench g1_hand_self_collision --backend=both -- --steps 20000

For proximity, --shape torso|pelvis|limb|capsule|sphere selects one primitive. MuJoCo collides the hand as a convex hull; RaiSim tests its mesh triangles. Both use true cylinders. Both G1 runs exclude contacts with the nearest ancestor that has collision geometry, but use their engines' own dynamics and contact solvers. Compare contact counts and, when RaiSim output is expected to match, signatures alongside timings. A timing ratio alone does not establish matching contact behavior.

Scene illustrations ​

Chain, 10 links

Ten-link spring chain curling upward.

Chain, 20 links

Twenty-link spring chain curling upward.

ANYmal standing

ANYmal standing on flat ground.

ANYmal falling

ANYmal falling freely above a reference floor.

ANYmal on terrain

ANYmal standing on fractal terrain.

Rigid primitives

Sixteen boxes and sixteen spheres on a ground plane.

Strandbeest

Twelve-legged Strandbeest walking linkage.

Heightmap LiDAR

ANYmal C on fractal terrain, with green LiDAR hit points and sample rays.

Primitive ray scaling

A field of 10,000 spheres, boxes, capsules and cylinders, with green hit rays and red miss rays.

Deformable cloth

A 32 by 32 particle cloth draping over a static sphere above a ground plane.

Deformable cube stack

Eight deformable cubes falling into contact on a ground plane.

Images show the RaiSim setups. The chain, falling robot, and primitive ray field have a floor only for visual reference. Green LiDAR points are recorded terrain hits; colored ray segments illustrate hits and misses without changing the benchmark's collision geometry.

RaiSim — physics for robotics and AI.