8. Running on the robot
8.1 Services
Each host runs its part as a systemd service, x30-navigation and x30-perception (tools/x30_host.sh install <role>):
Type=notify,WatchdogSec=60x30_watchdog.pyruns the host’s launch file and reports to systemd while the ROS master answers and every critical node is registered; it restarts the launch when the master restarts or a critical node stays away.Restart=on-failure,StartLimitIntervalSec=0never given up on.- Order the navigation host’s service starts after Deep Robotics’ services (
jy_*) and the one running the ROS master; it never starts a master of its own (Deep Robotics’ LiDAR and IMU drivers depend on that master). - Deep Robotics’ autonomy
tools/dr_services.sh offat every start, and a sweep every 30 s by the watchdog: what Deep Robotics restarts late goes again (the journal names it).
8.2 Settings files
/etc/x30/<role>.env, mode 600, owned by root and the robot’s user: X30_LAUNCH_ARGS (the launch arguments, shell words), the secrets (X30_TELEOP_TOKEN, X30_NETRA_TOKEN, HIKMICRO_PASSWORD, HERTZINO_PASSWORD), X30_PYTHON for NeuPAN, the log settings. install never overwrites an existing file.
8.3 Logs
- The journal
journalctl -u x30-navigation: the service, the watchdog’s verdicts. - Each node’s JSON lines
~/x30/logs(X30_LOG_DIR): one event per line, with the node, the level, the message and its fields; easy to filter withjq. - ROS’s own logs pruned at every start to
X30_ROS_LOG_MB(2048 MB), the oldest runs first, the newest five kept. - The black box (
blackbox:=true) the last hours of status, commands, pose and log in a rolling rosbag.
8.4 Tools
| Tool | Does |
|---|---|
| `x30_host.sh env | check |
| `dr_services.sh status | off |
check_deps.sh | what the build and the stack need, checked offline |
pack_sources.sh | the stack, its repositories and the Livox SDK in one archive, on a computer with internet |
install_neupan.sh | NeuPAN’s environment for the neupan controller |
x30_check.py | the ROS rows of x30_host.sh check: the master and every node reachable, the other host’s clock, the cameras’ ports |
8.5 No internet on the robot
The robot never downloads: pack_sources.sh archives the sources on a computer with internet, scp carries the archive, check_deps.sh checks the apt packages offline (or through an SSH proxy of the computer). NETRA builds its images once with internet and starts offline after.