Installation#

System requirements#

PDrAW works as a standalone program & library for Linux (tested on Ubuntu 20.04) and macOS (tested on macOS 11.6 Big Sur)

You need to install the following packages:

Linux:

$ apt install curl git python3 zlib1g-dev libglfw3-dev libsdl2-dev cmake qtbase5-dev build-essential

We use repo as a tool for downloading and updating the workspace. The tool might be available from your OS package manager (which is the preferred way of installing it), but is notoriously absent from Ubuntu 20.04.

To install it on Ubuntu 20.04 :

# ~/bin/ can be replaced by any directory on your PATH
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
$ sed -i.bak -e 's;#!/usr/bin/env python$;#!/usr/bin/env python3;' ~/bin/repo

macOS:

We use the homebrew package manager to install packages under macOS. If you use another package manager, you will need to install the required packages manually.

We also require the Xcode command line tools, which should be automatically installed by homebrew.

# Install homebrew first
$ brew install repo pkg-config glfw3 sdl2 cmake

Clone the GroundSDK Tools workspace#

PDrAW is part of Parrot’s GroundSDK Tools workspace, so you need to clone that workspace, using the repo tool.

# Assuming you want to put the code in $HOME/code/groundsdk-tools
$ mkdir -p $HOME/code/groundsdk-tools
$ cd $HOME/code/groundsdk-tools
$ repo init -u https://github.com/Parrot-Developers/groundsdk-tools-manifest
$ repo sync

After the initial clone, only the repo sync command will be needed to update your workspace to the latest GroundSDK Tools version.

Build PDrAW#

After each update, the GroundSDK Tools project needs to be rebuilt with the following command:

# Run from the workspace root directory
$ ./build.sh -p groundsdk-linux -t build -j/1

Note

For macOS users, replace the following parts of example command lines:

  • groundsdk-linux with groundsdk-macos

Note

This commands builds both the pdraw and vmeta-extract executables, and all the required libraries required to use PDrAW from your own project.

Run PDrAW#

In order to run the built binaries, you need to use a wrapper script provided in the out directory:

# Run from the workspace root directory
$ ./out/groundsdk-linux/staging/native-wrapper.sh pdraw --help