Installation

System requirements

The following install instructions have been tested under Ubuntu 18.04 and should also work on Debian 9 or higher.

Clone the parrot-groundsdk repo workspace

Olympe is part of the parrot-groundsdk workspace so first, you need to clone that workspace (somewhere in your home directory) using the (repo) utility tool:

$ cd $HOME
$ mkdir -p code/parrot-groundsdk
$ cd code/parrot-groundsdk
$ pwd
~/code/parrot-groundsdk
$ repo init -u https://github.com/Parrot-Developers/groundsdk-manifest.git
$ repo sync

Install olympe-linux dependencies

To install the dependencies of the “parrot-groundsdk” workspace, just execute the postinst script.

$ pwd
~/code/parrot-groundsdk
$ ./products/olympe/linux/env/postinst

Build olympe-linux

Olympe relies on some arsdk C libraries that need to be (re-)built after a repo sync.

Before using Olympe, We need to build the arsdk itself. In the future, the following command will be needed after each repo sync.

$ pwd
~/code/parrot-groundsdk
$ ./build.sh -p olympe-linux -A all final -j

Note: The above command needs to be done from the workspace root directory, you’ve created in the previous step.

Set up the environment

Finally, you need to set up the shell environment in which you will execute Olympe scripts. In the future, you will have to do this before you execute an Olympe script.

To setup an interactive Olympe Python environment, source the shell script:

$ pwd
~/code/parrot-groundsdk
$ source ./products/olympe/linux/env/shell
(olympe-python3) $ pip --version
pip 18.1 from ~/code/parrot-groundsdk/.python/py3/local/lib/python3.6/site-packages/pip (python 3.6)

The shell script can be sourced from outside the workspace:

$ pwd
~/code/some/super/cool/project/path
$ source ~/code/parrot-groundsdk/./products/olympe/linux/env/shell

When a Python environment is active, your shell prompt should be prefixed by `olympe-python3 `.

In this console you can now execute your Olympe script, for example:

(olympe-python3) $ python my_olympe_script.py

Once you’ve finished working with Olympe, just type exit or press Ctrl+D to exit the active environment and restore your previous prompt.

Please, exit any active environment now before continuing.

(olympe-python3) $ exit
$

If you need to execute a script from a non-interactive environment (for example in a CI job), source the setenv or the setenv3 scripts instead. These scripts don’t spawn a new shell for you, don’t change your current prompt and just set up the environment in your current shell process.

Check your installation

If your installation succeeded, the following commands shouldn’t report any error.

$ pwd
~/code/parrot-groundsdk
$ source shell
(olympe-python3) $ python -c 'import olympe; print("Installation OK")'
$ exit