# DDS / ROS2 Configuration

{% hint style="info" %}
This API requires at least [auterion-api-version: 4 ](/app-development/app-framework/app-framework-1.md)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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.auterion.com/app-development/app-framework/dds-ros2-configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
