RADMA is a framework for dynamically selecting which ML model a satellite runs onboard, given constraints that change throughout an orbit: battery state of charge, solar generation through eclipse cycles, and per-frame time/energy budgets driven by orbital geometry (ground sample distance, dwell time, etc.). Instead of committing to one fixed model, RADMA picks the best model for the current frame budget so the satellite maximizes correct inferences without exceeding its energy budget.
This repository contains:
- C/C++ FreeRTOS applications for the Coral Pico (a custom PCB hosting a Google Coral Edge TPU in a Picosatellite form factor), including the RADMA scheduler itself (src/libs).
- Tooling to perform offline hardware-in-the-loop (HIL) characterization (power, latency, accuracy) of candidate models on a Coral Pico or Google Coral Micro Dev Board (src/scripts/hardware_characterization).
- Simulation and case-study tooling that replays real orbit telemetry (from STK) through the RADMA scheduler to evaluate energy/throughput tradeoffs for different orbits (src/scripts/dynamic_selection_sims).
-
data: characterization HIL testing data (candidate models, STK orbit exports, accuracy results) and the resulting model performance map consumed by both the RADMA simulator and firmware. -
results: outputs of hardware characterization runs and simulation case studies (captures, plots, per-orbit reports). -
src: Coral firmware, the RADMA scheduler library, and the Python scripts used for characterization and simulation. -
tests: C++ unit tests (GoogleTest) for the RADMA scheduler. -
setup.sh: bash script to install submodules, create a venv, and build dependencies. -
flashtool.sh: bash script to build the firmware and flash it onto a connected Coral board.
setup.sh installs the coralmicro submodule (recursively), creates a Python virtual environment in this
repository named coraldev, installs requirements.txt into it, builds coralmicro,
and drops you into a shell with coraldev activated. Re-activate it later with
source coraldev/bin/activate.
Native support follows the coralmicro submodule: x86 Linux and macOS. Windows isn't supported natively —
use WSL2 (see below).
From the repository root:
bash setup.shInstall Homebrew or MacPorts first — coralmicro's own
setup step uses one of them to install cmake/libusb. Then from the repository root:
bash setup.shflashtool.sh's build step needs GNU nproc/sysctl-based core counting, which is already handled for
macOS. If you hit missing-tool errors during the coralmicro build, install GNU coreutils
(brew install coreutils) and retry.
coralmicro (and therefore this repo's build) is not supported on native Windows. Use
WSL2 with an Ubuntu distribution, then follow the
Linux instructions above from inside your WSL shell.
Flashing a connected Coral board requires USB access from within WSL2, which isn't passed through by
default. Attach the board's USB device to your WSL2 distro with
usbipd-win before running flashtool.sh.
Once setup has completed, build and flash a connected Coral board with:
./flashtool.shRun ./flashtool.sh --help for flags to skip the build (-nb), skip flashing (-nf), or skip re-flashing
the model/data filesystem (-nd).
See src/scripts/scripts.md for a full reference of each Python script, its inputs, and its outputs.
Apache License 2.0 — see LICENSE.