MuJoCo simulation12 DOF · Sim2Real

Simulation modelling

A second runtime for the same controller: same gait code, simulated servos and sensors. See the results →

Drive the robot yourself: Play, top right

Purpose

What the simulation is for

Sim2Real loop

One control path, two actuators

Runtime layer
Foot targetsgait / level_body()
→
Leg IK12 joint angles
→
Simulated servosposition PD · torque-speed limit
→
Simulated IMU80 Hz · 25 ms lag · noise
Physics model

Physics is deliberately simple

The detailed meshes are for looks only. The solver sees a few boxes that carry the weight and five shapes that touch the ground.

Loading 3D model…
Show
—total, 4 legs and body
Actuator model

A servo has less torque the faster it turns

Every joint is clipped to the AX-12A torque–speed line: full torque at rest, almost none at top speed.

Torque available——
Of stall torque—no-load 354 °/s
Contact model

Rubber balloon feet: grip comes from friction

High friction, a soft contact patch: planted feet stay put unless the load really exceeds the grip.

Foot
Friction needed——
Steepest slope held—arctan μ, foot alone
Twist resistance0.03torsional, vs 0.005 on the floor
Roll resistance0.003rolling, vs 0.0001 on the floor
Sensor model

What the controller sees is not the truth

An 80 Hz IMU with lag, noise and a wandering bias, like the real MPU-9250.

true tiltIMU reading
Honesty

Measured vs estimated

Measured or from datasheets
  • CAD geometry, plate stack, leg origins
  • Part masses: CAD volume × plastic density
  • AX-12A torque and speed
Estimated, to measure on the robot
  • Balloon foot friction (μ 1.5)
  • Contact patch size
  • IMU noise and bias
  • Battery and bracket masses