From CAD Body to Physics Body
Turn a geometric body into a physics body by giving it the right mass, then simulate on real MuJoCo until the spring-loaded part settles at the spec deflection (-0.10 m).
Try this first — before any explanation.
The Bench opens on a real MuJoCo device: a part hanging on a spring. Press Simulate — it settles, but at -0.040 m, not the spec -0.100 m. The geometry is fine; the PHYSICS is wrong, because the body's mass is only 0.2 kg. A CAD shape is just a shape until you give it mass. Set the right mass.
Edit the MJCF device model and simulate it on real MuJoCo physics — tune the parameter so the part settles at the spec.
The idea, built visually.
A drawing doesn't fall. A shape has no weight until you tell the simulator how much mass it carries — that's the first thing that turns a CAD body into a physics body. Hang a mass on a spring and it stretches until the spring pulls up exactly as hard as gravity pulls down: stiffness times stretch equals m g. So the stretch is m·g divided by stiffness. Heavier body, more stretch. The spring here is 49 newtons per metre and the spec stretch is a tenth of a metre, so the mass has to be about 0.10 times 49 over 9.81 — right around half a kilo.
▣ Stage animation: A grey CAD sphere (no weight, floating) gains a 'mass = ?' tag and drops onto a spring; the spring stretches as a force-balance diagram shows spring-force-up growing to meet weight-down; the deflection readout slides from -0.04 toward -0.10 as the mass value ticks 0.2 → 0.5.
Build it up, step by step.
1. Find the mass. Equilibrium: stiffness·x = m·g, so m = |x|·stiffness / g = 0.10 · 49 / 9.81 ≈ 0.50 kg.
2. Edit the model. In the <geom ... mass="0.2"> line, change the mass to 0.5.
3. Simulate. The load now stretches the spring to -0.10 m and the autograder reads the settled deflection.
How the Bench grades your run.
PASS WHEN PASS when the load settles (velocity ~0) at -0.10 m deflection (±0.006). Real MuJoCo statics on the device.
- Settled at -0.04 m — too little stretch. The body is too light; raise the geom mass (m = 0.10·49/9.81 ≈ 0.5 kg).
- Settled past -0.10 m — too heavy; lower the mass toward 0.5 kg.
- No mass / zero mass makes the body non-physical — give the geom a positive mass.
Bring back what you've already mastered.
- Equilibrium recall: a mass on a spring settles where stiffness·x = ____ (m·g, the weight).
- What turns a CAD shape into a physics body the simulator can drop? (mass + collision geometry).
- If you double the mass on the same spring, the deflection ____ (doubles).
What you must demonstrate to advance.
Set the geom mass so the spring-loaded part settles at -0.10 m on real MuJoCo. Proves you can give a CAD body the physical property (mass) that makes it simulate.
How this feeds your build.
The physics-body habit feeds the M5 capstone, where your designed device must be massed and simulated to prove it works.