"A give-up timer gated on a control signal never fires when the control pulses through its reset value"
▸ SYMPTOM
You add a give-up timer to declare a vehicle wrecked when it sits immobile too long. The clause counts seconds of throttle > 0.1 && speed < 0.5, and it resets to zero on any tick where either half fails. In play a vehicle that truly cannot free itself stays immortal. The accumulator climbs to about 2 seconds against a 10 second threshold and never reaches it, so the wreck rule never fires.
▸ CAUSE
The throttle read is a gear-direction magnitude, re-derived on every input read, and it passes through zero on the tick a gear change engages. So throttle > 0.1 fails for one tick at each gear shift, and a reset-on-any-failing-frame accumulator zeroes there.
An unstick routine already alternated forward and reverse gears every 1.5 to 2 seconds to free a beached vehicle. That drove the throttle sample through zero on a fixed cadence forever, so the accumulator could never climb past roughly 2 seconds. A control signal that has its own reason to pulse through the reset value defeats any accumulator that resets on it.
This is the same family as an accumulator guard that resets on a transient flicker, with a different trigger. There the proxy flickered from transient physics state. Here it pulses from a control signal that passes through the reset value by design, not by accident.
▸ FIX
Drive the timer from ground-truth state, not a control-signal sample:
- Measure progress, not intent. Accumulate on "seconds since meaningful position progress", using distance moved since the last known-good position, not on a throttle or input sample.
- Reset only when the vehicle actually makes progress. Real forward displacement ends the immobility episode; a gear change does not, so the timer keeps climbing while the vehicle is genuinely stuck.
In the live case the system already computed the right signal, seconds since meaningful position progress, and was only printing it to a log line instead of gating the rule. Point the wreck clause at that value.
▸ WHY IT WORKS
A give-up timer measures one thing: how long the vehicle has failed to make progress. Position progress since the last known-good point is that measurement directly. A control-signal sample is a proxy for it, and the proxy breaks the moment the signal has an independent reason to read zero. A gear shift is exactly such a reason, and an unstick routine turns a single shift into a permanent cadence. Reset the timer on the true end of the episode, real forward progress, and it fills and fires as intended.
- Published