Human-Following Robot
A robot car that spots a person and follows them, splitting the work between a Pi and a laptop.
A robot car controlled by a Raspberry Pi that locks onto a person and follows them around. The interesting part is where the thinking happens. The Pi on the car cannot run object detection fast enough, so we split the job. The Pi streams its camera input to a laptop and drives the motors, while the laptop does the seeing using computer vision libraries, and the two communicate over the network. Group project of five for the Robotics course at Leiden University.
Links · 📄 Report
How it works
The Pi streams video to a laptop, which runs a YOLO object detector, finds the person, and works out whether they are to the left, the centre, or the right of the frame. It sends back a simple instruction, go forward, turn left, turn right, or stop, over a lightweight messaging protocol, and the Pi acts on it. Splitting the work this way improved processing speed from a slow crawl on the Pi up to a smooth twenty to thirty frames a second on the laptop.
Honest notes
It follows a person reliably and can handle shadows and reflections, but it is dependent on a stable wifi connection, as well as a laptop nearby, and it loses its target if they exit the edge of the frame too quickly.