Development Environment on Linux

Linux allows you to build for all PX4 targets (NuttX based hardware, Qualcomm Snapdragon Flight hardware, Linux-based hardware, Simulation, ROS).

We have standardized on Debian / Ubuntu Linux LTS (16.04) as the supported Linux distribution. Instructions are also provided for CentOS and Arch Linux.

The following instructions explain how to set up a development environment on Ubuntu LTS using convenience bash scripts. Instructions for manually installing these and additional targets can be found in Ubuntu/Debian Linux.

Development Toolchain

The instructions below show how you can use our convenience bash scripts to setup the developer toolchain on Ubuntu LTS. All the scripts install the Qt Creator IDE, Ninja Build System, Common Dependencies, FastRTPS, and also download the PX4 source to your computer (~/src/Firmware).

The scripts have been tested on a clean Ubuntu LTS 16.04 installation. They may not work as expected if installed on top of an existing system or on another Ubuntu release. If you have any problems then follow the manual installation instructions.

First make the user a member of the group "dialout"

  1. On the command prompt enter:
    sudo usermod -a -G dialout $USER
    
  2. Logout and login again (the change is only made after a new login).

Then follow the instructions for your development target in the sections below.

Pixhawk/NuttX (and jMAVSim)

To install the development toolchain:

  1. Download ubuntu_sim_nuttx.sh.
  2. Run the script in a bash shell:
    source ubuntu_sim_nuttx.sh
    
    You may need to acknowledge some prompts as the script progresses.
  3. Restart the computer on completion.

Snapdragon Flight

Setup instructions for Snapdragon Flight are provided in the PX4 User Guide:

Raspberry Pi

To install the development toolchain:

  1. Download ubuntu_sim_common_deps.sh (this contains the jMAVSim simulator and common toolchain dependencies).
  2. Run the script in a bash shell:
    source ubuntu_sim_common_deps.sh
    
    You may need to acknowledge some prompts as the script progresses.
  3. Follow setup instructions in Ubuntu/Debian Linux for Raspberry Pi.

Parrot Bepop

Follow the (manual) instructions here: Ubuntu/Debian Linux > Parrot Bebop.

jMAVSim/Gazebo Simulation

To install the Gazebo and jMAVSim simulators:

  1. Download ubuntu_sim.sh.
  2. Run the script in a bash shell:
    source ubuntu_sim.sh
    
    You may need to acknowledge some prompts as the script progresses.

If you just need jMAVSim, instead download and run ubuntu_sim_common_deps.sh.

PX4 works with Gazebo 7, 8, and 9. The script installs Gazebo 9.

Gazebo with ROS

To install the development toolchain:

  1. Download ubuntu_sim_ros_gazebo.sh.
  2. Run the script in a bash shell:
    source ubuntu_sim_ros_gazebo.sh
    
    You may need to acknowledge some prompts as the script progresses.

Note:

  • ROS is installed with Gazebo7 by default (we have chosen to use the default rather than Gazebo8 or Gazebo9 to simplify ROS development).
  • Your catkin (ROS build system) workspace is created at ~/catkin_ws/.

Ground Control Software

Download and install the QGroundControl Daily Build.

QGroundControl

Editor / IDE

The development team often use:

On linux the installation scripts automatically install Qt Creator as part of the common dependencies. You can launch it by entering qtcreator in a bash terminal.

Next Steps

Once you have finished setting up the environment, continue to the build instructions.

results matching ""

    No results matching ""