This page has moved to https://docs.px4.io/master/en/dev_setup/dev_env_mac.html.
The Missing Package Manager for macOS (or Linux). Homebrew is a package managing tool. It's more popular on Linux but is also used extensively on macOS. In fact, for apps that install as packages, Homebrew is the easiest way to remove them. Here's how you can install Homebrew on macOS Catalina. In order to install Homebrew on macOS Catalina, you must have Xcode installed. If you're interested in installing Homebrew you can learn about that here. Where Homebrew Packages Are Installed on Mac OS: the Homebrew Installation Path. By default, Homebrew will install all packages into the following directory in all versions of Mac OS: /usr/local/Cellar/ Additionally, Homebrew places symlinks into the following directory path. Step 0 - Install Homebrew. Homebrew does not come pre-installed with Mac, so you'll have to install it yourself. Thankfully, it's a single line of code that you paste into the terminal. Here are instructions on how to install Homebrew on Mac. Approach #1 - Install Up-To-Date JDK. Update 10/24/20: java was migrated from homebrew/cask to homebrew.
Click here if you are not redirected.
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 Simulation
To build other targets see: Toolchain Installation > Supported Targets.
A video tutorial can be found here: Setting up your PX4 development environment on macOS.
Homebrew Installation
The installation of Homebrew is quick and easy: installation instructions.
Enable more open files (Handle 'LD: too many open files' error)
The PX4 toolchain requires the usage of the ZSH shell. If you are using the shell, add this line to your shell profile:
Create this file or append it: ~/.zshenv
and add this line:
Ensuring Python points to Homebrew
If not already existing, create the file ~/.zshrc
and add these lines:
Common Tools
After installing Homebrew, run these commands in your shell to install the common tools:
Install the required Python packages
Gazebo Simulation
To install SITL simulation with Gazebo:
jMAVSim Simulation
Download Homebrew
To use SITL simulation with jMAVSim you need to install a recent version of Java (e.g. Java 14).You can either download Java 14 from Oracle or use the AdoptOpenJDK tap:
jMAVSim for PX4 v1.11 and earlier required Java 8.
Additional Tools
See Additional Tools for information about other useful development tools that are not part of the build toolchain (for example IDEs and GCSs).
Next Steps
Macos Brew Install Docker
jMAVSim Simulation
Download Homebrew
To use SITL simulation with jMAVSim you need to install a recent version of Java (e.g. Java 14).You can either download Java 14 from Oracle or use the AdoptOpenJDK tap:
jMAVSim for PX4 v1.11 and earlier required Java 8.
Additional Tools
See Additional Tools for information about other useful development tools that are not part of the build toolchain (for example IDEs and GCSs).
Next Steps
Macos Brew Install Docker
Homebrew Macos
Once you have finished setting up the environment, continue to the build instructions.