Additional Dependencies (Drone) - Weber-State-UAV-Program/Documentation-2024-2025 GitHub Wiki

This page covers how to install additional dependencies on the drone companion computer.

Dependencies


  • MAVSDK (v3.0.0)
  • uXRCE-DDS Agent (v2.4.2)
  • OpenCV (v4.5.4)
  • apriltag_msgs
  • usb_cam
  • image_proc

MAVSDK Installation

1. Install the necessary build requirements

sudo apt-get update
sudo apt-get install build-essential cmake git

2. Download MAVSDK from source

Download from source using git (the pre-build binaries of MAVSDK dont play nicely with the Raspberry Pi, it will need to be built from source)

git clone https://github.com/mavlink/MAVSDK.git

Update the git submodules

git submodule update --init --recursive

3. Configure MAVSDK before building

cmake -DCMAKE_BUILD_TYPE=Debug -Bbuild/default -S.

4. Build and Install

sudo cmake --build build/default --target install

INFO: More information on building and installing the MAVSDK Library can be found here

eProsima uXRCE-DDS Agent Installation

The uXRCE-DDS Agent can be installed using the following commands.

git clone -b v2.4.2 https://github.com/eProsima/Micro-XRCE-DDS-Agent.git
cd Micro-XRCE-DDS-Agent
mkdir build
cd build
cmake ..
make
sudo make install
sudo ldconfig /usr/local/lib/

INFO: More information on the uXRCE-DDS Agent can be found in eProsima documentation here

OpenCV Installation

OpenCV is required by the AprilTag ROS2 nodes and must be installed in order to avoid build conflicts when the ROS2 workspace is built.

1. Build Core Modules

# Install minimal prerequisites (Ubuntu 18.04 as reference)
sudo apt update && sudo apt install -y cmake g++ wget unzip

# Download and unpack sources
wget -O opencv.zip https://github.com/opencv/opencv/archive/4.x.zip
unzip opencv.zip

# Create build directory
mkdir -p build && cd build

# Configure
cmake  ../opencv-4.x

# Build
cmake --build .

2. Verify Installation

pkg-config --modversion opencv4

Ensure that a version >= 4.5 is displayed.

apriltag_msgs Installation

If ROS2 has not already been installed, be sure to install it with the instructions here. Then install the apriltag_msgs package using

sudo apt install ros-humble-apriltag-msgs

usb_cam Installation

If ROS2 has not already been installed, be sure to install it with the instructions here. Then install the usb_cam package using

sudo apt install ros-humble-usb-cam

image_proc Installation

If ROS2 has not already been installed, be sure to install it with the instructions here. Then install the image_proc package using

sudo apt install ros-humble-image-pipeline