Physical AI Lab // Episode 2.1 // One-pager
A grasping scene in MuJoCo
From a page of XML to a physical world that moves
Three key points
- MuJoCo describes the world in MJCF (XML): worldbody, body, geom, joint. With no mass given, it uses the default density (water, 1000); default gravity is 9.81 (O, MuJoCo docs).
- mj_step advances the physics step by step; the default timestep of 0.002 s is a speed-accuracy trade-off (O). Contact forces are solved as a convex optimization; you can read qpos, qvel, contact and ncon.
- Add position actuators and a script (close, lift) to try a grasp; judge it by finger position and cup height. Offscreen rendering is optional; if it won't run, plot the trajectory.
Evidence: O official · R research · M media
| O | 1000 | is MuJoCo's default density: with no mass given, it infers mass from geom volume and a density of 1000, that of water (MKS) |
| O | 9.81 | meters per second squared: MuJoCo's default gravity points straight down at about 9.81, Earth's surface gravity (MKS) |
| O | 2 ms | default timestep (0.002 s): the single most important parameter in the speed-accuracy trade-off every physics simulation has |
Further reading
- MuJoCo docs · Overview
https://mujoco.readthedocs.io/en/stable/overview.html - MuJoCo docs · XML Reference
https://mujoco.readthedocs.io/en/stable/XMLreference.html - MuJoCo docs · Python bindings
https://mujoco.readthedocs.io/en/stable/python.html