The Stale-Command Timeout Your Humanoid Twin Never Exercises

On most humanoids, one number decides whether the fallback works: how long the joint-level controller keeps executing the last policy command before it declares the policy dead and drops into a damped hold. That number lives in a YAML file. Reviewers read it as plausible, and the digital twin almost never exercises it, because the twin runs the policy and the physics in lockstep. So the fallback exists on paper and fails on the floor.

Why it passes review

The common version is a unit mismatch. Someone writes `stale_command_timeout: 500` meaning milliseconds, the controller parses it as seconds, and the reviewer sees a sensible integer next to a sensible key. The diff is syntactically clean, schema validation accepts any positive number, and the integration tests pass because nothing in them ever stalls the policy. The worse variant is layered configuration: a site override file quietly shadows the safe default, and the merged value is never printed anywhere a human looks. Review covers the text that changed, not the value the process actually loaded.

Lockstep simulation hides the failure

In a co-simulated twin, the physics engine advances only when the policy returns an action, so from the controller's point of view the policy is never late. Inference latency spikes from GPU contention, thermal throttling on the onboard compute, a garbage collection pause in the foundation model server and a dropped middleware sample all disappear in synchronous mode. The staleness timer never fires, and the transition to damped hold gets zero coverage. On hardware, the same robot with a 500 second hold keeps replaying a whole-body target while its feet, its payload and the world move underneath it, and because a humanoid mid-stride is not statically stable, a stale command does not freeze the robot. It produces an uncontrolled fall that the logs record as nominal, because no state transition happened.

Measure it today

Run the twin in asynchronous wall-clock mode, with the physics stepping on its own real-time clock and the policy connected through the same middleware it uses on the robot. While the simulated robot is walking, send SIGSTOP to the policy process and note the timestamp. Then read the controller's mode or diagnostics topic and record when it reports entering its fallback state: the gap between those two timestamps is your effective timeout, measured instead of read off a file. Alongside that, make the controller log its fully resolved configuration at startup and check that dump in CI against an allowed range, so an out-of-bounds merged override fails the pipeline instead of slipping through review. A staleness timeout of 100 ms is a reasonable starting point for a whole-body controller fed by a learned policy, and the measured transition should land within a couple of control cycles of it. If there is no transition at all, or it is off by orders of magnitude, you have found the incident before it happened.

Where the bound comes from

Derive the bound from how long the robot stays stable while executing a command open-loop (an estimate of a few hundred milliseconds at most for a walking humanoid), give it the same discipline that functional safety standards for robots and machinery, such as ISO 10218 and IEC 61508, apply to a protective stop, and accept the trade-off that remains: a tighter timeout will trip on ordinary inference jitter and drop the robot into damped hold more often, so the next decision is whether to buy latency headroom in the policy server or live with more nuisance stops.

Why not just inject random latency into the lockstep simulation?

In lockstep, injected latency also pauses the physics, so the world waits for the late policy and the controller still never sees a stale command. The staleness path only becomes observable when the physics and the policy run on independent clocks, which is why the detection step needs the twin running in wall-clock mode rather than a delay added to the existing synchronous loop.

Back to EmbodiedTwins · Domains

← Back to EmbodiedTwins
Engineering & Architecture Brief

The Stale-Command Timeout Your Humanoid Twin Never Exercises

On most humanoids, one number decides whether the fallback works: how long the joint-level controller keeps executing the last policy command before it declares the policy dead and drops into a damped hold. That number lives in a YAML file. Reviewers read it as plausible, and the digital twin almost never exercises it, because the twin runs the policy and the physics in lockstep. So the fallback exists on paper and fails on the floor.

Why it passes review

The common version is a unit mismatch. Someone writes `stale_command_timeout: 500` meaning milliseconds, the controller parses it as seconds, and the reviewer sees a sensible integer next to a sensible key. The diff is syntactically clean, schema validation accepts any positive number, and the integration tests pass because nothing in them ever stalls the policy. The worse variant is layered configuration: a site override file quietly shadows the safe default, and the merged value is never printed anywhere a human looks. Review covers the text that changed, not the value the process actually loaded.

Lockstep simulation hides the failure

In a co-simulated twin, the physics engine advances only when the policy returns an action, so from the controller's point of view the policy is never late. Inference latency spikes from GPU contention, thermal throttling on the onboard compute, a garbage collection pause in the foundation model server and a dropped middleware sample all disappear in synchronous mode. The staleness timer never fires, and the transition to damped hold gets zero coverage. On hardware, the same robot with a 500 second hold keeps replaying a whole-body target while its feet, its payload and the world move underneath it, and because a humanoid mid-stride is not statically stable, a stale command does not freeze the robot. It produces an uncontrolled fall that the logs record as nominal, because no state transition happened.

Measure it today

Run the twin in asynchronous wall-clock mode, with the physics stepping on its own real-time clock and the policy connected through the same middleware it uses on the robot. While the simulated robot is walking, send SIGSTOP to the policy process and note the timestamp. Then read the controller's mode or diagnostics topic and record when it reports entering its fallback state: the gap between those two timestamps is your effective timeout, measured instead of read off a file. Alongside that, make the controller log its fully resolved configuration at startup and check that dump in CI against an allowed range, so an out-of-bounds merged override fails the pipeline instead of slipping through review. A staleness timeout of 100 ms is a reasonable starting point for a whole-body controller fed by a learned policy, and the measured transition should land within a couple of control cycles of it. If there is no transition at all, or it is off by orders of magnitude, you have found the incident before it happened.

Where the bound comes from

Derive the bound from how long the robot stays stable while executing a command open-loop (an estimate of a few hundred milliseconds at most for a walking humanoid), give it the same discipline that functional safety standards for robots and machinery, such as ISO 10218 and IEC 61508, apply to a protective stop, and accept the trade-off that remains: a tighter timeout will trip on ordinary inference jitter and drop the robot into damped hold more often, so the next decision is whether to buy latency headroom in the policy server or live with more nuisance stops.

Technical FAQ: Why not just inject random latency into the lockstep simulation?

In lockstep, injected latency also pauses the physics, so the world waits for the late policy and the controller still never sees a stale command. The staleness path only becomes observable when the physics and the policy run on independent clocks, which is why the detection step needs the twin running in wall-clock mode rather than a delay added to the existing synchronous loop.

Related Architecture Specifications (DIGITALTWINS): multibodysim.com · proofsim.com · drivingtwins.com

More Technical Articles on embodiedtwins.com

Synthetic Pretraining vs Real-World Fine-Tuning in Humanoid Manipulation →Robust Multi-Contact Loco-Manipulation under Stochastic Dynamic Payloads →The Sim Clock That Followed Your Humanoid Onto the Factory Floor →The Watchdog That Freezes With the Humanoid Twin →