Getting Started

This topic explains how to get the QGroundControl source code and build it either natively or within a Vagrant environment. It also provides information about optional or OS specific functionality.

Source Code

Source code for QGroundControl is kept on GitHub here: https://github.com/mavlink/qgroundcontrol. It is dual-licensed under Apache 2.0 and GPLv3.

To get the source files:

  1. Clone the repo (or your fork):
    git clone --recursive https://github.com/mavlink/qgroundcontrol.git
    
  2. Update submodules (do this each time you pull new source code):
    git submodule update
    

Github source-code zip files cannot be used because these do not contain the appropriate submodule source code. You must use git!

Build QGroundControl

Native Builds

QGroundControl builds are supported for OSX, Linux, Windows, iOS and Android. QGroundControl uses Qt as its cross-platform support library and uses QtCreator as its default build environment.

  • OSX: OSX 10.7 or higher, 64 bit, clang compiler
  • Ubuntu: 64 bit, gcc compiler
  • Windows: Vista or higher, 32 bit, Visual Studio 2015 compiler
  • iOS: 8.0 and higher
  • Android: Jelly Bean (4.1) and higher. Standard QGC is built against ndk version 19.
  • Qt version: 5.11.0 (only)

Install Qt

You need to install Qt as described below instead of using pre-built packages from say, a Linux distribution, because QGroundControl needs access to private Qt headers.

  1. Download the Qt installer for the [supported Qt version)[#qt_version]. You will also need to install the Qt Speech package.

    • Ubuntu: Set the downloaded file to executable using:chmod +x. Install to default location for use with ./qgroundcontrol-start.sh. If you install Qt to a non-default location you will need to modify qgroundcontrol-start.sh in order to run downloaded builds.
    • Windows: Make sure to install VS 2015 32 bit package.
  2. Install Additional Packages (Platform Specific)

    • Ubuntu: sudo apt-get install speech-dispatcher libudev-dev libsdl2-dev
    • Fedora: sudo dnf install speech-dispatcher SDL2-devel SDL2 systemd-devel
    • Arch Linux: pacman -Sy speech-dispatcher
    • Windows: USB Driver to connect to Pixhawk/PX4Flow/3DR Radio
    • Android: Qt Android Setup

Building using Qt Creator

  1. Launch Qt Creator and open the qgroundcontrol.pro project.
  2. Select the appropriate kit for your needs:
    • OSX: Desktop Qt 5.11.0 clang 64 bit

      iOS builds must be built using XCode.

    • Ubuntu: Desktop Qt 5.11.0 GCC bit
    • Windows: Desktop Qt 5.11.0 MSVC2015 32bit
    • Android: Android for armeabi-v7a (GCC 4.9, Qt 5.11.0)

Vagrant

Vagrant can be used to build and run QGroundControl within a Linux virtual machine (the build can also be run on the host machine if it is compatible).

  1. Download and Install Vagrant
  2. From the root directory of the QGroundControl repository run vagrant up
  3. To use the graphical environment run vagrant reload

Additional Build Notes for all Supported OS

  • Warnings as Errors: Specifying CONFIG+=WarningsAsErrorsOn will turn all warnings into errors which breaks the build. If you are working on a pull request you plan to submit to github for consideration, you should always run with this setting turned on, since it is required for all pull requests.

    Putting this line into a file called user_config.pri in the top-level directory (same directory as qgroundcontrol.pro) will set this flag on all builds without interfering with the GIT history.

  • Parallel builds: For non Windows builds, you can use the -j# option to run parellel builds.
  • Location of built files: Individual build file results can be found in the build_debug or build_release directories. The built executable can be found in the debug or release directory.
  • If you get this error when running QGroundControl: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version 'GLIBCXX_3.4.20' not found., you need to either update to the latest gcc, or install the latest libstdc++.6 using: sudo apt-get install libstdc++6.
  • Unit tests: To run the unit tests, build in debug mode with UNITTEST_BUILD definition, and then copy deploy/qgroundcontrol-start.sh script into the debug directory before running the tests.

Optional/OS-Specific Functionality

QGroundControl has functionality that is dependent on the operating system and libraries installed by the user. The following sections describe these features, their dependencies, and how to disable/alter them during the build process. These features can be forcibly enabled/disabled by specifying additional values to qmake.

Opal-RT's RT-LAB Simulator

Integration with Opal-RT's RT-LAB simulator can be enabled on Windows by installing RT-LAB 7.2.4. This allows vehicles to be simulated in RT-LAB and communicate directly with QGC on the same computer as if the UAS was actually deployed. This support is enabled by default once the requisite RT-LAB software is installed. Disabling this can be done by adding DEFINES+=DISABLE_RTLAB to qmake.

XBee Support

QGroundControl can talk to XBee wireless devices using their proprietary protocol directly on Windows and Linux platforms. This support is not necessary if you're not using XBee devices or aren't using their proprietary protocol. On Windows, the necessary dependencies are included in this repository and no additional steps are required. For Linux, change to the libs/thirdParty/libxbee folder and run make;sudo make install to install libxbee on your system (uninstalling can be done with a sudo make uninstall). qmake will automatically detect the library on Linux, so no other work is necessary.

To disable XBee support you may add DEFINES+=DISABLE_XBEE to qmake.

Video Streaming

Check the Video Streaming directory for further instructions.

Download last development version

QGroundControl mantains this download links to allow test and usage of the last updates in main code.

results matching ""

    No results matching ""