deploy: USB update kit for the Pi and Jetson

pack-usb.sh writes the host part of the last commit and update.sh to a flash drive.
update.sh installs it over ~/Documents/radar_system, keeps configs, calibrations and
data, and leaves the previous version next to it as radar_system<N>.
This commit is contained in:
Ayzen
2026-10-02 16:21:16 +03:00
parent d283ecfdf1
commit 515049d2ed
3 changed files with 262 additions and 1 deletions
+31 -1
View File
@@ -70,7 +70,7 @@ controls plus a pixel-identical live plot through an embedded web UI.
| `data_acq_and_processing/` | C++ pipeline: `sweep_orchestrator/`, `preprocessing/`, `processing/` (including `locator/`), shared `common_cpp/` (config, IPC rings), and vendored `third_party/` (Eigen, nlohmann/json). |
| `python_app/` | Python application: `gui/`, `orchestration/` (process supervisor, shared-memory readers, config), `hardware_full/` (device drivers and services), `webui/`, `storage/`, `models/`, `workflows/`, `scripts/` (producers and tools), and `tests/`. |
| `run_config_examples/` | Ready-made configuration profiles, one per hardware setup. |
| `deploy/` | systemd daemon installer for Raspberry Pi appliances. |
| `deploy/` | systemd daemon installer, and the USB update kit for the Pi and Jetson (`pack-usb.sh`, `update.sh`). |
| `build/bin/` | Compiled C++ binaries. |
| `device_firmware/`, `docs/` | Device firmware and vendor manuals. |
@@ -136,6 +136,17 @@ for the CUDA-backed `sar3d` processor:
./start.sh --profile run_config_examples/run_config_replay_vna.example.json
```
Ubuntu 22.04 ships Python 3.10, and the host parses the radar stream in Python:
the same parsing code ran 1.6 times slower on 3.10 than on 3.13 (the Pi's version)
in a benchmark. Use Python 3.13 for the venv, installed with uv so the system
`python3` stays untouched (apt depends on it):
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh # then open a new terminal
uv python install 3.13
bash radar_update/update.sh --python 3.13 # see Deployment
```
## Running without hardware (emulation)
Two ways to run the full pipeline with no radar attached:
@@ -192,6 +203,25 @@ the application headless and restarts it on failure. A single-instance lock ensu
the interactive GUI and the daemon never run at the same time, since they share the
radar, the shared-memory rings, and the locator port.
**Updating a device from a USB flash drive.** On the development machine
`deploy/pack-usb.sh` writes the host part of the last commit (no venv, build, data
or local configs) and the update script into `radar_update/` on the flash drive.
On the Pi or Jetson, close the program and run, from the drive's folder:
```bash
bash radar_update/update.sh # or: --python 3.13 for a fresh venv
```
It installs the newest archive into `~/Documents/radar_system` (or `RADAR_DIR`);
the current version is renamed to `radar_system<N>`, the next free number. Kept from
it: `run_config.json`, profiles in `run_config_examples/` changed or added on the
device (the release version of a changed one lands next to it as `.new`),
`python_app/runtime/` without logs, `python_app/data*` and any other top-level
folder that is not part of the release, as hard links. Then it carries the venv over
(or builds a new one with `--python`), builds the C++ part and restarts
`radar.service` if it was running. To go back:
`rm -rf radar_system && mv radar_system<N> radar_system`.
## Tests
```bash