1.下载PX4源码
打开Ubuntu,Ctrl+Alt+T打开终端输入下面代码:
git clone https://github.com/PX4/PX4-Autopilot.git --recursive
出现上图中出现“Command ‘git’ not found, but can be installed with”,使用以下代码安装git:
sudo apt install git
出现"正在等待缓存锁:无法获得锁 /var/lib/dpkg/lock-frontend。锁正由进程 2871(unatten^Cd-upgr)",这是由于没有将软件源改为国内软件源,如果意外退出下载,第二次进入下载的时候缓存会被锁住。