Human-Following Ackermann v2 — Senithu Dampegama
SYS-01 / FLAGSHIP SOLO SYSTEM — SOLE AUTHOR COMPUTER VISION + EMBEDDED CONTROL SEP 2025

HUMAN-FOLLOWING
ACKERMANN PLATFORM.

A production-quality refactor of a vision-guided follower robot. The camera detects and ranges people on-device; a tracker holds a stable lock on one person in a crowd; a decision layer follows at distance — and refuses to move at all unless it has a confirmed target.

Completed human-following Ackermann robot v2 with OAK-D Pro W stereo camera mounted on the front
TRACK LOCK DEPTH SOURCE / STEREO STATE / FOLLOW
EDGE MAP / COMPUTED FROM FRAME
FIG. 01 — COMPLETED PLATFORM, OAK-D PRO W FORWARD MOUNT {{ heroHint }}
PERCEPTION
OAK-D PRO W — ON-CAMERA SPATIAL NN
TRACKING
IOU TRACKER — STABLE IDS + LOCK
DECISION
L5 FSM — STATIONARY SEARCH
ACTUATION
TEENSY 4.1 — L3 FIRMWARE
TECHNICAL DOSSIER HF-ACKERMANN / V2
01 — MISSION

Detect a person, hold a stable lock on that specific person in multi-person scenes, and follow at a controlled distance on an Ackermann-steered platform.

Two non-negotiables shaped everything: the robot must never move without a positively identified target, and it must recover autonomously from the faults that actually happen in the field — USB drops, unreliable depth, lost tracks.

02 — CONSTRAINTS
COMPUTEEmbedded only — Jetson-class host, inference kept on-camera; no offboard processing.
LINKSingle USB serial link to the actuation MCU — assumed to fail and required to recover.
MECHANICSRC-derived Ackermann steering with a real, measured mechanical bias to one side.
SENSINGStereo depth degrades on reflective and low-texture surfaces — distance control needs a fallback.
SAFETYCapped impulses, wheels-up first runs, STUB mode by default — motion is opt-in, never assumed.
03 — MY OWNERSHIP
SOLE AUTHOR / ENGINEER — 100% OF THE SYSTEM

Vision pipeline, tracker, decision FSM, serial protocol and fault handling, Teensy firmware integration, chassis CAD (Fusion 360 → STEP), wiring, unit tests, and the full technical report with a one-page executive summary.

04 — SYSTEM ARCHITECTURE

A layered pipeline. Perception and tracking never talk to hardware; the decision layer never parses frames. Each layer has one job and a narrow, testable interface.

OAK-D PRO W
RGB + stereo depth aligned to RGB · MobileNet spatial detection network (300×300) running on-camera
SPATIAL DETECTIONS
Bounding box · confidence · 3D position (x, y, z in metres) per person
IOU TRACKER
Dependency-free greedy IOU matching · stable monotonic track IDs · lock_target(track_id) / release_lock() · optional DeepSORT wrapper
VISIONBUS
Narrow contract to the decision layer: offset_x · area · quality · track_id · z_m
L5 — DECISION FSM
INIT → SEARCH → ACQUIRE → FOLLOW → FAULT · SEARCH and RECOVER are stationary states · depth-based distance control with bbox-area fallback · non-linear steering law
L4 — SERIAL CLIENT
ASCII protocol: STOP · CENTER · DRIVE F/B <pwm> <ms> · ARC L/R <pwm> <ms> · OK/DONE/TELEM parsing · disconnect detection · exponential-backoff reconnect (1→2→4→8→10 s)
TEENSY 4.1 — L3 FIRMWARE
Low-level actuation and physical safety · BTS7960 drive / BTS7980 steering drivers
MOTORS + STEERING
Ackermann drive base · dual 3S LiPo with EMI mitigation (ferrites, star grounding)
L5 STATE MODEL — SEARCH NEVER MOVES ONE-TIME STOP + CENTER ON ENTRY
INIT SEARCH · STATIONARY ACQUIRE FOLLOW FAULT → RECOVER → SEARCH
05 — ENGINEERING DECISIONS
Inference stays on the camera.

The OAK-D runs its spatial detection network on-device and returns 3D positions directly. The host never touches frames for inference — freeing it for decisions, and removing a whole class of latency and coupling.

A dependency-free IOU tracker over a heavy re-ID stack.

Greedy IOU matching with stable, monotonic IDs was sufficient for reliable target lock in multi-person scenes — and runs anywhere. A DeepSORT-with-embeddings wrapper exists for when it is installed, but is optional by design.

SEARCH is a stationary state.

On losing a target, the robot performs a one-time STOP + CENTER and waits. It does not wander, spin, or reverse toward the last known position. No target, no motion.

A non-linear steering law tuned against real mechanics.

Steering maps horizontal offset to PWM through a tunable exponent (arc_gamma), with independent left/right gains and caps — intentionally asymmetric to compensate a measured mechanical bias — plus a dead-band and minimum-PWM floor to stop oscillation.

Depth first, area as fallback.

Distance holding uses true stereo depth (z in metres) against a setpoint when depth is trustworthy, and degrades gracefully to bounding-box area when it is not.

06 — FAILURE MODES
FAULT / USB DISCONNECT
Detected immediately → FSM enters FAULT → exponential-backoff reconnect (1→2→4→8→10 s) → on link restore: STOP + CENTER resync → resume in SEARCH, never mid-FOLLOW.
FAULT / UNRELIABLE DEPTH
Reflective or low-texture surfaces degrade z — distance control falls back to bounding-box area against a calibrated target.
FAULT / MECHANICAL STEERING BIAS
The platform pulled to one side under equal commands — compensated in software with asymmetric right-biased gains, caps and impulse durations rather than masked with trim hacks.
FAULT / STEERING OSCILLATION
Small offsets caused hunting around centre — resolved with a dead-band plus a minimum-PWM floor so corrections are either meaningful or not made at all.
KNOWN LIMIT / ID SWAPS
IOU-only tracking can swap IDs in dense crossings — documented as a known limitation, with the optional embedding tracker as the upgrade path.
07 — VALIDATION
UNIT TESTSpytest suites for serial fault/reconnect behaviour and steering-gain calculations — run with a mocked serial layer, no hardware attached.
SMOKE TESTSBounded-runtime CLI flags (--max-seconds) allow hardware-independent smoke runs in STUB mode — INIT → stationary SEARCH → ACQUIRE/FOLLOW engagement verified.
LIVE RUNSWheels-up first, then live: capped impulses, telemetry at ~5 Hz, no motion in SEARCH, lock persisting across multi-person scenes.
FAULT INJECTIONUSB unplugged mid-run → FAULT entered, periodic reconnect attempts, STOP + CENTER resync on restore, safe resume in SEARCH — demonstrated during live testing.
OPERATOR TOOLINGLive dual preview (annotated RGB + false-colour depth), runtime-tunable steering and distance parameters, udev rule for a stable /dev/teensy symlink.
VERSION 1 → VERSION 2 V1 CASE STUDY →

Version 1 is the engineering foundation — the mechanical platform, electrical system, layered Jetson/Teensy architecture and serial protocol were proven there. Version 2 is the production-quality refactor built on top of it.

V1 — FOUNDATION (2025)
PiNSIGHT / DepthAI camera · MobileNet-SSD person detection
No depth — bounding-box-only distance estimation
Single-target heuristics, no persistent IDs
Layered Jetson ↔ Teensy serial architecture established
Stall detection · impulse PWM · LiPo protection
Full CAD, wiring, BOM and written report
V2 — PRODUCTION REFACTOR (SEP 2025)
OAK-D Pro W · on-camera spatial NN with true stereo depth
Metric distance control (z_m) with area fallback
IOU tracker — stable IDs, multi-person target lock
L5 FSM with stationary SEARCH/RECOVER safety states
Fault-tolerant L4 serial — auto-reconnect, STOP+CENTER resync
Mocked unit tests, bounded smoke tests, tuning documentation
08 — PHYSICAL BUILD EVIDENCE / ACTUAL HARDWARE
Front view of the Ackermann v2 robot with OAK-D Pro W stereo camera
FRONT ELEVATION — STEREO PAIR + RGB, SUSPENSION VISIBLE
Inner assembly of the robot during the build
INNER ASSEMBLY
Steering gear train close-up
STEERING GEAR TRAIN — SOURCE OF THE MEASURED BIAS
Final component placement on the chassis
COMPONENT PLACEMENT — JETSON + DRIVERS
Wiring detail
WIRING — POWER + SIGNAL SEPARATION
Suspension shock absorbers
SUSPENSION — SHOCK ADJUSTMENT
3D printed main lid
3D-PRINTED MAIN LID — FUSION 360 → PRINT
Full wiring and circuit diagram of the v2 platform
CIRCUIT — TEENSY 4.1, BTS7960/7980, POWER DISTRIBUTION
09 — OUTCOME

Stable single- and multi-person tracking with reliable target lock. Safe, stationary search behaviour. Decisive, tunable steering response. Automatic recovery from USB and serial faults demonstrated during live testing — the robot resumes searching, it does not resume moving.

10 — NEXT REVISION
Wheel encoders for closed-loop motion instead of open-loop impulses
Embedding-based tracking (DeepSORT) for dense-crossing robustness
systemd service autostart + telemetry UI for field operation