The ground station
The ground station is one program that drives the three vehicles over MAVLink, reports to the judges over the RoboCommand protocol, and keeps enough state to resume a task after an interruption.
Architecture
The vehicles communicate over MAVLink. The ground station communicates with RoboCommand over MQTT with protocol buffer payloads. Between the two is one orchestrator that holds all mission state. The terminal console, the three dimensional course view and the protocol client all read from it.
A simulated vehicle, a firmware build running software in the loop and a real vehicle all implement the same adapter interface, so the mission code does not depend on which one it is driving.
State machines
Mission state is held in three state machines.
| Machine | One per | States |
|---|---|---|
| Vehicle | vehicle | OFFLINE, BOOTING, READY, AUTONOMOUS, TASK_EXECUTING, RETURNING, EMERGENCY_STOP |
| Task | task attempt | INACTIVE, QUEUED, ASSIGNED, IN_PROGRESS, COMPLETE, FAILED, ABORTED |
| Mission | run | IDLE, PRE_RUN_CHECK, RUNNING, EMERGENCY, COMPLETE |
Each task also carries an ordered list of steps. The console shows these as a previous, current and next triple. A step is the smallest unit the mission can be resumed at.
Interrupt and resume
This design is for Task 4. RoboCommand can interrupt a run at any time with an assistance request, a keep-out zone or a moving vessel. The vehicle in the affected domain has to acknowledge the message, stop its current task, respond to the incident, and then continue.
When an incident arrives the orchestrator writes a checkpoint: the task, the step it reached, the progress through the step list and the score events already earned. The vehicle then runs the incident as its own task. When the incident clears, the checkpoint is restored and the vehicle continues from the step it stopped on, not from the start of the task.
A keep-out zone arrives during the transit. The console acknowledges it, the boat routes around the area, and the safe passage attempt resumes afterwards.
Health and escalation
A heartbeat monitor checks every vehicle. Missed heartbeats and low battery raise alerts. Sustained heartbeat loss escalates to an emergency stop automatically, without waiting for the operator. Battery thresholds are set per vehicle, because 20 percent on a quadrotor is more urgent than 20 percent on a boat.
Before a run the console can run a pre-run check: every vehicle reachable and in a ready state, every battery above its minimum, and all three domains present. The check changes nothing and can also be run during a mission.
Operator console
The console is a terminal application. It runs over a shell connection from a laptop in the team's tent on the promontory, it does not need a browser, and it redraws correctly over a slow link. The layout is fixed so the operator always finds the same value in the same place.
+- Header (clock) ------------------------------------------------------------+
| ROBOTX 2026 | IDLE -> [RUNNING] -> COMPLETE | Tier: ADVANCED | RC: * 04:12 |
+--- USV ----------------+--- UUV ---------------+--- UAV ---------------------+
| USV > SAFE_PASSAGE | UUV | UAV > SAFE_PASSAGE |
| READY -> [TASK_EXEC] | AUTONOMOUS | AUTONOMOUS -> [TASK_EXEC] |
| Step: ROUTE_RELAY | Step: - | Step: [ROUTE_RELAY] |
| Pos: 1.2834,103.8607 | Depth: 1.4 m | Alt: 42 m |
| Batt: [#######...] 73% | Batt: [########..] 81%| Batt: [#########.] 92% |
+- Task Prev -> [Current] -> Next Tier Vehicles ----------------+
| SAFE_PASSAGE ASSIGNED -> [IN_PROGRESS] ADV usv,uav |
| Step: ROUTE_RELAY -> [TRANSIT_PASSAGE] -> EXIT_REPORT ########.. 72% |
| INFRASTRUCTURE_SURVEY - -> [QUEUED] ADV uuv,uav |
+- Incident panel (only while a Task 4 incident is live) ---------------------+
+- Health and alerts ------------------+- RoboCommand log --------------------+
| [OK ] USV heartbeat 8 ms | 14:22:01 -> DockingReport bay=2 |
| [WARN] UAV battery low: 28.1% | 14:22:00 <- RxCommand run_start |
+--------------------------------------+--------------------------------------+
F1 ESTOP F2 Abort F3 Pre-Check F4 Arm F5 T4-Core F6 T4-Adv F7 T4-Dis
The same mission can also be opened in a browser at the same time, in the three dimensional view on the simulation page. The terminal is the control interface and the browser view is for watching.
RoboCommand link
Handbook 3.4 defines how teams report to the judges: MQTT over TCP on port 1883, protocol buffer payloads from RoboNation's schema release, four topics, and a run start handshake that has to complete before the run begins. Our client implements the protocol, and we have tested it against RoboNation's test server.
| Purpose | Topic | Direction |
|---|---|---|
| Course configuration | robocommand/robotx/course | To us, retained |
| Vehicle report | robocommand/robotx/SUTD/<vehicle>/report | From us |
| Team request | robocommand/robotx/SUTD/request | From us |
| Team command | robocommand/robotx/SUTD/command | To us |
Reports go out at 2 Hz per vehicle carrying state, position, speed, heading, roll, pitch, altitude or depth, current task and vehicle type, with flight phase added for the aircraft. Sequence numbers are per vehicle for reports and per team for requests, and a response quotes the sequence number of the message it answers.
The run start sequence and the log it produced are described step by step on the proof of readiness page.
Design decisions
Three state machines instead of one
A vehicle can be autonomous while its task is suspended and the mission is in an emergency. A single machine would need a state for every combination.
Checkpoints outside the task machine
An interruption resets the task machine, so the checkpoint has to be stored outside it. Resume then restores the saved data instead of replaying the task.
Depth hold counts as autonomous
This applies only to the underwater vehicle, which has no position estimate to hold. The other two vehicles have to be in a guided mode to count.
Only the consumed streams are requested
ArduPilot's default stream set would saturate a HaLow link. The adapter requests position at 4 Hz and status at 1 Hz, and requests them again if telemetry stops.
The ground station has 154 automated tests covering the state machines, the orchestrator lifecycle, suspend and resume, the protocol end to end, the embedded broker, the course layout and the readiness rehearsal. See the test record.