APM的代码中集成了仿真程序,只需要做一些简单的设置就可以方便地搭建出一个运行在电脑上的完全模拟真实飞行的仿真环境。
参考:
http://ardupilot.org/dev/docs/setting-up-sitl-on-linux.html
Ubuntu16.04(这是我仿真的环境)、python2.7
一、下载ardupilot源代码
(也可以根据飞控版本下载,如PIX2.6对应Copter3.2版本:https://github.com/diydrones/ardupilot/tree/ArduCopter-3.2.1)
如果电脑中安装了git,也可以直接使用这个命令从github仓库中克隆源代码:
git clone https://github.com/ArduPilot/ardupilot
cd ardupilot
git submodule update --init --recursive
2、Install some required packages
If you are on a debian based system (such as Ubuntu or Mint), we provide a script that will do it for you. From ardupilot directory :