# Installation

{% hint style="warning" %}
AuterionOS 3.0 or later is required to use Auterion SDK.
{% endhint %}

## Installation in an AuterionOS app

Installing Auterion SDK in an app is the same as installing it locally.

We recommend using the Auterion app base Docker image `auterion/app-base:v2` for building apps.

To add Auterion SDK to your app, add the following lines to your apps' Dockerfile:

```docker
RUN curl -1sLf 'https://dl.cloudsmith.io/public/auterion/public/setup.deb.sh'| sudo -E bash
RUN apt update && apt install -y ros-humble-auterion-sdk=1.13.1-0jammy
```

{% hint style="info" %}
If you encounter an error like this during the Docker build:

```
W: GPG error: http://packages.ros.org/ros2/ubuntu jammy InRelease: The following signatures were invalid: EXPKEYSIG F42ED6FBAB17C654 Open Robotics <info@osrfoundation.org>
E: The repository 'http://packages.ros.org/ros2/ubuntu jammy InRelease' is not signed.
```

Add the following lines to your Dockerfile to rotate the expired ROS 2 repository key:

```docker
# Rotate expired ROS 2 repository key
# This can be removed with upcoming app-base:v3
RUN rm /etc/apt/sources.list.d/ros2.list && \
    curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \
    echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
```

{% endhint %}

## Compatibility

{% hint style="warning" %}
Incompatibilities between the version of PX4 on your Skynode and Auterion SDK of your application can result in runtime errors or flight modes not registering.
{% endhint %}

To maintain compatibility between your app and the FMU, ensure that the versions of the following packages correspond to the AOS/APX4 version in use:

* `ros-humble-auterion-sdk`
* `ros-humble-px4-ros2-cpp`
* `ros-humble-px4-msgs`&#x20;
* `ros-humble-auterion-core-msgs`

<table data-full-width="false"><thead><tr><th width="92.6363525390625">AOS</th><th width="121.54541015625">APX4</th><th>ros-humble-auterion-sdk</th><th>ros-humble-px4-ros2-cpp</th><th>ros-humble-px4-msgs</th><th>ros-humble-auterion-core-msgs</th></tr></thead><tbody><tr><td>v4.3.0</td><td>1.16.0-3.3.17</td><td>1.15.0</td><td>1.6.1</td><td>3.3.1</td><td>0.0.6</td></tr><tr><td>v4.2.0</td><td>1.16.0-3.3.1</td><td>1.13.1</td><td>1.6.1</td><td>3.3.1</td><td>0.0.6</td></tr><tr><td>v4.1.12</td><td>1.15.0-3.2.12</td><td>1.12.1</td><td>1.5.2</td><td>3.2.13</td><td>0.0.6</td></tr><tr><td>v4.1.2</td><td>1.15.0-3.2.5</td><td>1.10.0</td><td>1.5.1</td><td>3.2.13</td><td>0.0.6</td></tr><tr><td>v3.7.9</td><td>1.15.0-3.2.1</td><td>1.7.0</td><td>1.4.0</td><td>3.2.1</td><td>0.0.5</td></tr><tr><td>v3.6.14</td><td>1.14.0-3.1.1</td><td>1.6.6</td><td>1.3.0</td><td>3.1.1</td><td>0.0.5</td></tr></tbody></table>

#### Installation Example

For example to install the compatible versions for AOS v4.3, we have to use the following Docker command format:

```docker
RUN apt update && apt install -y \
        ros-humble-auterion-sdk=1.15.0-0jammy \
        ros-humble-px4-ros2-cpp=1.6.1-0jammy \
        ros-humble-px4-msgs=3.3.1-0jammy \
        ros-humble-auterion-core-msgs=0.0.6-0jammy \
    && \
    apt clean && \
    rm -rf /var/lib/apt/lists/*
```

Replace the version numbers with the appropriate versions from the compatibility table above based on your AOS version.
