Skip to content

Deployment

This section describes how to install new or updated ros packages and how to make persistent changes on the robot, or how to automatically execute a program on startup. Most of the information is taken from the chapter Modifying Robot Startup from the Talos Handbook.

1. Deploying Software on the Robot

To permanently deploy your code to the robot, PAL provides a deployment script that copies your package to the robot’s persistent storage.

To add a new package using the deploy.py script, follow these steps from your development computer (either directly or within a Docker environment):

  • Navigate to your my_catkin_ws workspace.
  • Build your workspace if needed.
  • Source your workspace environment.
  • Run the deployment script, specifying the package you want to deploy.

Example:

cd my_catkin_ws
catkin_make  # -j5 is optional for parallel builds
source devel/setup.bash
rosrun pal_deploy deploy.py --package <package_name_to_deploy> talos-7c

After restarting the robot, your package will be available. You can update existing packages using the same process.

Package Dependencies

The deploy tool follows the install() directives defined in each package’s CMakeLists.txt. Make sure that everything you need on the robot is declared to be installed.


2. Making Persistent Changes to the Filesystem

By default, changes on HAINER systems are not persistent and will be lost after a reboot. To change the configuration files persistently you need to enter the read-write mode with rwand chroot /ro as root user:

root@talos-7c:~# rw
Remounting as rw...
Mounting /ro as read-write
Mounting /opt as read-write
Mounting /var/lib/dpkg as read-write
Binding system files...
root@talos-7c:~# chroot /ro

Then apply your changes which should persist. In order to return to the previous state, use exitand ro:

root@talos-7c:~# exit
root@talos-7c:~# ro
Remounting /ro as read-only
Remounting /var/lib/dpkg as read-only
Remounting /opt as read-only
Unbinding system files...

The exit command returns from the chroot. The ro script remounts the default partitions.


3. Configuring Programs to Start on Boot

If you want a program to start automatically when the robot boots, it can be configured using YAML configuration files that are loaded as ROS parameters during startup.

There are two main types of configuration files:

  1. Application start configuration files – Configuration files that describe how to start an application
  2. Computer start lists – Files that determine which applications must be started for each computer in a robot.

These files are located in the config directory of the pal_startup_base package. You can go to the directory via

roscd pal_startup_base

In pal_startup_base/config, you will find three main folders:

  • apps → application start configuration files.
  • control → startup lists for the Control PC.
  • multimedia → startup lists for the Multimedia PC

Control PC and Multimedia PC

The files to change in the roscd pal_startup_base package must be changed on the Control PC! Even though the Multimedia PC has the same folders, changes there lead to no effects. Further, even if a node should be started on the Multimedia PC you still need to change the files on the Control PC! For that use respective multimedia folder but on the Control PC.

Application Start Configuration Files

These files describe how to start an application and are placed inside the apps directory within config.

example foo_bar.yaml

roslaunch: "foo_bar_pkg foo_bar_node.launch"
dependencies: ["Functionality: Foo", "Functionality: Bar"]
timeout: 20
The required attributes are:

  • One of: roslaunch, rosrun or bash
  • dependencies – a list of prerequisites that need to be running without error before starting this application. Use [] if there are none.

Computer Start Lists

Location:

  • pal_startup_base\config\control
  • pal_startup_base\config\multimedia

These YAML files list which apps start on each computer. Each entry must have a corresponding definition in pal_startup_base\config\apps folder as described above.

Multiple YAML files can be used for organization. All of them are loaded in the parameters server.

Example:

To start the foo_bar example on the control pc we add in
pal_startup_base\config\control\tu_darmstadt.yaml the line:

- foo_bar

Convention

We use the tu_darmstadt.yaml file for our changes to keep track of the custom adjustments.


Summary

  1. Deploy package
  2. Enter read-write mode with rw and chroot /ro
  3. Add yaml file in config/apps which defines which launch files to call
  4. Add new entry - <name_of_new_app> to a startup file in config/control or config/multimedia
  5. Return to read-only mode with exit and ro

Now the new app will be executed by every startup.

Warning

The application is now part of the starting procedure. If it fails it will be shown in the webcommander and the robot will throw an error and refuse to work.