../_images/tiagopro-icon.png ../_images/tiago-head-icon.png ../_images/kangaroo-icon.png ../_images/tiago-icon.png ../_images/triago-icon.png ../_images/ari-icon.png ../_images/talos-icon.png ../_images/mobile-bases-icon.png

Using the PAL public Docker image#

Overview#

PAL provides a public Docker image that you can use to run PAL’s tutorials on your local machine. It is based on ROS 2 Humble and comes with all the PAL open-source packages pre-installed, as well as some proprietary packages (in compiled binary form).

This image is hosted on DockerHub.

Important

If you already own a PAL robot, you might want to use the PAL developer Docker image instead, which includes all the necessary tools to install software on the robot, as well as access to all the proprietary packages found on your robot.

What is a Docker image?#

Docker is a platform for developers and sysadmins to develop, deploy, and run applications inside containers. The use of Linux containers to deploy applications is called containerization. Containerization is increasingly popular due to several of its features:

  • Flexible: Complex applications with many and/or non-standard dependencies can be containerized;

  • Lightweight compared to e.g. virtual machines: Containers leverage and share the host kernel;

  • Interchangeable: Deploy updates and upgrades on-the-fly;

  • Portable: Bild locally, deploy to the cloud, and run anywhere;

  • Scalable: Increase and automatically distribute container replicas;

  • Stackable: Stack services vertically and on-the-fly.

If you are interested on how docker works, visit their webpage .

Installing Docker#

Important

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. We recommend using a Linux-based system for development with PAL public Docker image.

First, install Docker for Ubuntu, either via your package manager (apt install docker.io), or following the instructions of the official page.

Note

Do not forget to follow the Linux post-install steps to be able to run docker as a non-root user.

Verify that the Docker Engine installation is successful by running the hello-world image:

docker run hello-world

Running the PAL public Docker image#

Pull the PAL tutorials public Docker image:

docker pull palrobotics/public-tutorials-alum-devel

Then, run the container, with access to your webcam and your X server:

xhost +
mkdir ~/exchange
docker run -it --name ros4hri \
               --device /dev/video0:/dev/video0 \
               -e DISPLAY=$DISPLAY \
               -v /tmp/.X11-unix:/tmp/.X11-unix \
               -v ~/exchange:/home/user/exchange \
               palrobotics/public-tutorials-alum-devel bash

Note

The --device option is used to pass your webcam to the container, and the -e: DISPLAY and -v /tmp/.X11-unix:/tmp/.X11-unix options are used to display graphical applications on your host’s X server.

This will also create a shared folder in your home directory, ~/exchange, which you can use to exchange files between your host and the container.

See also#