The Firmware repository provides a convenient script to set your Arch installation up for PX4 development: Tools/setup/arch.sh.
The script installs (by default) all tools to build PX4 (without RTPS) for NuttX targets and run simulation with jMAVsim.
You can additionally install the Gazebo simulator by specifying the command line argument:
The instructions have been tested on Manjaro (Arch based distribution) as it is much easier to set up than Arch Linux.
To get and run the scripts, do either of:
- Download PX4 Source Code and run the scripts in place:
git clone https://github.com/PX4/Firmware.git bash Firmware/Tools/setup/arch.sh
- Download just the needed scripts and then run them:
wget https://raw.githubusercontent.com/PX4/Firmware/master/Tools/setup/arch.sh wget https://raw.githubusercontent.com/PX4/Firmware/master/Tools/setup/requirements.txt bash arch.sh
The script takes the following optional parameters:
--gazebo: Add this parameter parameter to install Gazebo from the AUR.
Gazebo gets compiled from source. It takes some time to install and requires entering the
sudopassword multiple times (for dependencies).
--no-nuttx: Do not install the NuttX/Pixhawk toolchain (i.e. if only using simulation).
--no-sim-tools: Do not install jMAVSim/Gazebo (i.e. if only targeting Pixhawk/NuttX targets)