Configure an application to launch at start-up#
Caution
This page only applies to ROS 1
Pre-requisites#
You must already know how to install (deploy) your app on the robot. See Tutorial: Deploying ROS packages on the robot.
We recommend you to also read about the robot’s start-up configuration.
Adding your own application to the robot’s start-up sequence#
In addition to the system applications, you can easily add your own custom start-up configuration files to start your own applications.
To do so, the startup manager looks for configuration files inside
/home/pal/.pal/pal_startup/
.
To modify the robot’s startup, this directory must be created and have the same
structure as the config directory within the pal_startup_base
package,
specifically, having the apps/
and control/
subdirectories.
For example, to start customizing the start-up:
ssh pal@<robot>-0c
cd /home/pal/.pal/
mkdir -p pal_startup/apps
mkdir -p pal_startup/control
To add a new application my_app
to the startup, create a my_app.yaml
file within the apps
directory, and populate it with the information
described in Application files.
That files defines how to start the application.
For instance:
/home/pal/.pal/pal_startup/apps/my_app.yaml
roslaunch: "my_app_package my_app.launch"
dependencies: []
Then, in order to launch the application on the main control
computer,
create a new start-up list inside the control/
directory: a simple yaml
file that references my_app.yaml
:
/home/pal/.pal/pal_startup/control/my_app_list.yaml
- my_app
Reboot the robot. Your app should now be automatically started.
You can also start, stop, restart or visualize the logs of your application with the command-line tools:
ssh pal@<robot>-0c
pal-stop my_app
pal-start my_app
pal-restart my_app
pal-log my_app