Autopilot

Reference material for the USV labs

Centralized reference for the autopilot used across all USV labs (Lab 1 sysid, Lab 2 PID tuning, Lab 3 navigation).

What we use

Vehicle 1.1 m single-screw USV, ~5 kg
Autopilot software ArduRover V4.6.3 (commit 3fc7011a)
GPS HERE3 via DroneCAN
Ground station Mission Planner

Documentation

  • Autopilot parameters — how parameters are stored and loaded, baseline-vs-default summary, source-code anchors, and a running list of undocumented behavior we’ve discovered.
  • Stabilization layer — speed and yaw-rate PID — architecture of the lowest-level control loops, with full log-channel reference.
  • Waypoint navigation (boats) — conceptual overview of how a mission of waypoints becomes the speed and yaw-rate setpoints that the stabilization layer chases, with the PID analogy drawn explicitly.
  • ATC parameter reference — dense per-parameter look-up table for the ATC_* controllers (units, ranges, vehicle values, source-code anchors).
  • ArduPilot doc references — curated entry points into the upstream ArduPilot documentation (tuning, parameters, log analysis).

Parameters

The vehicle parameter snapshots (.param files) and per-lab baseline configurations live in utils/ardu_params/. See the parameters reference page for an overview, the README in that directory for the Mission Planner load procedure, and stabilization.qmd for the ATC_* PID deep dive.

Log Processing Pipeline

Field-collected ArduPilot .BIN logs are processed in two stages before MATLAB analysis:

  1. .BIN.matutils/ardu_utils/bin2mat.py extracts every numeric field from every message type into a MATLAB .mat file. Field names follow {MSGTYPE}_{field} (e.g. GPS_Spd, RCOU_C3, PIDA_Tar). Logged ArduPilot parameters are saved as a params struct.
  2. MATLAB analysis — per-lab scripts under book/wXX_*/code/ load the .mat and produce timeseries and metrics.

Key Log Channels

Signals analyzed across the labs:

Channel Variable Units Used in
GPS_Spd Ground speed m/s Sysid (Lab 1), PID tuning (Lab 2)
IMU_GyrZ Yaw rate (raw) rad/s Sysid (Lab 1)
STER_TurnRate Yaw rate (EKF) rad/s PID tuning (Lab 2)
RCOU_C3 Throttle command PWM Surge input
RCOU_C1 Rudder command PWM Yaw input
THR_DesSpeed Speed setpoint m/s PID tuning (Lab 2)
STER_DesTurnRate Yaw-rate setpoint rad/s PID tuning (Lab 2)
PIDA_* Throttle / speed PID internals PID tuning (Lab 2)
PIDS_* Steering / yaw-rate PID internals PID tuning (Lab 2)

More

Sub-pages added as labs need them:

  • Setup / connecting to the vehicle — TBD
  • Mission Planner cheatsheet — TBD
  • Common log analysis recipes — TBD