Tools & simulation · topic G6 · 35 hours
MuJoCo / ManiSkill & training environments
MuJoCo has the most accurate contact and joint dynamics among open-source simulators, and it is the de facto standard of RL papers. Task suites (ManiSkill, Gymnasium-Robotics) let you start training without building an environment yourself.
What to learn
- MJCF modeling: the body / joint / geom / site hierarchy, the mesh vs primitive trade-off, and whether inertia parameters come from CAD or are computed from collision geometry
- Contact parameters: solref (time constant and damping ratio), solimp, friction, condim; penetration and «bouncing» are almost entirely decided by these two groups
- Actuator types: position / velocity / motor / general, and the physical meaning of ctrlrange vs forcerange
- Why it is fast: sparse solving + the contact model; MJX moves the same models onto JAX for GPU parallelism
- Task suites: Gymnasium-Robotics (Fetch grasping, ShadowHand cube reorientation), ManiSkill 3 (manipulation tasks + a large asset library), RoboSuite, Meta-World
- Observation/action space design: joint positions vs end-effector pose (Cartesian), absolute vs incremental, action scaling and smoothness penalties
- Choosing against Isaac: contact accuracy and lightweight → MuJoCo; large-scale parallelism and vision → Isaac
The lesson · plain words
MuJoCo is the open-source simulator with «the most accurate contact dynamics»: open-sourced after DeepMind acquired it, it is the de facto standard of manipulation research. ManiSkill layers manipulation task benchmarks on top of it. This page covers its soul: the soft contact model.
Soft contact: not a hard constraint, a tunable spring
MuJoCo models collision as «a spring plus damper with tunable stiffness»: penetrating a few millimeters is normal, and contact force = stiffness × penetration. Watch the animation and drag the stiffness: the force-penetration curve slope changes — stiffer is more realistic but demands more solver iterations.
This is why a grasp that «squeezes the object out of shape» still reports success in sim — your solref/solimp parameters softened the contact. To judge whether contact is trustworthy: check that penetration stays within the task's accuracy requirement.
Interactive figure · drag it and see
MuJoCo's three signatures
① Soft-constraint framework: all contacts/limits are unified into one convex optimization, so solving is stable (far fewer F1 blowups); ② MJCF format + compile-time checks: model errors surface at load time; ③ Speed: a single environment outpaces most engines, and with MJX (JAX) it scales up to GPUs.
Choosing against Isaac: precision manipulation / contact-sensitive tasks → MuJoCo; large-scale parallel RL → Isaac; the middle ground is MuJoCo MJX or ManiSkill (SAPIEN engine, GPU parallelism + a manipulation task suite).
ManiSkill and manipulation benchmarks
ManiSkill offers 20+ manipulation tasks (grasping / door opening / block stacking) behind one unified evaluation interface: same code, swap the task, swap the algorithm, fair comparison. Learning manipulation RL starts from running benchmarks — reproduce the baseline first, innovate later.
The engineering ledger of a training environment: observation design (proprioception + vision + goal info), the reward function (the shaping discipline of C6), termination conditions (success / failure / timeout). These three decide whether training converges, and they matter more than the algorithm choice.
How deep to go
Build a scene with a gripper in MJCF and run RL on it; explain how the soft contact parameters affect «penetration»; reproduce one baseline on ManiSkill. Do these three things and you can both read and reproduce manipulation RL papers.
Three questions — do you really get it?
1. What is MuJoCo's contact model, at its core?
- AHard-constraint solving
- BA particle system
- CSoft contact with tunable stiffness (spring + damper)
Show answer
C. Penetration × stiffness = contact force. Stiffness and the solimp parameters decide «how real it looks».
2. The grasp «squeezes the object out of shape» yet reports success — what should you check?
- AThe reward function
- BWhether the contact parameters (solref/solimp) are tuned too soft
- CThe camera pose
Show answer
B. Under soft contact, large penetration with low force can still «succeed». Calibrate contact stiffness against the task's accuracy requirement.
3. The right simulator for a precision peg-in-hole task?
- AIsaac (parallelism first)
- BEither one
- CMuJoCo (contact accuracy first)
Show answer
C. For contact-sensitive tasks accuracy is everything; MuJoCo's soft-contact framework is more trustworthy.
Keep going deeper
Links without a marker stay on this site; the rest point to the Chinese edition until its translation batch lands.
How it fails in the field
- Jumping straight into Isaac and spending two weeks wrestling GPU drivers and Omniverse while the environment never runs — get the task running in MuJoCo first
- Absolute joint angles as the action space and the policy never learns: switching to incremental + scaling + clamping took success rate from 0 to 60% immediately
- timestep set to 1/240 but gains tuned the 1 kHz way — the whole robot shakes in sim, and then you blame the solver
You have learned enough when
The Chinese edition carries the full topic page for MuJoCo / ManiSkill & training environments, including the complete outline, depth requirements per career track, and further derivations: robotguide.dev/k/G6/.