Description: This article on the official website of the tutorial, combined with their own development process encountered problems to improve.
1. Installing the auxiliary Tools 1.1 JAVA
1, PX4 and the compatibility of MAC system There are some problems: JDK1.8 compatibility is good, to JDK1.9, JDK1.10 and so on, there are some mutual incompatibility problems. Therefore, the Java installation of Mac system must be carried out first;
2, PX4 Pure Digital simulation and semi-physical simulation, generally need to jmavsim, but because of its needs java3d, JOGL, Joal and other support, if the MAC system installed a number of Java software version, prone to lead to the development environment run error, Therefore, the installation of the Java software on the MAC system is confirmed first.
- Open terminal and execute the following statement:
>>cd /Library/Java/JavaVirtualMachines #切换至JAVA路径
>>ls #查找MAC系统已安装得JAVA软件版本
>>sudo rm -rf jdk1.8.0_45.jdk #逐个卸载所有的JAVA版本
>>......
>>ls #查找MAC系统已安装得JAVA软件版本,若出现提示,表明MAC系统中JAVA软件已经卸载干净
- Download the Java SE Development Kit 8U171.JDK to the Java website and install it after the download is complete.
1.2 Xquartz and Python toolkit
- Open terminal and execute the following statement:
>> cd ~
>> brew cask install xquartz
>> sudo easy_install pip #pip是安装python包的工具
>> sudo -H pip install pyserial empy toml numpy pandas jinja2 #安装必须的python工具包
2. Install the development environment (Toolchain)
- Install Homebrew. Homebrew Short Brew, is the Mac OSX software package management tool, can be conveniently installed in the Mac software or uninstall software, artifact!
- Open terminal and execute the following statement:
>> cd ~
>> brew tap PX4/px4
>> brew install px4-dev
>> brew install px4-sim
- Install the ground station. Once the download is complete, drag it directly into the finder/application.
3. Firmware download
Flight Control Firmware Official tutorial
- Open terminal and execute the following statement:
>> cd ~
>> git clone https://github.com/PX4/Firmware.git
>> cd Firmware
>> make posix jmavsim #运行结果如所示
pxh> commander takeoff #将四旋翼起飞,运行结果如所示
- Commander Land: Command four-rotor landing; Shutdown: Command Exit app*
MAC Configuration PX4 Development environment