Remove old version (if necessary)

Ubuntu

If you have an older version already installed remove that first:

sudo apt remove mavsdk

Download & Install the library’s deb package:

Go to https://github.com/mavlink/MAVSDK/releases

Find the release you want to work with, for example, 2.12.12

If you are on Ubuntu 22.04 directly, install the associated .deb package. Easy!

If you are on WSL2, no problem, just copy the link address and use the wget command like so:

wget <https://github.com/mavlink/MAVSDK/releases/download/v2.12.12/libmavsdk-dev_2.12.12_ubuntu22.04_amd64.deb>

Then, go to the folder you have downloaded the .deb to and run the following command to install, you might have to change the command if you wanted a different version of mavsdk:

sudo dpkg -i libmavsdk-dev_2.12.12_ubuntu22.04_amd64.deb

<aside> 💡

For the installation on our companion computer, the Jetson, do the same thing, but with ARM64 (To Be Tested if Jetson is really ARM64).

</aside>

Build & Try Example

The examples are stored as part of the projects source code. Get them using git in a terminal:

git clone --branch v2.12 <https://github.com/mavlink/MAVSDK.git> --recursive
cd MAVSDK

The examples can be found in the examples directory:

cd examples

To build the takeoff and land example, you can do: