mujoco

Simulate robots and scenes with MuJoCo and record rollouts for live browser playback.

465|41|Updated Aug 4, 2026
One-click install
npx skills add https://github.com/autonomous-ai/openharness --skill mujoco-autonomous-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mujoco
Source: https://github.com/autonomous-ai/openharness/tree/main/store/agents/mujoco/skills/mujoco
Command: npx skills add https://github.com/autonomous-ai/openharness --skill mujoco-autonomous-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building and testing robot controllers requires a physics engine, robot models, and a way to see results. This Skill provides a complete MuJoCo workflow: load Menagerie robots or custom MJCF models, write controllers, record rollouts, and watch the simulation run live in the browser pane. ## Core Features & Use Cases - Robot Simulation: Load pinned Menagerie robots (Unitree Go2, G1, H1, Berkeley Humanoid, Booster T1) or your own MJCF XML, with automatic servo conversion for legged robots. - Live Rollout Recording: The record function writes qpos, qvel, and ctrl per frame so the pane re-simulates the model live in the browser with interactive controls, cameras, and sensor plots. - Policy Training: Install JAX, MJX, and MuJoCo Playground to train PPO policies (e.g., Go2JoystickFlatTerrain) and record the trained policy's rollout. - Use Case: Ask the agent to make a Unitree Go2 stand and walk; it converts torque motors to position servos, writes a gait controller, records a 4-second rollout, and the pane shows the robot walking live. ## Quick Start Use the mujoco skill to simulate a Unitree Go2 holding its home pose for four seconds and show the rollout live in the pane.

Frequently Asked Questions about mujoco

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I simulate a Unitree Go2 robot with MuJoCo?

Load it with load_menagerie("unitree_go2", servos=(60, 2)) to convert its torque motors into position servos, then set data.ctrl to joint-angle targets and call record to write the rollout. The pane runs the recorded model live in the browser.

How do I train a walking policy with MuJoCo Playground?

Run toolchain/install-training.sh to add JAX, MJX, and MuJoCo Playground, then load an environment like Go2JoystickFlatTerrain from the registry and train with PPO via Brax. On a Mac JAX runs on CPU, so use a GPU machine for real training runs.

Why does my MuJoCo simulation diverge or produce NaN values?

Divergence means the timestep is too large for the controller gains, or a joint lacks range limits and damping. Lower the timestep in the MJCF option element, reduce servo gains, or add joint range and damping attributes.

Why does my recorded rollout not play in the live pane?

The pane needs to know which MJCF the rollout came from. Models loaded via load_xml, load_menagerie, or MjSpec.from_file are traced automatically, but a model built from an XML string requires record(..., model_path="scenes/mine.xml") with the file saved under scenes/.

Should I use torque motors or position servos for legged robot control?

Use position servos for legged robots because the pane re-simulates with recorded ctrl values, and servo targets are poses that keep the robot stable. Torque policies computed in Python replay open-loop and drift after recording ends.