Modern robotics solutions comprise a variety of software and hardware components interacting mutually and seamlessly to provide advanced solutions to the businesses’ process optimisation problems. The innovative solutions designed in HARTU have been implemented on top of the ROS2 framework as a number of C++ and Python packages, each accompanied by multiple asset and configuration files. Deploying these solutions requires IT expertise that plant managers and operators often do not have, and close support from the solution developers would then be required. Moreover, oftentimes, the same software components are expected to be deployed on multiple target environments, each with a different operating system, base libraries and hardware configurations, and would thus typically require lengthy, adapted installation procedures. It is therefore important to try to streamline the deployment process – both from a developer and end-user’s standpoint – by taking advantage of the right tools and methodologies.
To this end, HARTU adopts containerisation, using Docker as implementation technology. Its ability to allow for the creation of self-contained packages – the containers – encapsulating application and required libraries, ensures:
- Portability by achieving independence from the user-space libraries of the host
- Efficiency by having a smaller footprint compared to virtual machines
- Security by enabling the creation of isolated runtime environments
all this greatly simplifies deployment management.
In the context of HARTU, each developed ROS2 package becomes a Docker image, and the set of packages/images composing a use case solution is defined through a Docker Compose YAML file. This file allows to specify, for each image, a set of directives useful to control their configuration, deployment and combined behaviour. For example, shared volumes with application data and settings, restart policies, logs or network configurations. In simpler words, the Docker Compose can be seen as a package of pre-configured software assets ready to be installed. Given the considerable space requirements of some of these images, in HARTU they are organised in an optimised tree-like structure where the upper-level images contain libraries shared by the lower-level ones. More precisely, these are organised in three main layers: the first one containing the ROS2 distribution of choice and additional libraries, the intermediate one containing SDKs, and the last one containing the final ROS2 nodes implementing the custom business logic.

To further streamline the process, the container images lifecycle is supported by GitLab as described previously in this article. Developers push their code to the repository, and a set of CI/CD pipelines takes care of building the corresponding Docker images as well as uploading them to the integrated Docker Registry, from where they will be eventually pulled by the target environments.
Challenges
The use of Docker in Robotics is challenged by the need to:
- Interact with hardware devices such as cameras, 3D scanners, sensors or license dongles – requiring network or USB connections
- Expose desktop user interfaces such as that of the HARTU App Manager
- Access to GPUs
The mode of interaction with hardware devices depends on the specific protocols used by the software-device pair. For example, in HARTU, the Photoneo 3D Scanner has been connected to the Docker host machine via Ethernet and accessed from within the container. This was possible thanks to a particular configuration giving the container access to the required underlying host machine resources.
When it comes to accessing the desktop user interfaces, the goal can be achieved using the X protocol. An X Server is installed on the host machine and is reached by the applications (X Clients) running inside the containers, which stream to it the graphical information to be rendered to the user.
Finally, for those applications requiring graphical processing acceleration, Docker provides specific directives to access the GPUs, enabling containers to offload intensive computations to the graphics hardware of the host.
Wrapping Up
To sum up, the HARTU experience demonstrates that containerisation technologies can offer tangible benefits to the robotics domain as well. By streamlining dependency management and allowing for interaction with hardware devices, containers not only reduce deployment times but also provide flexibility in updating and reorganising solution modules.
Stay updated with HARTU’s latest news 👉 Join the newsletter




