Main Content

Setting up PX4 Tool Chain on Ubuntu 18.04

Note

This section explains the task to be completed as part of the step—Set Up the PX4 Toolchain—of the Hardware Setup process (using the Hardware Setup screens). Do not perform this as a standalone task.

Note

This section explains the PX4 Toolchain process for Ubuntu 18.04 for PX4 Firmware v1.10.2. This is not applicable for older (for example, v1.8.0) or any other PX4 Firmware version.

UAV Toolbox Support Package for PX4® Autopilots requires installation of a development environment. This development environment is used to build firmware for all the Pixhawk® Series flight controller boards.

Download PX4 Firmware v1.10.2

You need to download PX4 Firmware v1.10.2 as mentioned in Downloading PX4 Source Code in Ubuntu 18.04.

Set up PX4 Toolchain on Ubuntu 18.04

After you have downloaded PX4 Firmware v1.10.2, follow the below commands to install the PX4 Toolchain on Ubuntu 18.04.

.

Note

Ensure that your host computer is connected to an active internet connection before proceeding.

To install and setup the PX4 toolchain:

  1. Launch the bash terminal in the Ubuntu 18.04 host computer.

  2. Go to the PX4 Firmware v1.10.2 directory that you downloaded.

    For example: cd /home/username/mypx4/

  3. Navigate to the folder containing the Toolchain setup script.

    cd Firmware/Tools/setup

  4. Run the Toolchain setup script.

    source ubuntu.sh

  5. Enter the sudo credentials when prompted, to start the PX4 toolchain setup process.

    The ubuntu.sh build script installs different third-party utilities like GCC 7.2.1, CMake 3.x, Ninja 1.6, Git, and certain Python packages.

  6. Reboot the host computer after the ubuntu.sh script runs successfully.