Experiment 1: a webcam as the judge
An overhead webcam tracks a toy robot, keeps it inside a taped arena and judges every move. Proof of concept - 29 of 29 tracked moves judged correctly.
- Status
- Done
- Hypothesis
- An overhead webcam can judge a robot's moves as well as a person, and keep it inside its arena, with no human in the loop.
- Hardware
- BroadLink RM4 Mini
- Logitech C920 webcam
- Two-button IR toy robot
- ID
- exp001-vision-observer
Why#
In Experiment 0 a person watches every trial and types y or n. That doesn't scale, and it can't run while nobody is watching. If a cheap camera can judge as well as a person, every later experiment gets automatic evaluation, and reinforcement learning gets its reward.
Setup#
A 94.5 x 69.5 cm rectangle of duct tape on a wood floor, a webcam looking straight down, and the toy robot from Experiment 0. Every command goes through the lab's one path to hardware: tool registry, safety gate, IR blaster. Every step is logged.
How the camera works#
- Where is the robot? Whatever differs from a stored picture of the empty arena. Colour change and brightness change are counted separately, so shadows don't count; the webcam's own exposure shifts are subtracted out; shiny tape is ignored; a region bigger than a robot (a hand, a person) reads as "not tracked", which stops motion.
- Which way is it facing? Learned from motion. After a forward step the robot faces the way it went; after a reverse step, the opposite way.
- Is the move safe? Two rules in the safety gate, not in the camera code: no recent sighting, no motion; and a move whose predicted end comes within 5 cm of the tape is refused. A robot that strays may be moved only if even the worst case brings it back in.
- Did it work? The judge compares where the robot was before and after: forward means at least 5 cm ahead, reverse at least 5 cm back.
- Where next? Each move is picked at random among those predicted to end comfortably inside the arena, so the data stays varied and the robot stays put.
Results#
29/29
tracked moves judged correctly
final run, 30 moves
~1 mm
tracking of a still robot
0
moves the fence had to refuse
0
recoveries needed
The final run: 30 moves, 29 of 29 tracked moves judged correctly (the last move lost the robot, most likely because the toy switched itself off). It stayed in the middle of the arena, between 37 and 64 cm across and 25 and 55 cm deep. The safety fence never had to refuse a move, and recovery was never needed. A still robot is tracked to about 1 mm.
| Forward | Reverse | |
|---|---|---|
| Distance per press | about 20 cm | about 18 cm |
| Spread | ±1.6 cm | ±1.6 cm |
| Turn per press | 15 deg right | 11 deg right |
How long the button is held barely matters: every press is one step. So the robot's real action set is "step forward" and "step back", which makes it a tidy first reinforcement learning problem.
What didn't work#
- Stickers for heading. Green on dark wood vanished. On the head, it swivelled. On the body, the head hid it. On the tracks, the readings jumped by up to 110 degrees while the robot moved. Every placement was steady when still and unusable in motion.
- Measuring too eagerly. Frames that failed to track were silently replaced by the last good position, which looked like a robot that teleported or didn't move.
- A fence that assumed distance = speed x time. Short presses went four times further than predicted, until the motion model got a fixed step per press.
Status#
Concluded as a proof of concept. Not done: the formal person-versus-camera agreement trials and the null test. The camera, judge and safety rules carry over to the LeRobot arms in Phase 1.
The full lab notebook, with every run and every gotcha, is in the repository under
experiments/exp001-vision-observer.