AI TANK

Lesson 22 hackathon · reference solution architecture · vision-first, 48-hour build
LAYER 1 · MISSION CONTROL (OFFBOARD, PRE-RUN ONLY)
Mission file uploadcourse map, target roster, time limit
Start beeplast human input, ever
Telemetry dashboardread-only during run — touching it = DQ
↓ mission parameters in · nothing out until the run ends
LAYER 2 · SAFETY (INDEPENDENT OF EVERYTHING BELOW)
Hardware kill switchcuts motor power, not software — physics
Geofence watchdogseparate MCU; kills on boundary breach
Run timer10:00 hard stop, no exceptions
Human big red buttonRF, held by a judge at all times
↓ safety overrides all layers — it is not a feature, it is a cage
LAYER 3 · PERCEPTION (VISION-FIRST)
Stereo camerasforward pair — depth without LiDAR
Turret camerazoomed, bore-aligned with emitter
IMU + wheel odometrydead reckoning between visual fixes
No LiDARdeleted per Rule 1 — defend it or lose points
↓ raw frames + inertial data
LAYER 4 · WORLD MODEL (ONBOARD JETSON)
Visual SLAMwhere am I on the course
Occupancy gridwhere the obstacles are
Detectorred vs. blue classifier — the −15 pts live here
Multi-target trackerpersistent IDs, no double-counting
↓ pose + obstacle map + labeled tracks
LAYER 4B · TARGET DESIGNATION — TWO WAYS TO ACTIVATE
Mode A — GPS directcoordinates pushed digitally; turret slews to grid, no visual needed
Mode B — Smoke markarea covered in colored smoke; turret camera finds the plume, aims at its base
↓ designated aimpoint (grid or plume centroid)
LAYER 4C · THE FOUR-INPUT BRIEF (WHAT THE AI ACTUALLY NEEDS)
1 · Target locationgrid/GPS or smoke plume — Mode A or B
2 · Target descriptionwhat is it — "4 tanks, treeline"
3 · Mark typehow it's designated — smoke color, laser, none
4 · Friendly positionswhere our guys are — never auto-approved
↓ the other five 9-line items (IP, heading, distance, elevation, egress) are derived by the system or live pilot-side — the AI doesn't need a human to type them
LAYER 5 · PLANNING
Behavior treeEXPLORE → IDENTIFY → ENGAGE → EVADE
Global planner (A*)route across the occupancy grid
Local planner (DWA)dodge what SLAM missed, in real time
Target prioritizationnearest confirmed hostile first
↓ velocity + turret angle + fire commands
LAYER 6 · CONTROL
Tread motor controllersskid-steer, PID on velocity
Turret servos2-axis, PID on target bearing
Emitter triggerfires only on confirmed hostile + bore alignment
↓ everything draws from
LAYER 7 · POWER
LiPo packsized for 10-min run + margin
Distributioncompute brownout must never kill the safety MCU
↓ one tank is a demo — a hundred is a swarm
LAYER 8 · SWARM COMMS — SOLDIER #0, REVISED
Node architectureevery tank is a network node: #1–#100
Two traffic classestasking via #0 · telemetry via broadcast
Soldier #0 — the sequencerorders tasking + safety broadcasts; low volume, needs total order
Telemetry — direct broadcastradio is broadcast: one transmission, every node hears it — no relay hop
Star for orders, mesh for chatterdeterministic 2-hop tasking; 1-hop telemetry; #0's radio stops being the bottleneck
Message typesheartbeat · telemetry (broadcast) · four-input brief · tasking (via #0) · safety broadcast
Epoch fencingevery relay reign increments the epoch — nodes ignore all messages from old epochs
Hot standby#1 shadows #0's sequencer state live — takeover is instant, not discovered
Failover chain#0 misses heartbeats → #1 (already warm) becomes Soldier #0, epoch+1 → #2 next in line…
Comms-loss fallbacklast orders + autonomous safe behavior
↓ the role is the name — whoever holds the current epoch is Soldier #0

DESIGN PRINCIPLES (THE 48-HOUR SURVIVAL GUIDE)