Main Content

Downloading PX4 Source Code in Ubuntu 20.04 and 22.04

Note

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

UAV Toolbox Support Package for PX4® Autopilots requires PX4 Autopilot Firmware v1.14

Download PX4 Source Code from GitHub

To download the PX4 Sourcecode (PX4 Autopilot Firmware v1.14) on the Ubuntu® 20.04 or 22.04 host computer:

  1. Open the bash terminal on Ubuntu 20.04 or 22.04.

  2. Create a directory named mypx4 in the home folder.

    For example:

    • create a directory in home directory, as described below:

      cd ~

      mkdir mypx4

      cd mypx4

      Note

      Ensure that your computer is connected to an active internet connection before proceeding with the next step.

  3. Go to the newly created px4 directory, and run the following commands one-by-one (you may need to wait for a command execution to complete before entering the next command):

    1. git clone https://github.com/PX4/PX4-Autopilot.git --recursive

    2. cd PX4-Autopilot

    3. git checkout v1.14.0 -f

    4. git submodule update --init --recursive

    The download might take several minutes to complete (depending on the internet speed) and the downloaded firmware can be found in the location, ~/home/mypx4/PX4-Autopilot.

After you complete this step, go back to the Hardware Setup screen again and continue with the next step.