System Identification#
System identification closes the sim-to-real gap by tuning the simulated robot’s joint dynamics to match trajectories recorded on hardware. MuJoCo Playground uses the MuJoCo sysid toolbox end-to-end to fit joint dynamics parameters from logged trajectories and generate diagnostic comparison reports.
SO-101 Example#
In tasks/sysid/so101, mujoco.sysid fits armature, frictionloss, stiffness, and damping across
all 6 SO-101 joints from teleoperation MCAP logs.
# 1. Record an excitation trajectory on hardware (press `a` to start, sweep all joints, press `d` to save)
uv run --extra so101 playground teleop so101 \
--instruction="sysid_excitation" \
--num_episodes=1
# 2. Fit joint dynamics parameters from `.local/so101_teleop_logs`
uv run --extra so101 playground sysid so101
# 3. View the generated HTML report
open .local/so101_sysid_results/report.html
Pre-identified dynamics constants for the SO-101 are checked into robots/so101/sim/constant.py. To use newly fitted
parameters from your own hardware, copy the identified values from report.html into
robots/so101/sim/constant.py.
i2rt YAM Example#
In tasks/sysid/yam, collect verifies three scripted 50 Hz excitation trajectories in simulation (checking
contacts, desk clearance, and joint limits) before replaying and logging them on hardware through the I2RT SDK. run
then fits armature, frictionloss, kp, and kv with mujoco.sysid, reports tracking RMSE on training
and held-out validation episodes, and prints a --freeze_params flag for any parameters the data does not identify.
# 1. Verify excitation trajectories in simulation and record them on hardware
uv run --extra yam python -m mujoco_playground.tasks.sysid.yam.collect
# 2. Fit joint dynamics parameters from `.local/yam_sysid_logs`
uv run --extra yam playground sysid yam
# 3. View the generated HTML report and `identified_params.json`
open .local/yam_sysid_results/report.html
Pre-identified dynamics constants for the YAM are checked into robots/yam/sim/constant.py. To use newly fitted
parameters from your own hardware, copy the identified values into robots/yam/sim/constant.py.