PAL Development Docker
To develop applications for your PAL robot, you have to use a development environment that matches the software of the robot. The PAL Robotics' robots come with a containerized development environment based on Docker for this.
PAL Robotics offers two Docker images for development: - The PAL Developer Docker image: that is provided when you purchase a PAL robot and contains all the specific configuration for your specific unit. Read how to use it here. - The PAL public Docker image: it is available to the public from Docker Hub and contains only the open-source packages that PAL Robotics has released. This is an ideal way to get started and explore our API in simulation, but not to be used for development for a robot, as this does not contain all the needed resources.
What is in the PAL Developer Docker image?¶
Like your robot, the PAL Docker image is based on Ubuntu 22.04 LTS with ROS 2 humble. It includes several packages (e.g. PAL-specific ROS message definitions) that are essential to develop and deploy code on your robot. This specific PAL distribution is called alum, the same as on the robot.
The PAL development docker is a tool to develop, but in no way a mimic of the real robot. This is, there are features in the robot that are not present in the development docker. The following are examples of feaures only available in the robot - The Module Manager - The WebGUI and their tools - The TTS capabilities of the robot
Recommended configuration for your development workstation¶
A computer with 8 CPU cores is recommended. Furthermore, to have a better user experience when using visualization tools like rviz and the Gazebo simulator a powerful graphics card is recommended.
Note
While officially both ROS humble and Docker are available for Windows, the practical implementation of Windows is still limited, especially when developing with the robot. It is recommended to use a Linux-based system for development with the PAL OS Docker image.
Downloading your PAL docker image¶
Once Docker has been installed, follow the next steps to download the PAL Docker image
You should have received a link to a nextcloud folder and the password to get access to it. This would contain, in particular a script called <client-name>-build-docker.sh.
Create the Docker container with the following command:
bash <client-name>-build-docker.sh --create
The created container can be started with the command:
docker start -ai tiago-pro-<SN>-dev
If you own more than one robot¶
If you own more than one PAL robot, you must specify the name of your robot:
bash <client-name>-build-docker.sh --create <robot_id>
Run bash <client-name>-build-docker.sh without parameters to see the list of available robots.
Note
If you have not received the PAL Docker script, please open a ticket on the support platform, requesting your Robot docker.
Sharing files between the host and the Docker image¶
By default the PAL Docker script mounts the $HOME/exchange folder of the host (your PC) to the /home/user/exchange folder in the Docker image. This folder can be used to share all ROS workspaces between the host and the Docker container.
See the Docker tutorials to learn more about Docker.
Configuring the ROS2 environment inside the Docker image¶
To use the ROS commands and packages provided in the Docker image, you have to source the following file
source /opt/pal/alum/setup.bash
This has to be done for every terminal open within the docker (e.g, by doing terminator -u when in the docker).
Compiling software¶
The PAL Docker image includes the ROS messages, system headers and our C++ open-source headers necessary to compile and deploy software to the robot, as well as visualization and simulation tools.
Some of the software APIs that we have developed are proprietary, and their headers are not included by default. If you require them, you can contact us through our customer service portal. These APIs are for accessing advanced features not available through a ROS API.
Deploy code from the Docker image to the robot¶
You can easily deploy your own ROS nodes from the PAL OS Docker image to your robot, using the pre-installed pal_deploy tool, that is only available in the client PAL development Docker.
Follow the Deploying code to the robot from the Developer Docker image.
Docker software upgrade¶
To upgrade the software of the PAL Docker image do
pal apt upgrade --update