Skip to content

ArchLinux 上的开发环境

WARNING

This development environment is community supported and maintained. It may or may not work with current versions of PX4.

See Toolchain Installation for information about the environments and tools supported by the core development team.

The PX4-Autopilot 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 for NuttX targets and run simulation with JMAVSim. You can additionally install the Gazebo Classic simulator by specifying the command line argument: --gazebo.

Gazebo on Arch

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:

    sh
    wget https://raw.githubusercontent.com/PX4/containers/master/docker/px4-dev/scripts/archlinux_install_script.sh

sudo -s source ./archlinux_install_script.sh


- 只下载你所需的脚本并运行他们:

```sh
wget https://raw.githubusercontent.com/PX4/PX4-Autopilot/release/1.15/Tools/setup/arch.sh
wget https://raw.githubusercontent.com/PX4/PX4-Autopilot/release/1.15/Tools/setup/requirements.txt
bash arch.sh

The script takes the following optional parameters:

  • --gazebo: Add this parameter to install Gazebo from the AUR.

    Gazebo gets compiled from source. It takes some time to install and requires entering the sudo password multiple times (for dependencies).

:::

  • --no-nuttx: Do not install the NuttX/Pixhawk toolchain (i.e. if only using simulation).
  • --no-sim-tools:不要安装 jMAVSim/Gazebo 仿真器(例如你只想使用或者开发调试 Pixhawk/NuttX)