A phone mounted on Stackr is the camera. A Python application watches the stream, and the robot drives itself toward the object you select.
With a simple phone mount attachment for the Stackr I was able to enable a variety of applications. The simplest one is to control the robot remotely outside the line of sight. But the main reason I built this was to add AI vision and allow the robot to “see” and “understand” its environment. Using a distributed architecture, streaming video from the smartphone to a desktop app running YOLO object detection to issue real-time tracking commands back to the robot using BLE or WiFi I was able to make the robot follow objects regardless they were static or in motion.
| ISSUE | SOLUTION |
|---|---|
| Robot was losing the target | Implemented a PID controller to track the target. |
| Processing time was too long | Reduced automatically the resolution of the video streaming. Executed the video stream reading in a separate thread. |
| On the side movements the image was too blurry for the AI | Reduced the speed when turning and every time when the recognition was not possible. |
Stackr driving toward the object you selected.
A recording of the robot following the chosen object.
A phone is used to stream video from the robot. To mount the phone on the Stackr a holder was designed as an add-on for the robot platform. The holder was designed to accommodate different sizes of phones and to be able to point up or down at different angle to accommodate different applications.
The main goal of this project was to use vision AI to control the robot. As a result the YOLO (You only look once) AI algorithm is used.
Because Arduino MCU onboard of Stackr is underpowered for significant AI tasks a distributed architecture is used. The camera streams the video from the phone. A desktop application runs the AI and sends instructions to Stackr using BLE.
TCP over WiFi is used for video streaming and BLE connection to send driving instructions to Stackr.
The printed holder, the phone on Stackr, and the camera stream.
FreeCAD parts for the yellow phone holder: side frames, cross bar, post, and clamp knob.
Yellow printed holder screwed together, with the threaded clamp and knob on top.
Samsung phone clamped in the yellow holder on a white Stackr, with a Nano ESP32 on the deck.
A tablet and a phone both showing the robot camera stream, with Stackr sitting on the bench behind them.
13 photographs and drawings from this build.
| PARAMETER | SPECIFICATION / VALUE |
|---|---|
| Communication | WiFi/TCP |
| Communication | BLE |
| Algorithms | AI |
| CAD Software | FreeCAD |
| Manufacturing | 3D Printing |
| Special Features | Fully autonomous |