josh wu | ← all projects

candy bot
a robot arm that hands out halloween candy when you say “trick or treat” — oct 2026

description

I turned my SO-101 arm into a porch trick-or-treat bot for Halloween. A kid says “trick or treat”, the arm reaches into the candy bucket, checks that it actually grabbed something, carries it over, asks them to hold out their hands, and drops it in. Then it wishes them a happy Halloween and goes back to rest.

The follower arm runs on a Raspberry Pi and the Mac runs the logic, talking over ZeroMQ. The wake phrase is detected offline with Vosk from the Pi's microphone. I teach the path by driving the leader arm through rest, above-bucket, grab, lift and handoff poses, using a browser teaching studio that shows the wrist camera, joint readings and waypoints live.

Grabbing from a loose pile of candy is unreliable, so the bot checks its grip twice (after closing and after lifting) by watching for a stable gripper gap. On a miss it backs out and tries the next taught grab spot, and after a full round of misses it replays a taught “stir” motion to shuffle the bucket and tries again. Each new kid starts at the last spot that worked.

A small wrist-camera classifier recognizes the candy at the handoff pose (Aero, Smarties, Coffee Crisp or KitKat) so the bot can announce what you're getting. It only names a candy when several frames agree and the grip check passed; otherwise it gives a generic line. Its voice lines are generated once with ElevenLabs and cached, so it runs without the internet on the night.

features
  • Offline “trick or treat” wake word (Vosk) streamed from the Pi's mic
  • Leader-arm waypoint teaching with a browser studio (live wrist camera + joint readings)
  • Two-stage grip check, multi-spot grab retries and a taught stir motion for recovery
  • Wrist-camera candy classifier that refuses to save below 80% held-out accuracy
  • Cached ElevenLabs voice lines for the whole interaction
  • Local porch dashboard, per-cycle log and wrist-camera recordings of failed grabs
  • Also experimented with an ACT imitation-learning policy trained on LeRobot demos
tech stack
PythonLeRobotSO-101Raspberry PiZeroMQVoskElevenLabsOpenCVACT