COMMUNICATIONS MODULES

Introduction

All the modules are split into different Docker containers. As long as all the containers are present in the same network, Docker containers can communicate between one another if configured accordingly.

Technical Specifications

Here is depicted the current structure of the 2 different AI-PRISM containers.

AI-PRISM Docker Images packages

We will proceed listing them and providing a brief explanation of each one of them:

AI-PRISM Base Docker Image:

Base Image meant to be running in the main controller of each workplace.

It will include the following ROS packages: - rosbag2: A ROS2 package that provides a flexible and efficient way to record, play back, and analyse data from ROS2 topics. It allows users to capture and store sensor data and system state information for later analysis or debugging. - urdfdom: A ROS2 package that provides a C++ library for parsing URDF (Unified Robot Description Format) files. It enables developers to read and manipulate robot models, extracting information about links, joints, and other elements to facilitate robot visualization, planning, and control. - orocos_kinematics_dynamics: A ROS2 package that integrates the Orocos Kinematics and Dynamics Library (KDL). It offers advanced algorithms for solving forward and inverse kinematics problems, as well as dynamic computations for robot manipulators. This package enables accurate modelling and simulation of robot motions and interactions. - tf2: A ROS2 package that provides a transform library for managing coordinate frame transformations. It allows users to track the positions and orientations of multiple objects relative to each other over time. This package is essential for robot perception, navigation, and coordination, enabling seamless integration of sensor data from different frames of reference. - robot_state_publisher: A ROS2 package that publishes the state of a robot model to the tf2 transform tree. It takes a URDF description and joint state information as input and broadcasts the corresponding transforms. This package plays a crucial role in visualizing and controlling robot movements in simulation or on physical robots. - moveit: A ROS2 package that provides a flexible motion planning framework for manipulators and mobile robots. It offers a comprehensive set of tools and algorithms for motion planning, manipulation, and perception. MoveIt simplifies the development of complex robot applications, enabling tasks such as obstacle avoidance, trajectory generation, and grasping.

Software and hardware Requirements

Usage Manual

Assuming we already have an embedded device with Ubuntu Linux - Jammy Jellyfish (22.04) installed, the following steps help us into deploying the AI-PRISM Base Image.

A Docker Image has been built with all the necessary nodes already inbuilt.

It can be easily downloaded using the following steps.

0. Install Docker:

Open a terminal and run the following commands:

# Update the repos
sudo apt update

# Install the certificates
sudo apt install apt-transport-https ca-certificates curl software-properties-common

# Import the Docker GPG key to ensure the authenticity of the Docker packages:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

# Add the Docker repository to your system's sources.list.d directory:
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

# Update the package index again to include the Docker repository:
sudo apt update

# Finally, install Docker by running the following command:
sudo apt install docker-ce docker-ce-cli containerd.io

After the installation is complete, verify that Docker is running by checking the Docker version:

docker --version

We can give docker, sudo privileges to avoid having to do so constantly:

# Add the user to the docker group using the following command:
sudo usermod -aG docker <username>

IS recommended to restart the device after this point to allow all the changes to take effect.

# To verify that the user has Docker admin permissions, you can run the following Docker command without sudo:
docker run hello-world

Usage Manual

Docker is an open-source platform that enables developers to automate the deployment and management of applications within isolated environments called containers. Containers are encapsulated applications which include all its required dependencies, such as libraries, frameworks, and system tools. Docker allows us to easily deploy and run these containerized applications to run smoothly across computing environments. As developers, using docker we can package our custom applications as containers. Since Docker provides its own running environment, using it eliminates the "works on my machine" problem by providing a standardized and isolated environment for running applications. Docker utilizes an efficient image sharing mechanism, enabling fast and efficient container creation and distribution.

Use Case 1.

Use Case Diagram

Docker networks are virtualized networking environments within the Docker platform that allow containers to communicate and connect with each other. They provide isolated spaces for containers, enabling seamless communication using IP addresses. Docker networks facilitate secure and efficient interaction between containers, whether they are running on the same host or distributed across multiple systems.

Docker network usage model diagram

Since we have established that Docker containers can share data between one another, it is also important to define and configure said packages to allow ROS2 nodes to properly communicate between themselves. While ROS2, eliminates the need for a “centralized master node” for node communication, it is possible to create a Docker container hosting a “ROS_MASTER” for specific use cases. By defining a “ROS_MASTER” inside a Docker container, other Docker containers containing ROS2 nodes can establish connections with this master container. This setup can be advantageous in our scenario where a centralized coordination point exists (it being the AI-PRISM Base ROS Framework Image). It has to be empathized, that we are declaring this specific container as ROS_MASTER so the other containers can connect to it, but a “ROS Master Node” per se will not exist. The extension of the previous, to implement the mentioned ROS_MASTER is depicted as follows:

ROS Master-Slave usage model diagram

Use Case Mock-ups

Using the following Mock-up, we can provide the users with very simple and understandable example regarding how the interface to deploy Docker containers will work.

Once the user has selected a device, a set of folders with all the AI-PRISM containers will show up.

Docker Folder

From those folderwe will be able to easily select which desired container we want for our particular device.

Docker Devices

Functional Specifications

Since there exists now a ROS_MASTER container now, we must ensure that this container is the first one to be deployed. Luckily enough, Docker allows us to use “Docker Composer” filers to precisely define the launching order of each Docker container, the Network each one will be part of and the commands that will be sent to each container on startup, between other functionalities. This will be quite useful to, again, specify the role of this ROS_MASTER container, and let the others have a direct connection with it.

Functional Block Diagram

ROS Master-Slave usage model diagram

Main interfaces

List of main interfaces between functional components shown in the figure.

ID Component Name Description Sense
1 Container Role command Command to set the container as master or as slave In

Sequence Maps

Docker deployment Sequence Map The user needs to firs create a Docker Network that will serve to connect all the Docker containers. Then simply deploy all said Docker containers making sure they are connected to the previously created network so they can all interact with one another.