Learn / Practice

Embodied AI practice (13): where should recovery resume after interrupted lowering?

EMBODIED-AI / EXPLORE · Engineering cases

18 MuJoCo rollouts and synchronized replay connect phase contracts to recovery budgets, separating false holds, physical placement and controller abort.

INTERMEDIATE · 13 MIN · UPDATED 2026-10-04 · PART 13 / 22

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

  1. 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.

    13 MINPublished

View count unavailable

On this page 9
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 ad2e33523e8e5580da90ae914e1cccf765c8d1b1
python -m venv .venv
$py = '.\.venv\Scripts\python.exe'
& $py -m pip install -r requirements-lock.txt
& $py experiments/vl01_phase_recovery/run.py --out outputs/my-run
& $py experiments/vl01_phase_recovery/audit.py outputs/my-run

Expect 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 and audit · Experiment record

The previous study exposed a blind spot: transfer-only monitoring ignores observation loss during lowering. Extending the same grasp check to lowering sounds straightforward, but transfer requires height while lowering deliberately reduces it. Copying that condition makes normal movement look like failure.

This experiment combines phase contracts, recovery evidence and trajectory resumption: when to pause, what permits recovery, and which stage to resume.

Watch the same interruption under three policies

The video renders archived MuJoCo states at matching sample ticks. It does not rerun physics to create a better outcome. From left to right: transfer-only, copied transfer rules, and phase-aware recovery.

The gap occurs at 6.10–6.34 seconds. The middle controller has already stopped incorrectly before the gap starts. The left controller ignores it. The right pauses, collects new evidence and resumes lowering.

Frozen conditions

The scene, gripper, cube and target bin are unchanged. Each rollout lasts twelve seconds at a 2ms physics step. There is no learned policy, ROS2 connection or hardware experiment.

Condition Intervention
Clean None
Transfer gap Withhold packets at 4.60–4.84s
Early lowering gap Withhold packets at 5.60–5.84s
Late lowering gap Withhold packets at 6.10–6.34s
Permanent lowering gap Withhold packets from 5.60s onward
Lowering drop Force gripper open at 5.60–5.84s; observations continue

Six conditions × three policies gives eighteen rollouts. Interventions use absolute simulation time. Once policies alter trajectories, the same interval need not encounter the same phase; interpretation must include scheduled_phase and event records.

All policies retain a two-resume budget, 400ms minimum hold and 800ms revalidation deadline. Terminal exit is fixed to holding the current target, avoiding a second exit-policy variable.

Assign evidence to its phase

Policy Transfer predicate Lowering predicate
transfer-only Both finger contacts, grasp error below 5cm, cube above 12cm Inactive
reuse-transfer Same Same transfer predicate
phase-aware Same Both contacts and grasp error below 5cm

Removing the height floor during lowering does not remove contact, relative-position or freshness checks. Final placement is independently evaluated from the last 500ms of physical records.

Clean and late-gap trajectories reveal false stops caused by transfer height rules

HOLD must preserve the interrupted phase

Execution state (running, hold, aborted) and task phase (transfer, lower, release) are separate dimensions. Entering HOLD during lowering saves interrupted_phase=lower. Replacing it with hold would lose the context needed to evaluate observations and rebuild the path.

if self.state == 'running' and phase != self.context:
    self.context = phase
    self.bad_since = None

Context changes only while running. A later hold or release label cannot restart the hold deadline. Recovery still requires a fresh, contiguous window of acceptable observations captured after HOLD; acceptability now depends on the interrupted phase.

Resume lowering without lifting back up

The old recovery path always returned to the 18cm transfer destination. The new path uses the saved phase:

Interrupted transfer: measured hand → transfer destination → lower → release → retreat
Interrupted lowering: measured hand → lowering destination → release → retreat

The first connection lasts 0.5s and starts from the measured gripper position. This is fixed-target trajectory stitching, not obstacle avoidance, regrasping or optimal control.

A measured 400ms hold

The phase-aware late-gap rollout records:

Event Tick Simulation time
Stale observation causes HOLD 3071 6.142s
New valid window begins 3171 6.342s
Minimum hold satisfied; resume lower 3271 6.542s

It resumes lowering directly and satisfies the unchanged final placement predicate, with cube center around 25.98mm and bin-floor contact.

By contrast, reuse-transfer holds at 6.002s because normal lowering violates its height floor, then aborts at 6.802s. This precedes the injected gap at 6.10s. The clean rollout stops at the same time, so the failure cannot be attributed to the gap.

Physical placement is not controller completion

The table reports physical acceptance, not an estimated success rate. There is one fixed rollout per cell, no randomized initial conditions or confidence interval.

Condition transfer-only reuse-transfer phase-aware
Clean Accepted Rejected; false hold Accepted
Transfer gap Accepted; one resume Rejected during lowering Accepted; one resume
Early lowering gap Accepted; unmonitored Rejected after resuming Accepted; one resume
Late lowering gap Accepted; unmonitored Rejected before intervention Accepted; one resume
Permanent lowering gap Accepted; unmonitored Rejected; terminal hold Rejected; terminal hold
Lowering drop Accepted Accepted, but aborted Accepted, but aborted

Two distinctions matter. First, transfer-only completes the fixed trajectory despite permanently missing observations. That shows this scene's open-loop path happened to suffice, not that ignoring observations is safer. Phase-aware recovery holds at 5.642s, aborts at 6.442s and leaves the cube around 157.81mm above the world origin.

Second, the forced release occurs directly above the bin. Both policies monitoring lowering detect contact failure and abort, but the cube falls into the target and eventually passes physical acceptance. This is neither successful recovery nor a designed release strategy.

Twelve of eighteen rollouts meet physical acceptance; two of those twelve have an aborted controller. Future evaluation should retain physical outcome, observation compliance and controller lifecycle separately rather than collapse them into an undefined success score.

Evidence and audit

The archive contains 108,000 control/observation rows, 10,800 replayable states and 54 raw files. The audit recomputes placement, checks packet gaps and actuator interventions, validates recovery windows and budgets, and compares eighteen policy pairs for identical physical prefixes up to their first divergent decision.

Eight contract tests cover low-height lowering, low-height transfer, frozen hold context, absolute deadlines, inactive release monitoring, contact failure, recovery routing and exhausted budgets.

Replay calls mj_forward on stored qpos/qvel, not mj_step to create a new trajectory. The MuJoCo simulation documentation describes their different roles. Replays do not add experimental samples.

Reproduce and respect the scope

From hohoo-embodied-agent:

python -m unittest discover -s experiments/vl01_phase_recovery -p test_gate.py
python experiments/vl01_phase_recovery/run.py --out evidence/my-run
python experiments/vl01_phase_recovery/audit.py evidence/my-run
python experiments/vl01_phase_recovery/replay.py --evidence evidence/my-run

The run used MuJoCo 3.3.7, NumPy 2.2.6 and Python 3.12.14. Replay also needs the existing imageio/FFmpeg and rendering environment.

Results cover only this fixed simulation and the stated interventions. They do not certify hardware safety, safe retreat under permanent observation loss or regrasping. Full VL01 and later milestones remain incomplete.

A useful next study would connect completion contracts to this recovery chain: when completion may be declared, how an accidental post-abort placement is recorded, and how later invalid evidence revokes completion. This round establishes an auditable separation between recovery phase and physical outcome.

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:Embodied AI practice (14): does landing in the bin mean the task is complete? →

You are here

EXPLORE / Getting started with embodied AI

  1. ○ Embodied AI practice (12): what should the gripper do after recovery is exhausted?
  2. ○ Embodied AI practice (13): where should recovery resume after interrupted lowering?
  3. ○ Embodied AI practice (14): does landing in the bin mean the task is complete?

KEEP EXPLORING

Related content

  1. LAB / 026

    Embodied AI practice (13): where should recovery resume after interrupted lowering?

    18 MuJoCo rollouts and synchronized replay connect phase contracts to recovery budgets, separating false holds, physical placement and controller abort.

    Completed
  2. 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.

    Experiment
  3. Engineering cases

    Embodied AI practice (12): what should the gripper do after recovery is exhausted?

    12 MuJoCo rollouts and synchronized three-view replay compare hold, open and open-retreat, separating terminal decisions from physical consequences.

    12 MINPublished
  4. Engineering cases

    Embodied AI Practice VII: Why a Transfer Rule Stops Normal Lowering

    21 MuJoCo rollouts separate stage-specific grasp checks, stop actions and final placement. A false alarm and lingering finger contact reveal two different failure modes.

    13 MINPublished
  5. Engineering cases

    Embodied AI practice (11): placement completed, but is it still valid?

    Seven MuJoCo rollouts and a paired replay separate historical completion from current validity, including false alarms and expiry boundaries.

    11 MINPublished

Which way next?

Based on article relationships and published same-topic content, not random recommendations.

← All writing