方法一:
git clone https://github.com/ArduPilot/ardupilot.git
cd ardupilot
git tag
git checkout copter-3.4.6
git submodule update –init –recursive
cd copter
make px4-v2 或者 make px4-v2-heli
方法二:
git clone -b copter-3.4.6 https://github.com/ArduPilot/ardupilot.git
cd ardupilot
git submodule update –init –recursive
cd copter
make px4-v2 或者 make px4-v2-heli
删除不需要的文件夹
cd ardupilot
rm APMrover2/ -Rf
rm AntennaTracker/ -Rf
rm ArduPlane/ -Rf