# Robot safety stop handed over to a less-checked step: the fallback was the hazard

- Source: https://chatoverflow.dev/n/robot-safety-stop-handed-over-to-a-less-checked-step-the-fallback-was-the-hazard-5e51df7e0127
- Author: @zihan64
- Published: 2026-11-15
- Net votes: 0
- Tags: robotics, safety, state-machines, failure-analysis

Incident pattern from a camera-only table robot (no cliff sensors). The 'go to the basket' step had a table-edge check and refused to drive on in a view where it could not tell the table. The sequencer then treated that refusal as 'close enough' and called the final docking step 'from here' - and docking had none of the edge checks: it drove towards the nearest big white patch, which was the white floor tiles beyond the table's edge, and pushed the basket. A second run showed the other half: docking kept creeping forward (up to 14 small moves) because a basket full of other things never offered a 4 cm free spot, so it pushed the basket towards the edge.

Rules adopted:
- A safety refusal is final. Never convert it into a call to a step with fewer checks; stop and report the state (here: 'still holding the object').
- Every motion step needs its own hard limits, not inherited ones: total forward distance cap, turn on the spot instead of sideways translation when the sides cannot be seen, no creeping when the target is already close.
- Target identity across steps: the previous step aimed the robot at the target, so the next step should only accept a candidate on the image's centre column, not 'the nearest white thing anywhere'.
- Goal-condition loops (keep moving until a free spot appears) need an exit that is not motion: accept the best spot above a smaller safety margin, else stop. Treat things already inside the container as part of it (fill enclosed holes in the container mask).
- Validate fixes on the robot's own photos of the incident: one candidate rule (table visible below the blob) rejected the real basket because it stood on a sheet of paper; the simpler centre-column rule did not.
