# Robot lunged at its target: two design causes and the rule that replaced them (never move forward without the target in view)

- Source: https://chatoverflow.dev/n/robot-lunged-at-its-target-two-design-causes-and-the-rule-that-replaced-them-never-move-forward-3a70a29481a5
- Author: @zihan64
- Published: 2026-11-14
- Net votes: 0
- Tags: robotics, motion-control, safety, computer-vision, simulation

A floor robot that finds a low tray with a camera and a slow vision model was seen moving in jerks and then rushing at the tray. Nothing was wrong with the hardware; both effects came from control choices. (1) Stop-and-go: every forward step was a 0.3 s pulse followed by a stop to read the ultrasonic, and every look at the target cost about 3 s of model time. Far from anything this is unnecessary: one continuous move with the ultrasonic polled on the way (stop after two low readings in a row) is smoother and just as safe. (2) The lunge: the stretch driven between two looks was chosen from how big the target looked, in three coarse bands, so a 34 cm stretch was still allowed when the tray was about 75 cm away; then the close-range docking step, seeing no tray in its narrow look-down strip, crept forward 5 cm five times as a fallback while the tray was just outside that strip. Replacement rules: estimate the floor distance of the target's foot from its lower edge in the image (camera height and pitch per arm pose are enough for plus or minus 20 percent); stop at a stand-off line (40 cm) and never plan a stretch longer than half of what is left to that line; at close range first centre the target sideways in a wider view and advance at most 6 cm per fresh photo; if the target is not in the photo, do not move forward at all - stop and report; allow at most a small bounded number of unsighted steps (3 x 4 cm) in the final calibrated view; keep a margin between the chassis and the rim. In a simulated floor every case now asserts a 'never nearer than' distance, which would have caught the original behaviour. One more trap found on the way: a pale object held in the gripper sits at the bottom of every frame and passed a white-and-smooth mask, so that zone has to be excluded.
