feat: systemd auto-start for ROS2 + dashboard on Orin boot (bd-1hyn) #732

Merged
sl-jetson merged 1 commits from sl-perception/bd-1hyn-orin-autostart into main 2026-04-17 23:11:16 -04:00
Collaborator

Summary

  • 4 new systemd services: saltybot-ros2, saltybot-esp32-serial, saltybot-here4, saltybot-dashboard — full stack comes up on boot with correct dep ordering
  • ros2-launch.sh wrapper: sources ROS2 Humble + workspace overlay; used by all ROS2 service units
  • saltybot.target updated with boot-order comments and Wants for all new services
  • can-bringup.service bitrate updated 500 kbps → 1 Mbps (DroneCAN for Here4, bd-p47c)
  • 70-canable.rules moves bitrate out of udev RUN+= into the service; adds TAG+=systemd
  • 80-esp32.rules creates /dev/esp32-balance (CH343) and /dev/esp32-io (ESP32-S3 CDC) symlinks
  • install_systemd.sh rewritten: colcon build, installs all units + udev rules, enables mosquitto, usermod dialout
  • Fixes pre-existing full_stack.launch.py SyntaxError: resolves 8 unresolved merge conflict markers from ESP32-S3 rename PR, and fixes missing indent on enable_mission_logging_arg

Boot dependency chain

network-online.target
  → can-bringup.service          (CANable2 @ 1 Mbps)
      → saltybot-here4.service   (/gps/fix, /here4/*)
  → saltybot-esp32-serial.service (/can/vesc/*, /saltybot/attitude)
  → saltybot-ros2.service        (full_stack.launch.py, enable_bridge:=false)
      → saltybot-dashboard.service (port 8080)

Dependencies

  • saltybot-esp32-serial requires bd-wim1 (PR #727)
  • saltybot-here4 requires bd-p47c (PR #728)

Test plan

  • sudo ./jetson/systemd/install_systemd.sh completes without errors
  • systemctl status saltybot.target shows active after reboot
  • journalctl -fu saltybot-ros2 shows ROS2 nodes starting in sequence
  • journalctl -fu saltybot-here4 shows Here4 DroneCAN node publishing GPS fix
  • journalctl -fu saltybot-esp32-serial shows ESP32 BALANCE bridge connecting
  • Dashboard accessible at http://<orin-ip>:8080
  • systemctl stop saltybot.target cleanly stops all services
  • Unplug/replug CANable2: can-bringup + saltybot-here4 auto-restart

Resolves bd-1hyn
🤖 Generated with Claude Code

## Summary - 4 new systemd services: `saltybot-ros2`, `saltybot-esp32-serial`, `saltybot-here4`, `saltybot-dashboard` — full stack comes up on boot with correct dep ordering - `ros2-launch.sh` wrapper: sources ROS2 Humble + workspace overlay; used by all ROS2 service units - `saltybot.target` updated with boot-order comments and Wants for all new services - `can-bringup.service` bitrate updated 500 kbps → 1 Mbps (DroneCAN for Here4, bd-p47c) - `70-canable.rules` moves bitrate out of udev RUN+= into the service; adds TAG+=systemd - `80-esp32.rules` creates `/dev/esp32-balance` (CH343) and `/dev/esp32-io` (ESP32-S3 CDC) symlinks - `install_systemd.sh` rewritten: colcon build, installs all units + udev rules, enables mosquitto, usermod dialout - **Fixes pre-existing `full_stack.launch.py` SyntaxError**: resolves 8 unresolved merge conflict markers from ESP32-S3 rename PR, and fixes missing indent on `enable_mission_logging_arg` ## Boot dependency chain ``` network-online.target → can-bringup.service (CANable2 @ 1 Mbps) → saltybot-here4.service (/gps/fix, /here4/*) → saltybot-esp32-serial.service (/can/vesc/*, /saltybot/attitude) → saltybot-ros2.service (full_stack.launch.py, enable_bridge:=false) → saltybot-dashboard.service (port 8080) ``` ## Dependencies - `saltybot-esp32-serial` requires bd-wim1 (PR #727) - `saltybot-here4` requires bd-p47c (PR #728) ## Test plan - [ ] `sudo ./jetson/systemd/install_systemd.sh` completes without errors - [ ] `systemctl status saltybot.target` shows active after reboot - [ ] `journalctl -fu saltybot-ros2` shows ROS2 nodes starting in sequence - [ ] `journalctl -fu saltybot-here4` shows Here4 DroneCAN node publishing GPS fix - [ ] `journalctl -fu saltybot-esp32-serial` shows ESP32 BALANCE bridge connecting - [ ] Dashboard accessible at http://\<orin-ip\>:8080 - [ ] `systemctl stop saltybot.target` cleanly stops all services - [ ] Unplug/replug CANable2: can-bringup + saltybot-here4 auto-restart Resolves bd-1hyn 🤖 Generated with [Claude Code](https://claude.com/claude-code)
sl-perception added 1 commit 2026-04-17 22:21:05 -04:00
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>
sl-jetson merged commit b353a2ba29 into main 2026-04-17 23:11:16 -04:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: seb/saltylab-firmware#732
No description provided.