# DDS / ROS2 Configuration

{% hint style="info" %}
This API requires at least [auterion-api-version: 4 ](https://docs.auterion.com/app-development/app-framework/app-framework-1)to be available
{% endhint %}

For the inter-process communication between FMU and apps or app to app, AOS applies [DDS](https://en.wikipedia.org/wiki/Data_Distribution_Service)/[ROS2](https://docs.ros.org/en/humble/index.html) as a middleware/framework. While there are multiple implementations of DDS, Auterion applies [FastDDS](https://fast-dds.docs.eprosima.com/en/latest/) as the recommended middleware to use. DDS can apply the usage of shared memory and even realizes zero-copying to make the communication most efficient and resource-saving. In order to obtain such a setup, the configuration of DDS has to be setup properly for every application using it.

This setup is done automatically on app installation if the API version is set accordingly. A proper configuration file is mounted to each containers and the referring environment variables are set, depending on your app's settings (running in a full access network mode `host` or more closed `bridge` network).

For example, the environment variables may be defined as:

```
FASTRTPS_DEFAULT_PROFILES_FILE=/usr/share/dds/fastdds/fastdds-host-mode.xml
RMW_IMPLEMENTATION=rmw_fastrtps_cpp
RMW_FASTRTPS_USE_QOS_FROM_XML=1
```

`FASTRTPS_DEFAULT_PROFILES_FILE` is a common FastDDS configuration file used for pure DDS communication. The two latter variables are used by ROS2 applications.

{% hint style="info" %}
*In case a developer intends to use zero-copy messaging, the network mode `host` has to be set in the `auterion-app.yml`.*
{% endhint %}

{% hint style="info" %}
*In case a developer intends to override the configurations, it can be done in the`auterion-app.yml` files `compose-override` section for each service.*
{% endhint %}
