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

  1. 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).
  2. 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.
  3. 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

O1000is MuJoCo's default density: with no mass given, it infers mass from geom volume and a density of 1000, that of water (MKS)
O9.81meters per second squared: MuJoCo's default gravity points straight down at about 9.81, Earth's surface gravity (MKS)
O2 msdefault timestep (0.002 s): the single most important parameter in the speed-accuracy trade-off every physics simulation has

Further reading