[Unit]
Description=SaltyBot Web Dashboard (saltybot_dashboard — port 8080)
Documentation=https://gitea.vayrette.com/seb/saltylab-firmware
#
# Serves the live monitoring dashboard on http://<orin-ip>:8080
# Subscribes to ROS2 topics over the local DomainID (ROS_DOMAIN_ID=42).
# Starts after the ROS2 stack but does not hard-depend on it —
# the dashboard handles missing topics gracefully and will show data as
# nodes come up.
After=network-online.target saltybot-ros2.service
Wants=saltybot-ros2.service

[Service]
Type=simple
User=orin
Group=orin

Environment="ROS_DOMAIN_ID=42"
Environment="ROS_DISTRO=humble"
Environment="SALTYBOT_WS=/opt/saltybot/jetson/ros2_ws/install"

ExecStart=/opt/saltybot/scripts/ros2-launch.sh \
    saltybot_dashboard dashboard.launch.py

Restart=on-failure
RestartSec=5s
StartLimitInterval=60s
StartLimitBurst=5

TimeoutStartSec=30s
TimeoutStopSec=10s

StandardOutput=journal
StandardError=journal
SyslogIdentifier=saltybot-dashboard

[Install]
WantedBy=saltybot.target
