- argonaut.service + argonaut-stack.sh (autonomy stack) - argonaut-api.service + argonaut-api.sh (FastAPI backend) - README documents deploy locations, pip dependencies, install procedure - Resolves: systemd/wrapper files were previously not version-controlled - Documents fastapi/uvicorn system-wide install (--ignore-installed typing_extensions)
88 lines
2.8 KiB
Markdown
88 lines
2.8 KiB
Markdown
# Argonaut 3 — Deploy Files
|
|
|
|
This folder contains the systemd unit files and launch wrappers that live
|
|
OUTSIDE the ROS2 workspace on RPi5, version-controlled here so they are
|
|
recoverable. The files in this folder are copies — the authoritative
|
|
running copies are at the deploy locations noted below.
|
|
|
|
---
|
|
|
|
## Files
|
|
|
|
| Repo file | Deploy location on RPi5 | Purpose |
|
|
|---|---|---|
|
|
| `argonaut.service` | `/etc/systemd/system/argonaut.service` | Autonomy stack service unit |
|
|
| `argonaut-stack.sh` | `/usr/local/bin/argonaut-stack.sh` (chmod +x) | Autonomy stack launch wrapper |
|
|
| `argonaut-api.service` | `/etc/systemd/system/argonaut-api.service` | FastAPI backend service unit |
|
|
| `argonaut-api.sh` | `/usr/local/bin/argonaut-api.sh` (chmod +x) | FastAPI backend launch wrapper |
|
|
|
|
Also required (NOT stored here — contains environment specifics):
|
|
`/etc/argonaut/rov.env` — EnvironmentFile for argonaut.service:
|
|
```
|
|
ENV=dev
|
|
BLUEOS_IP=192.168.1.100
|
|
RECORD=true
|
|
```
|
|
|
|
---
|
|
|
|
## Python dependencies (RPi5)
|
|
|
|
The FastAPI backend (`rov_api`) requires fastapi and uvicorn installed
|
|
system-wide so they resolve regardless of which user runs the service:
|
|
|
|
```
|
|
sudo pip3 install fastapi uvicorn --break-system-packages --ignore-installed typing_extensions
|
|
```
|
|
|
|
The `--ignore-installed typing_extensions` flag is required because the
|
|
Debian-managed `typing_extensions` package has no pip RECORD file and
|
|
cannot be uninstalled by pip; ignoring it lets the install complete while
|
|
leaving the Debian package in place.
|
|
|
|
Confirmed working versions: fastapi 0.139.0, uvicorn 0.50.0.
|
|
|
|
---
|
|
|
|
## Install / re-deploy procedure
|
|
|
|
From this repo folder on RPi5:
|
|
|
|
```
|
|
sudo cp deploy/argonaut.service /etc/systemd/system/argonaut.service
|
|
sudo cp deploy/argonaut-api.service /etc/systemd/system/argonaut-api.service
|
|
sudo cp deploy/argonaut-stack.sh /usr/local/bin/argonaut-stack.sh
|
|
sudo cp deploy/argonaut-api.sh /usr/local/bin/argonaut-api.sh
|
|
sudo chmod +x /usr/local/bin/argonaut-stack.sh /usr/local/bin/argonaut-api.sh
|
|
sudo systemctl daemon-reload
|
|
```
|
|
|
|
---
|
|
|
|
## Service management
|
|
|
|
DEV POLICY: both services are installed but NOT enabled-on-boot.
|
|
Start manually (verify BlueOS heartbeat before starting the stack):
|
|
|
|
```
|
|
sudo systemctl start argonaut.service
|
|
sudo systemctl start argonaut-api.service
|
|
```
|
|
|
|
Field readiness — enable on boot only when field-ready:
|
|
|
|
```
|
|
sudo systemctl enable argonaut.service
|
|
sudo systemctl enable argonaut-api.service
|
|
```
|
|
|
|
---
|
|
|
|
## Notes
|
|
|
|
- `/home/ubuntu/ros2_ws` is a symlink to `/data/ros2_ws` (NVMe data drive).
|
|
Both wrappers rely on this — do not remove the symlink.
|
|
- `argonaut-api.service` orders After=argonaut.service but does not Require
|
|
it, so the API can start independently for /health checks. Mission
|
|
commands return a clear "service unavailable" error if the stack is down.
|