Skip to content

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=60 x30_watchdog.py runs 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=0 never 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 off at 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 with jq.
  • 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 ​

ToolDoes
`x30_host.sh envcheck
`dr_services.sh statusoff
check_deps.shwhat the build and the stack need, checked offline
pack_sources.shthe stack, its repositories and the Livox SDK in one archive, on a computer with internet
install_neupan.shNeuPAN’s environment for the neupan controller
x30_check.pythe 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.