Learn / Practice
A second MuJoCo scene: why does the actuator overshoot?
EMBODIED-AI / EXPLORE · Engineering cases
Compare mass and PD damping in a planar force-controlled actuator, separating target crossing from stable completion.
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.
Related content
- Engineering cases
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.
On this page 3
Reproduce from a clean checkout · this article’s revision
Windows PowerShell with Python 3.12. Copy and run the whole block. Clone, checkout, installation or execution failures stop the block before auditing the wrong revision. Use a new directory: each article pins its own revision, and the first revision does not contain later experiments.
& {
$ErrorActionPreference = 'Stop'
function Assert-StudyCommand {
if ($LASTEXITCODE -ne 0) { throw "Command failed ($LASTEXITCODE). Read the error before continuing." }
}
if (Test-Path -LiteralPath 'hohoo-embodied-agent-study-831789c2') { throw 'Study directory already exists. Choose a new location.' }
git clone https://github.com/VirtualSelect/hohoo-embodied-agent.git 'hohoo-embodied-agent-study-831789c2'; Assert-StudyCommand
Set-Location -LiteralPath 'hohoo-embodied-agent-study-831789c2'
git checkout --detach 831789c2a1efb4564c4cfabc2298e48e16ada879; Assert-StudyCommand
python -m venv .venv; Assert-StudyCommand
$py = '.\.venv\Scripts\python.exe'
& $py -m pip install -r requirements-lock.txt; Assert-StudyCommand
& $py experiments/planar_reach/run.py --out outputs/my-run; Assert-StudyCommand
& $py experiments/planar_reach/audit.py outputs/my-run; Assert-StudyCommand
}Expect raw trajectories, summaries and audit results. The study directory includes the revision; an existing directory stops setup without replacing it. Adjacent articles may share a runner; check the article before rerunning. No model calls are made. Video replay is separate. For later manual commands, specify the interpreter in .venv again: the block-local $py variable is not retained.
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
Earlier studies examined grasping contracts, recovery and completion. This second MuJoCo teaching scene isolates control: a massive spherical actuator moves along two slide joints from (0,0) to (0.6,0), driven by two force motors. It is not an articulated arm, grasping system, ROS2 integration or completed VL01 milestone.
Position error is not a stop command
Force is Kp × position error − Kd × velocity. Kp is fixed at 80; Kd is 0, 18 or 36, with masses 1kg and 2kg. Force is limited to ±5N per axis. Physics runs at 2ms, feedback updates at 20ms, and each rollout lasts four seconds.
P-only force approaches zero near the goal even when momentum remains. D feedback opposes velocity before crossing. More damping may slow the response; mass changes acceleration under the same force. The continuous linear critical-damping expression 2√(mass×Kp) offers intuition, not an optimal tuning guarantee for this saturated, sampled controller.
Completion needs a window
Every sample in the final 0.3 seconds must have error below 15mm and speed below 40mm/s.
| Mass | Kd | Peak x overshoot | Final error | Stable completion |
|---|---|---|---|---|
| 1kg | 0 | 740.6mm | 677.95mm | No |
| 1kg | 18 | 0mm | <0.01mm | Yes |
| 1kg | 36 | 0mm | 0.06mm | Yes |
| 2kg | 0 | 630.9mm | 569.47mm | No |
| 2kg | 18 | 74.0mm | <0.01mm | Yes |
| 2kg | 36 | 0mm | 0.04mm | Yes |
Both undamped cases fail. Kd=18 overshoots with the heavier mass despite eventually passing. Final error alone hides that behavior. Six fixed conditions are not a population success-rate estimate.
The XML uses slide joints and force motors, not direct qpos assignment. The sphere radius is 35mm; gravity and passive joint damping are zero to isolate feedback. See the MuJoCo 3.3.7 XML reference for actuator semantics. Replacing motors with position actuators would change the meaning of the action.
Exercise: inspect saturation in the first rows of 01-gain.csv, then inspect force direction near the goal. Increase mass in a separate run and predict overshoot before looking at the trace. Do not shorten the observation horizon to hide later failures.
Feedback uses simulator state, with no sensor uncertainty or hardware validation in this first comparison. Headless numeric execution needs no OpenGL context. Continue with obstacle clearance.
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.
Recommended next reading:MuJoCo velocity estimation: smoother signals can mean worse control →
Your place in the core path
EXPLORE / Getting started with embodied AI
- ○ Embodied AI practice (14): does landing in the bin mean the task is complete?
- ○ A second MuJoCo scene: why does the actuator overshoot?
- ○ MuJoCo velocity estimation: smoother signals can mean worse control
Related content
- LAB / 036
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.
- 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
Embodied AI practice (14): does landing in the bin mean the task is complete?
Eight MuJoCo trajectories, three passive readouts and recorded-state replay separate historical placement, current evidence and qualified completion.
View count unavailable