#!/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}