⸻ Quick Start | Installation | Documentation | Research Paper | Acknowledgements ⸻
With this repository, we provide a reference implementation of our application management framework which is conceptualized in our research paper. The framework consists of the components application manager and the custom operators. It enables the demand-driven deployment, reconfiguration, and shutdown of applications in a Kubernetes cluster.
The repository contains the following components:
- Application Manager: The application manager is a ROS 2 node implemented in the application_manager package. It acts as a ROS 2 action server and listens for incoming requests (
DeploymentRequests
) to deploy, reconfigure, or shutdown applications. - Application Manager Interfaces: The application_manager_interfaces package contains the ROS 2 action and message definitions containing the
DeploymentRequest
which is interpreted by the application manager. - Custom Operators: The code for the implemented Kopf operators together with the Kubernetes custom resource definitions (CRDs) is located in the custom-operators folder.
The reference implementation in this repository contains the Object Detection Fusion application enabling collective environment perception. This application is applied in the experiment described in our research paper. The logic is extensible for new applications.
The image above illustrates the architecture of the application management framework. The application manager and the custom operators are brought into action in the use case "Collective Perception at Intersection" in the scope of RobotKube. We invite you to check out the code and run the use case.
Important
This repository is open-sourced and maintained by the Institute for Automotive Engineering (ika) at RWTH Aachen University.
Advanced C-ITS Use Cases are one of many research topics within our Vehicle Intelligence & Automated Driving domain.
If you would like to learn more about how we can support your advanced driver assistance and automated driving efforts, feel free to reach out to us!
📧 [email protected]
Consider our example and see how to run the application manager in a Docker container orchestrating Kubernetes resources in a local Kubernetes cluster based on k3d.
Check out the repository RobotKube containing executable use cases to see the application management framework in action.
Especially the use case "Collective Perception at Intersection" gives a good idea of the capabilities of the application manager and the custom operators. In the repository, for each use case, you find a guide on how to run the use case in a local Kubernetes cluster. See for example here.
You can integrate the application_manager package stack into your existing ROS 2 workspace by cloning the repository, installing all dependencies using rosdep, and then building it from source.
# ROS workspace$
git clone https://github.com/ika-rwth-aachen/application_manager.git src
rosdep install -r --ignore-src --from-paths src
colcon build --packages-up-to application_manager --cmake-args -DCMAKE_BUILD_TYPE=Release
pip install kubernetes
The application_manager package stack is also available as a Docker image, containerized through docker-ros. Note that launching the container launches the application_manager
node by default (ros2 launch application_manager application_manager.launch.py
).
docker run --rm ghcr.io/ika-rwth-aachen/application_manager:latest
Click to show
The reference implementation of the application management framework in this repository is extensible for new applications. Depending on your use case, you can extend the application manager and/or implement new custom operators to support your application or to support another type of connection. An examplary application that we provide with the reference implementation is the Object Detection Fusion Application. In the example, the Object Detection Fusion Application involves services for object detection, object fusion and MQTT clients for data transmission. Therefore, so far, we implemented three custom opertors which operate the custom resources of those services.
Consider the following steps to add support for a new application:
- In the application_manager package, create a new class in a new Python file located in the
applications
folder. There, you can implement application-specific configuration that is, e.g., interpreted from an incomingDeploymentRequest
. As an example, see the Object Detection Fusion Application. Include the new class in the main file. See, for example, here. Your implemented class should at least include a constructor (see, e.g., here) and a method generating the Kubernetes custom resource (see, e.g.,generate_custom_resources()
). - In the main file, in the method
configure_custom_resource_deployments_applications()
, add code (e.g., here) for your new application where you initialize the new class you implemented in the previous step and call the methodgenerate_custom_resources()
of your new class. This method generates the Kubernetes custom resource for your application which is subsequently deployed by the application manager (see here). - When you implement a new application for which you need one or more new Kubernetes Custom Resource Definitions (CRDs), you need to implement new custom operators (one per new CRD) which operate the CRDs. Add the code for your new custom operators in the
custom-operators
folder. Consider the following steps:- Add one new Custom Resource Definition (CRD) (see, e.g., here) per implemented operator.
- According to the control logic to operate the custom resource (see, e.g., here), implement and add the code of your new operator in the
custom-operators
folder including a configuration file with which the user can provide parameters (see, e.g., here). - Create a Dockerfile (see, e.g., here) based on which the Docker image of your operator is built via a GitHub workflow. The Docker image is then pushed to the GitHub Container Registry.
- Extend the ROS 2 message definition in the application_manager_interfaces package with your new application, especially here. Consider what information is needed and should be encoded in the
DeploymentRequest
to deploy your new application.
Coming soon!
This work is accomplished within the projects autotech.agil (FKZ 01IS22088A) and 6GEM (FKZ 16KISK036K). We acknowledge the financial support for the projects by the Federal Ministry of Education and Research of Germany (BMBF).