Implements full boot-time auto-start for the SaltyBot ROS2 stack on Jetson Orin. Everything comes up automatically after power-on with correct dependency ordering and restart-on-failure for each service. New systemd services: saltybot-ros2.service full_stack.launch.py (perception + SLAM + Nav2) saltybot-esp32-serial.service ESP32-S3 BALANCE UART bridge (bd-wim1, PR #727) saltybot-here4.service Here4 DroneCAN GPS bridge (bd-p47c, PR #728) saltybot-dashboard.service Web dashboard on port 8080 Updated: saltybot.target now Wants all four new services with boot-order comments can-bringup.service bitrate 500 kbps → 1 Mbps (DroneCAN for Here4) 70-canable.rules remove bitrate from udev RUN+=; let service own the bitrate, add TAG+=systemd for device unit install_systemd.sh installs all services + udev rules, colcon build, enables mosquitto, usermod dialout full_stack.launch.py resolve 8 merge conflict markers (ESP32-S3 rename) and fix missing indent on enable_mission_logging_arg — file was un-launchable with SyntaxError New: scripts/ros2-launch.sh sources ROS2 Humble + workspace overlay, then exec ros2 launch — used by all ROS2 service units via ExecStart= udev/80-esp32.rules /dev/esp32-balance (CH343) and /dev/esp32-io (ESP32-S3 native USB CDC) Resolves bd-1hyn Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
39 lines
1022 B
Bash
Executable File
39 lines
1022 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# ros2-launch.sh — Source ROS2 Humble + workspace overlay, then exec ros2 launch
|
|
#
|
|
# Used by saltybot-*.service units so that ExecStart= does not need to inline
|
|
# bash source chains.
|
|
#
|
|
# Usage (from a service file):
|
|
# ExecStart=/opt/saltybot/scripts/ros2-launch.sh <pkg> <launch_file> [args...]
|
|
#
|
|
# Env vars respected:
|
|
# ROS_DISTRO default: humble
|
|
# SALTYBOT_WS default: /opt/saltybot/jetson/ros2_ws/install
|
|
# ROS_DOMAIN_ID default: 42
|
|
|
|
set -euo pipefail
|
|
|
|
ROS_DISTRO="${ROS_DISTRO:-humble}"
|
|
SALTYBOT_WS="${SALTYBOT_WS:-/opt/saltybot/jetson/ros2_ws/install}"
|
|
|
|
ROS_SETUP="/opt/ros/${ROS_DISTRO}/setup.bash"
|
|
WS_SETUP="${SALTYBOT_WS}/setup.bash"
|
|
|
|
if [[ ! -f "${ROS_SETUP}" ]]; then
|
|
echo "[ros2-launch] ERROR: ROS2 setup not found: ${ROS_SETUP}" >&2
|
|
exit 1
|
|
fi
|
|
|
|
# shellcheck disable=SC1090
|
|
source "${ROS_SETUP}"
|
|
|
|
if [[ -f "${WS_SETUP}" ]]; then
|
|
# shellcheck disable=SC1090
|
|
source "${WS_SETUP}"
|
|
fi
|
|
|
|
export ROS_DOMAIN_ID="${ROS_DOMAIN_ID:-42}"
|
|
|
|
exec ros2 launch "$@"
|