rov-autonomy/deploy/argonaut-stack.sh
Grant du Toit 97decac205 Add deploy/ folder — systemd units and launch wrappers
- 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)
2026-07-05 15:50:42 +00:00

26 lines
935 B
Bash
Executable File

#!/bin/bash
#
# argonaut-stack.sh — Argonaut 3 autonomy stack launcher (called by systemd).
#
# DEPLOY LOCATION: /usr/local/bin/argonaut-stack.sh (chmod +x)
#
# systemd does NOT read ~/.bashrc, so ROS2 and the workspace overlay must
# be sourced explicitly. Reads ENV, BLUEOS_IP, RECORD from the systemd
# EnvironmentFile (/etc/argonaut/rov.env).
#
# Note: /home/ubuntu/ros2_ws is a symlink to /data/ros2_ws (NVMe data drive),
# so this path resolves correctly to the workspace on the NVMe.
set -e
# Base ROS2 Jazzy environment
source /opt/ros/jazzy/setup.bash
# Workspace overlay (via /home/ubuntu/ros2_ws symlink -> /data/ros2_ws)
source /home/ubuntu/ros2_ws/install/setup.bash
# Launch the full autonomy stack with environment-driven parameters.
# exec replaces the shell so systemd tracks the launch process directly.
exec ros2 launch rov_bringup rov_full.launch.py \
env:=${ENV} blueos_ip:=${BLUEOS_IP} record:=${RECORD}