Services
To run all ROS 2 nodes in the background and from boot, we use robot_upstart to install
the launch files as systemd services. In ROS 1 there was a single ros
service that
ran everything. For ROS 2 Humble, we have split this into three separate services:
Platform,
Sensors, and
Robot.
Clearpath Platform
The clearpath-platform
service launches the platform-service.launch.py
file found under /etc/clearpath/platform/launch/
. This will launch the nodes
required to operate the base platform, such as control, teleop, localization, and more. Running this service alone is enough to drive the robot, visualise it
in Rviz, and get platform data. This service can be stopped or started without interrupting the sensor service.
Clearpath Sensors
The clearpath-sensors
service launches the sensors-service.launch.py
file found under /etc/clearpath/sensors/launch/
. This will launch any
sensors defined in the robot YAML. This service can be stopped or started without interrupting the platform service.
Clearpath Manipulators
The clearpath-manipulators
service launched the manipulators-service.launch.py
file generated to /etc/clearpath/manipulators/launch
. This service will launch a secondary controller_manager
with the hardware interfaces and controllers required by the manipulators defined in the robot YAML. Additionally, it will launch MoveIt! with the default configuration for all manipulators. This service can be stopped or started without interrupting the platform service, allowing for the arms controllers to fail without compromising the ability for the platform to drive.
Clearpath Robot
The clearpath-robot
service is the "parent" service of clearpath-platform
and clearpath-sensors
. If it is restarted, then both the platform and sensors services
will restart. This service will run all of the generators in the PreExec
step, before allowing the two dependent services to start. While
the platform and sensors services are running, the robot service will periodically check for changes in the robot.yaml
file. If a change is detected
the service restarts, re-generating all files and restarting the platform and sensors services.