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. Installation instructions are also provided for boutique distributions (Cent OS 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 bash scripts to install the developer toolchain on Ubuntu LTS. All the scripts include 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"
- On the command prompt enter:
sudo usermod -a -G dialout $USER
- 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/Gazebo Simulation
To install the development toolchain:
- Download ubuntu_sim_nuttx.sh.
- Run the script in a bash shell:
You may need to acknowledge some prompts as the script progresses.source ubuntu_sim_nuttx.sh
- Restart the computer on completion.
Snapdragon Flight or Raspberry Pi
To install the development toolchain:
- Download ubuntu_sim.sh (this contains the simulators and common toolchain dependencies).
- Run the script in a bash shell:
You may need to acknowledge some prompts as the script progresses.source ubuntu_sim.sh
- Follow the platform-specific instructions in Ubuntu/Debian Linux for your target:
Parrot Bepop
Follow the (manual) instructions here: Ubuntu/Debian Linux > Parrot Bebop.
Gazebo with ROS
To install the development toolchain:
- Download ubuntu_sim_ros_gazebo.sh.
- Run the script in a bash shell:
You may need to acknowledge some prompts as the script progresses.source ubuntu_sim_ros_gazebo.sh
Note:
- ROS is installed with Gazebo7 by default (we have chosen to use the default rather than Gazebo8 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.
Editor / IDE
The development team often use:
- Sublime Text: a fast and lean text editor.
- Qt Creator: A popular open-source IDE.
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.