Learn / Practice
MuJoCo obstacle clearance: a point path is not a body path
EMBODIED-AI / EXPLORE · Engineering cases
Six contact trajectories compare direct, edge and clearance paths while separating geometry from controller tracking.
What was published after this article?
The original conclusions and next-step proposals are retained. These published follow-ups do not imply that every limitation has been resolved.
KEEP EXPLORING
Related content
- Engineering cases
Delayed MuJoCo feedback: can an old observation predict now?
Twenty-four paired traces compare delay, position noise and constant-velocity prediction, retaining incomplete recoveries.
View count unavailable
On this page 4
Reproduce from a clean checkout · this article’s revision
Windows PowerShell with Python 3.12. Use a new directory, not a working copy with unsaved changes. Each article pins its own revision; the first article’s revision does not contain later experiments.
git clone https://github.com/VirtualSelect/hohoo-embodied-agent.git hohoo-embodied-agent-study
cd hohoo-embodied-agent-study
git checkout 831789c2a1efb4564c4cfabc2298e48e16ada879
python -m venv .venv
$py = '.\.venv\Scripts\python.exe'
& $py -m pip install -r requirements-lock.txt
& $py experiments/planar_reach/run.py --out outputs/my-run
& $py experiments/planar_reach/audit.py outputs/my-runExpect raw trajectories, summaries and audit results. Use a new output directory to preserve earlier results; runners differ in how they handle existing directories. E8–E10 share one experiment runner. No model calls are made; run the numeric experiment first and use the article’s separate replay command for video.
Troubleshooting: a missing experiment directory usually means the wrong revision; import failures require checking the interpreter and environment. OpenGL errors concern rendering steps. On Linux/macOS use .venv/bin/python; those platforms have not been retested.
Inspect the pinned code ↗Pinned code · Raw evidence · Lab record
The empty scene reaches its target. Add a box at x=0.3m while keeping the target at x=0.6m and the controller unchanged: mass 1kg, Kp=80, Kd=18, ±5N per axis. A direct path hits the wall. A path that merely clears it for a point also fails because the actuator has a 35mm radius.
Fixed path comparison
The wall has x half-width 40mm and y half-width h of either 40mm or 90mm.
| Route | Targets |
|---|---|
| direct | (0.6,0) |
| corner | (0.16,h), (0.44,h), then goal |
| clearance | (0.16,h+0.1), (0.44,h+0.1), then goal |
The controller advances within 15mm of a waypoint. The 100mm clearance is a fixed teaching choice, not an optimized or certified safety distance.
For a sphere, expanding obstacles by its radius converts body clearance into a point-path question. Tracking error adds another margin: inertia can cut corners or overshoot. This example uses fixed waypoints, not a general planner.
Actual contact results
| Wall half-height | Route | Contact samples | Final error | Completion |
|---|---|---|---|---|
| 40mm | direct | 1850 | 374.79mm | No |
| 40mm | corner | 1680 | 376.86mm | No |
| 40mm | clearance | 0 | <0.01mm | Yes |
| 90mm | direct | 1850 | 374.79mm | No |
| 90mm | corner | 1670 | 385.19mm | No |
| 90mm | clearance | 0 | <0.01mm | Yes |
Contact samples are 2ms states containing contact, not separate collision events. Sustained contact contributes many samples. No impact-force or hardware-damage conclusion follows.
Both clearance routes pass; the other four fail. This supports the need for body clearance in this scene, not universal obstacle avoidance.
Inspect the right trajectory
Waypoints are controller targets; mj_step integrates actual position. The plot uses recorded x/y, not a drawing of intended targets. Direct motion should stop at the wall, corner motion should remain blocked, and clearance should travel above it. If a run passes through the wall, inspect contact masks before celebrating the planner.
Exercise: enlarge the sphere without changing waypoints. Compute the geometric clearance, account for the waypoint tolerance, then inspect actual contacts. Lower damping as a second exercise to see whether a geometrically valid path remains trackable.
Dynamic obstacles, articulated robot configurations, narrow passages and hardware safety are outside this study. Next: delayed noisy feedback.
Reproduce from a clean checkout
Python 3.12. The runner executes all three comparisons; each article discusses its own subset.
git clone https://github.com/VirtualSelect/hohoo-embodied-agent.git hohoo-embodied-agent-study
cd hohoo-embodied-agent-study
git checkout 831789c2a1efb4564c4cfabc2298e48e16ada879
python -m pip install -r requirements-lock.txt
python experiments/planar_reach/run.py --out outputs/my-run
python experiments/planar_reach/audit.py outputs/my-run
python experiments/planar_reach/plot.py outputs/my-runUse a new output directory. Windows was exercised; Linux/macOS were not rerun. No model API or key is required. The source commit in the manifest precedes the evidence commit linked above; source hashes bind the executed files.
A note to your future selfBefore you move on, keep one thought of your own.
Your private reading note stays in this browser; it is never uploaded or published. Clearing browser data removes it, so export a copy to keep. This article’s translations share the same note.
Next published article:Delayed MuJoCo feedback: can an old observation predict now? →
You are here
EXPLORE / Getting started with embodied AI
- ○ A second MuJoCo scene: why does the actuator overshoot?
- ○ MuJoCo obstacle clearance: a point path is not a body path
- ○ Delayed MuJoCo feedback: can an old observation predict now?
KEEP EXPLORING
Related content
- LAB / 037
MuJoCo obstacle clearance: a point path is not a body path
Six contact trajectories compare direct, edge and clearance paths while separating geometry from controller tracking.
- PROJECT / 003
Hohoo Embodied Experiments
Two MuJoCo teaching scenes—pick-and-place and planar force control—record contracts, tuning, clearance and delayed-feedback outcomes, including failures.
- Engineering cases
A second MuJoCo scene: why does the actuator overshoot?
Compare mass and PD damping in a planar force-controlled actuator, separating target crossing from stable completion.
Which way next?
- A second MuJoCo scene: why does the actuator overshoot? →
Compare mass and PD damping in a planar force-controlled actuator, separating target crossing from stable completion.
Based on article relationships and published same-topic content, not random recommendations.