Rotem Ezra · Robotics project

Scrub

An autonomous tidying robot: socks to the laundry basket, toys to the toy box. Built in stages, each layer working before the next.

Now · Scrub measures its own turns and distance with the wheel encoders and runs its first autonomous patrols on the floor. Drive PCB and arm parts ordered.

  1. 01

    Tracked chassis done

    TS100 metal tank kit, two 25 mm encoder gear motors.

  2. 02

    Drive electronics done

    ESP32 + L298N, driven by the Jetson over USB serial, encoder odometry. Custom PCB designed and ordered.

  3. 03

    Compute deck done

    Clear acrylic deck on brass standoffs, L298N underneath.

  4. 04

    Jetson and vision in progress

    Jetson Orin Nano, IMX219 camera, YOLO detectors in TensorRT, first autonomous patrols.

  5. 05

    SO-101 arm ordered

    Servos and controller ordered. Frame to be 3D-printed.

Build log

Seven posts so far.

Assembled black metal tank chassis with tracks and two encoder gear motors at the rear, no electronics yet ESP32 dev board on a USB-C cable, wired through a breadboard to a red L298N motor driver on the chassis
01 · Drive base

A microcontroller for the motors, a computer for the thinking

An ESP32 drives the tracks. The Jetson only sends speed commands.

Read more
  • TS100 tank kit, two 25 mm encoder motors, L298N driver
  • USB serial commands L<speed>,R<speed>
  • No command for 500 ms means stop, and the PS5 controller always wins
  • Encoders now in use for odometry (post 07)

WhyReal-time drive stays on the microcontroller. If the Jetson crashes, the robot stops.

ProblemTwo early ESP32 boards stopped working.FixThe boards were likely shorting to the metal plate. I insulated them and there were no failures since.

Jetson Orin Nano with fan on a clear acrylic deck on brass standoffs, IMX219 camera in a clear holder at the front, ESP32 on a green screw-terminal board
02 · Jetson and camera

Getting the first detections on the robot

Jetson Orin Nano and an IMX219 camera, running YOLO on the live feed.

Read more
  • 1280 × 720 at 30 fps over CSI, YOLO11n at about 25 ms per frame
  • First closed loop: turns in place to follow a person (tethered)

ProblemNVIDIA's detector didn't run on TensorRT 10.3, and the image was upside down.FixSwitched to Ultralytics YOLO and set flip-method=2 in GStreamer.

Same scene, three models

ModelWhite socksToy car
YOLO11 (COCO)“mouse”missed
YOLOE-11L, open vocabulary“towel”toy car, 0.85 to 0.97
+ CLIP re-check of the cropsstill “towel” (1 of 6 “sock”)

Test frames from the robot's own camera.

03 · Vision, part 1

Off-the-shelf detectors don't know what a sock is

Ready-made models found the objects but named the socks wrong.

Read more
  • COCO YOLO11 has no sock class: “mouse”
  • Open-vocabulary YOLOE found the car but called the socks “towel”, and a CLIP re-check didn't help

DecisionKeep YOLOE to find objects, and ask a smarter model to name them.

Robot camera frame with coloured boxes: two white socks labelled sock, a toy car labelled toy, and one extra wrong sock box over the car
04 · Vision, part 2

A vision-language model on 8 GB: from 44 s to 4.5 s

Qwen2.5-VL named every test crop right, but slowly.

Read more
  • 13 of 13 crops correct, about 4.5 s per object
  • Inside the live stream: 44 s per object, running on the CPU

ProblemMemory looked like the cause, but the real issue was elsewhere.FixLoad order. Loaded after the camera, the model fell back to the CPU. Loaded first, it took 4.4 to 7 s.

DecisionNo language model at runtime: too slow, too close to 8 GB. It only suggests training labels offline.

Live detector view: a person's arm and sleeve covered by a blue mask, two toy cars on the desk, 14.9 FPS shown at the top
Robot camera frame with one white sock boxed as sock 0.63, while the toy car and two closer socks are not boxed Live view where a white sleeve cuff is boxed in grey and labelled on person: towel, so it is ignored
05 · Vision, part 3

Training my own detector, and a rule about people

A YOLO11s trained in the cloud, running on the Jetson in TensorRT without PyTorch.

Read more
  • Open Images, 8 classes, mAP50 0.57, about 24 FPS on the Jetson
  • All clothes go to the laundry basket, so a sock/towel mix-up costs nothing

RuleNever target clothes someone is wearing.HowA person mask runs on every frame, and anything 30 % on a person is ignored (about 15 FPS with it).

ResultIt finds socks that the off-the-shelf models could not name.NextTraining continues on frames from the robot's own camera until it reaches the accuracy I want.

06 · Drive PCB

Designing my own drive PCB

I designed a custom PCB around the robot's exact requirements and sent it to manufacturing. The video is a 3D render of my design.

Read more
  • My requirements: small (84 × 51 mm), the ESP32 plugs straight in, one XT60 for the 3S battery, and screw terminals for the motor cables
  • Two DRV8874 motor drivers with about a 3 A limit per motor, and motor current and battery voltage read by the ESP32
  • Reverse-polarity protection, and the motors stay off while the ESP32 boots
  • Layout and routing generated by my own scripts (KiCad Python and Freerouting)

DecisionThe second version dropped the UART header and the JST plugs for screw terminals. Smaller, and no crimping.

ProblemThe assembler's preview showed the chips turned 90° and the XT60 facing inward.FixCorrected the rotations in the placement file and rechecked every polarised part.

07 · Encoders and first missions

Teaching Scrub to measure its own moves

The wheel encoders now tell the Jetson how far Scrub turned and drove, and it runs its first patrols on the floor. The video is a patrol at double speed.

Read more
  • New ESP32 firmware counts the encoder signal edges and reports them every 50 ms, plus who is driving
  • Calibrated by driving with the PS5: about 6,040 counts per metre and about 40 per degree of turn
  • A 90° turn command ends at 90.9° by the encoders. Scrub learns how far it coasts after the motors stop
  • Missions from a browser page with live video and a STOP button. Each mission is recorded to video
  • Patrol: a full turn measured by the encoders, then back to the start heading

CheckA phone filmed from above to compare with the encoders.ResultThe 90° turn and a 30 cm drive matched. The turn back ended about 18° off while the encoders read 0.5°. A fix is in, not re-tested yet.

ProblemFrom floor height my trained model missed the toy cars, and a silver model car scored only 0.05 as “toy car”.FixFor now the open-vocabulary model runs with “car” added (0.89 on the same car), and a wider camera mode that sees more of the floor.

ProblemIt also boxes things that aren't toys, like the chair base in the video.NextExtra “decoy” classes (office chair, cable, box) are added to absorb these, not tested yet. Then fine-tuning on floor frames.

Architecture

Two controllers, linked over USB.

The ESP32 drives the motors and the Jetson sees and decides. Dashed = ordered, not built yet.

IMX219 camera Jetson Orin Nano YOLO, TensorRT SO-101 arm ordered ESP32 Motor drivers L298N · PCB ordered Left motor + encoder Right motor + encoder 3S LiPo ordered CSI USB serial
  • Built
  • Designed or ordered, not built yet
Compute
Jetson Orin Nano 8 GB
Vision
IMX219 camera, own-trained YOLO11s and open-vocabulary YOLOE, both in TensorRT
Drive
ESP32, L298N today, my own DRV8874 PCB designed and ordered
Link
USB serial, 500 ms stop timeout, encoder counts every 50 ms
Chassis
TS100 tracked kit, two encoder motors
Manual
PS5 controller over Bluetooth
Power
12 V supply, 3S LiPo ordered
Arm
SO-101, 6 × STS3215 servos ordered

Next

What comes next.

  1. Vision Fine-tune on floor-level frames from the robot's own camera, so it finds toys without false alarms.
  2. Motion Fix the turn-back error the phone camera caught, then patrols that visit each object and come back.
  3. Drive and power PCB arrives: new firmware, first power-up, then battery.
  4. Arm Print and mount the SO-101, then detect, drive, pick, place.