Building Aseba

Requierements & Dependencies

Aseba requires a C++14 compatible compiler. We recommend GCC 6, Clang 5 or MSVC 19 (Visual Studio 17).

Aseba depends on Qt5.9 or greater. You will also need cmake 3.1 or greater, we recommend you use the latest version available.

Getting the source code

The source code of Aseba is hosted on GitHub. To fetch the source, you must first install Git .

Then, to clone aseba, execute:

git clone --recursive https://github.com/mobsya/aseba.git
cd aseba

When pulling, it might be necessary to update the submodules with git submodule update --init. Alternatively, git can do that for you if you configure it with git config --global submodule.recurse true.

All the commands given in the rest of this document assume the current path is the root folder of the cloned repository.

Getting Started on Windows with MSVC

Aseba Builds on Windows Seven SP1 or greater.

Download and install the following components:

Dep Dowload Notes
Visual Studio 2017 (15.9.4+) Download Install the “Desktop development with C++” workload
Cmake 3.12+ Website Make sure the version of boost you choose is compatible with the cmake version
Boost 1.67+ Website x64 x86  
Qt 5.11.2+ Installer Install the MSVC 2017 binaries as well as the Qt Charts component. For x86 you can choose the MSVC 2015 32 bits binaries instead in the Qt installer components screen.
Bonjour You will find the installer in third_party/bonjour/bonjoursdksetup.exe  
Node & Npm Download npm.exe must be in the path
7Zip Download  
NSIS 2 Download For building the installer; nsis.exe must be in the path;
Python Download For signing the installer; python.exe must be in the path;

To build Aseba, you first need to generate a Visual Studio Solution.

To do so:

  1. Launch Developer Command Prompt for VS 2017

    Navigate to the directory in which you want to build aseba. It is recommended not to build in the source directory

  2. Run set "CMAKE_PREFIX_PATH=C:`<BOOST_INSTALLATION_PATH>\boost\_1_67_0;C:\<QT_INSTALLATION_PATH>\<QT_VERTION>\msvc2017_64;"

    where <BOOST_INSTALLATION_PATH> and <QT_INSTALLATION_PATH> are the paths where Boost and Qt are installed, respectively.

    <QT_VERTION> is the version of Qt you installed. A folder of that name exists in the Qt installation directory.

  3. set "BOOST_ROOT=<BOOST_INSTALLATION_PATH>"

  4. To build for x64:

cmake -G"Visual Studio 15 2017 Win64" -DBoost_DEBUG=ON -DBUILD_SHARED_LIBS=OFF "-DBOOST_ROOT=%BOOST_ROOT%" "-DBOOST_INCLUDEDIR=%BOOST_ROOT%/boost" "-DBOOST_LIBRARYDIR=%BOOST_ROOT%/lib64-msvc-14.1" "-DCMAKE_TOOLCHAIN_FILE=<ASEBA_SOURCE_DIRECTORY>\windows\cl-toolchain.cmake" <ASEBA_SOURCE_DIRECTORY>

To build for x86:

cmake -G"Visual Studio 15 2017" -DBoost_DEBUG=ON -DBUILD_SHARED_LIBS=OFF "-DBOOST_ROOT=%BOOST_ROOT%" "-DBOOST_INCLUDEDIR=%BOOST_ROOT%/boost" "-DBOOST_LIBRARYDIR=%BOOST_ROOT%/lib32-msvc-14.1" "-DCMAKE_TOOLCHAIN_FILE=<ASEBA_SOURCE_DIRECTORY>\windows\cl-toolchain.cmake" <ASEBA_SOURCE_DIRECTORY>

where <ASEBA_SOURCE_DIRECTORY> is the directory containing the aseba repository.

Then, to build the project, you can either run msbuild aseba.sln or open aseba.sln with Visual Studio 2017. Refer to the documentation of msbuild and Visual Studio for more informations.

Getting Started on OSX

You will need OSX 10.11 or greater

  • Install Homebrew.
  • In the cloned repository run
brew update brew tap homebrew/bundle brew bundle

Then you can create a build directory and build Aseba

mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF ..
make

Getting Started on Linux

Dependencies On Ubuntu & Debian

sudo apt-get install qttools5-dev-tools \
                     qtbase5-dev \
                     qttools5-dev \
                     libqt5help5 \
                     qt5-qmake \
                     libqt5opengl5-dev \
                     libqt5svg5-dev \
                     libqt5x11extras5-dev \
                     libqwt-qt5-dev \
                     qtdeclarative5-dev \
                     libboost-all-dev \
                     libudev-dev \
                     libxml2-dev \
                     libsdl2-dev \
                     libpython-dev \
                     libavahi-compat-libdnssd-dev \
                     cmake \
                     g++ \
                     git \
                     make

Building Aseba

mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF ..
make

A note about permissions

If you will be connecting to your robot through a serial port, you might need to add yourself to the group that has permission for that port. In many distributions, this is the “dialout” group and you can add yourself to that group and use the associated permissions by running the following commands:

sudo usermod -a -G dialout $USER
newgrp dialout

Getting Started on Android

VPL 2 can be built for Android. Other tools such as studio, playground, and the old VPL are not compatible with Android.

To build the Android version you will need:

Building VPL 2

First, you need to prepare some environment variables

export ANDROID_SDK=<path_of_the_android_sdk>
export ANDROID_NDK=<path_of_the_android_ndk>
export CMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}:$HOME/<path_of_qt5_for_android>"

Then you can build vpl2 with cmake. An APK will be generated in build/bin

mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DANDROID_NATIVE_API_LEVEL=14 -DANDROID_STL=gnustl_shared -DCMAKE_TOOLCHAIN_FILE=`pwd`/../android/qt-android-cmake/toolchain/android.toolchain.cmake
make

Advanced Setup

Running tests

Once the build is complete, you can run ctest in the build directory to run the tests.

Ninja

The compilation of Aseba can be significantly speedup using ninja instead of make. Refer to the documentation of cmake and ninja.