最新参考:Ardupilot开发环境搭建(Ubuntu18.04,20190407)
目前Ardupilot的master版本需要用waf编译
waf 是一个帮助构建和编译系统的框架,采用python语言编写
Waf详细用法看这本书:
https://waf.io/book/#_projects_and_commands
官方给的用Waf编译Ardupilot的方法:
https://github.com/ArduPilot/ardupilot/blob/master/BUILD.md
克隆仓库下来:git clone https://github.com/ArduPilot/ardupilot.git
进入仓库中:cd ardupilot
更新响应的模块:git submodule update --init --recursive
# 这步执行一次就行了,就是装些必要的包
运行脚本文件:Tools/scripts/install-prereqs-ubuntu.sh -y
使配置直接生效:. ~/.profile
进入相应的目录:cd ArduCopter
开始编译四旋翼:make px4-v2
19/11/29日发现master版不支持make编译了,下了Copter-3.5版用make编译会出错
使用Waf编译Ardupilot
cd ardupilot
./waf configure --board CubeBlack //选择你飞控型号
./waf copter //执行编译copter
./waf copter # All multirotor types
./waf heli # Helicopter types
./waf plane # Fixed wing airplanes including VTOL
./waf rover # Ground-based rovers and surface boats
./waf sub # ROV and other submarines
./waf antennatracker # Antenna trackers
Cu