Development Environment on Mac

MacOS is a supported development platform for PX4. The following instructions set up an environment for building:

  • NuttX-based hardware (Pixhawk, etc.)
  • jMAVSim Smulation
  • Gazebo 8 Simulation

To build other targets see: Toolchain Installation > Supported Targets.

Preconditions

Increase the maximum allowed number of open files on macOS using the Terminal command:

ulimit -S -n 2048

At time of writing (December 2018) the master branch uses more than the default maximum allowed open files on macOS (256 in all running processes). As a short term solution, increasing the number of allowed open files to 300 should fix most problems.

Homebrew Installation

The installation of Homebrew is quick and easy: installation instructions.

Common Tools

After installing Homebrew, run these commands in your shell to install the common tools:

brew tap PX4/px4
brew install px4-dev
# Optional, but recommended additional simulation tools:
brew install px4-sim

If the installation outputs an error message about missing requirements follow the instructions. Your system will be missing Java and Quartz:

brew cask install xquartz java

Make sure you have Python 3 installed.

brew install python3

# install required packages using pip3
pip3 install --user pyserial empy toml numpy pandas jinja2 pyyaml pyros-genmsg

Additional Tools

After setting up the build/simulation toolchain, see Additional Tools for information about other useful tools.

Next Steps

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

results matching ""

    No results matching ""