在linux使用make编译ArduPilot for Pixhawk/PX4 ArduPilot 编译环境搭建
Building ArduPilot for Pixhawk/PX4 on Linux with Make
使用Make编译 ArduPilot for Pixhawk 2, Pixhawk and PX4 在linux上.
Note: 编译 Pixhawk 2 and Pixhawk使用 (make px4-v2). 编译 PX4 使用 make px4-v1.
Quick start
系统ubuntu16.04
Setup
安装 git:
sudo apt-get -qq -y install git
安装 arm-none-eabi-gcc编译器

安装gawk,cmake
apt-get install gawk cmake
克隆源码到本地:
git clone https://github.com/diydrones/ardupilot.git
运行ubuntu安装脚本:
ardupilot/Tools/scripts/install-prereqs-ubuntu.sh -y
Reload the path (log-out and log-in to make permanent):
. ~/.profile
Build 编译
以下是编译不同机型 Pixhawk2/Pixhawk 的命令. 编译PX4使用make px4-v2 而不是make px4-v1
To build for PX4 replace make px4-v2 with make px4-v1.
Build for Copter:
cd ardupilot/ArduCopter
make px4-v2
编译过程中出现的问题:

在github上的matrix目录名已经变化,所以找不到,手动git clone下载即可

之后又出现的问题是:
少python-empy,pip,catkin-pkg,直接使用apt-get install 安装即可

按照提示少哪个就安装哪个
又出现问题:genromfs没有找到
直接apt-get install genromfs

最后编译成功,生成px4固件文件

Build for Plane:
cd ardupilot/ArduPlane
make px4-v2
Build for Rover:
cd ardupilot/APMrover2
make px4-v2
Build for Antenna Tracker:
cd ardupilot/AntennaTracker
make px4-v2
Building
One you have the 3 git trees and compiler setup you do the build in your vehicle directory. For example, if building Plane then do this:
cd ardupilot/ArduPlane
make px4
That will build two files ArduPlane-v1.px4 and ArduPlane-v2.px4. The v1 file is for PX4v1, the v2 file is for PX4v2 (the Pixhawk).
你可以只编译一个使用 “make px4-v1” or “make px4-v2”.
The first time you build it will take quite a long time as it builds the px4 archives. Subsequent builds will be faster (especially if you setup ccache correctly).
Loading firmware
To load the firmware onto the board use
make px4-v1-upload
or
make px4-v2-upload
After it says “waiting for bootloader” plugin your PX4 on USB.
If upload consistently fails in the erase step then check if you are running ‘modemmanager’ which can take control of the PX4 USB port. Removing modemmanager can help.
Cleaning
If there have been updates to the PX4NuttX or PX4Firmware git submodules you may need to do a full clean build. To do that use:
make px4-clean
that will remove the PX4NuttX archives so you can do a build from scratch
在linux使用make编译ArduPilot for Pixhawk/PX4 ArduPilot 编译环境搭建的更多相关文章
- Spark入门实战系列--2.Spark编译与部署(上)--基础环境搭建
[注] 1.该系列文章以及使用到安装包/测试数据 可以在<倾情大奉送--Spark入门实战系列>获取: 2.Spark编译与部署将以CentOS 64位操作系统为基础,主要是考虑到实际应用 ...
- Linux移植到自己的开发板(一)环境搭建
环境搭建 vmware:VMware Workstation 15 Pro Linux系统:Ubuntu16.04 x64 1. 在Windows系统安装VMware15软件: 2. 网上下载并解压u ...
- Linux巩固记录(3) hadoop 2.7.4 环境搭建
由于要近期使用hadoop等进行相关任务执行,操作linux时候就多了 以前只在linux上配置J2EE项目执行环境,无非配置下jdk,部署tomcat,再通过docker或者jenkins自动部署上 ...
- Linux 4.10.8 根文件系统制作(一)---环境搭建
一.工具 制作工具为busybox 下载地址:https://busybox.net/ 解压: 二.制作文件系统 进入目录,执行make menuconfig: 2.1 busybox setting ...
- kali linux 入门(1) 基于win10和docker的环境搭建
1. 前言 渗透测试并没有一个标准的定义.国外一些安全组织达成共识的通用说法是,渗透测试是通过模拟恶意黑客的攻击方法,来评估计算机网络系统安全的一种评估方法,这个过程包括对系统的任何弱点.技术缺陷或漏 ...
- Android开发环境搭建 for windows (linux类似) 详细可参考“文件”中“Android开发环境搭建.pdf ”
ADT-Bundle for Windows 是由Google Android官方提供的集成式IDE,已经包含了Eclipse,你无需再去下载Eclipse,并且里面已集成了插件,它解决了大部分新手通 ...
- pixhawk在linux(ubuntu16.04)下的开发环境搭建和源码编译
1查找安装文档(http://dev.px4.io/starting-installing-linux.html)(本文仅针对硬件为PIXHAWK的开发环境搭建,其他硬件请参考官方文档) ...
- 【转】Linux(ubuntu14.04)上编译Android4.4源码的环境搭建及编译全过程
原文网址:http://jileniao.net/linux-android-building.html sublime text让我伤心.本来很信任sublime text的自动保存功能,之前使用一 ...
- linux下安卓编译apk环境搭建
ubuntu下linux安卓编译环境搭建. 配置好编译环境 (前提是已经安装了jdk,可以用java -verison 命令查看) 一.设置环境变量 用vi ~/.bashrc 打开编译环境 JA ...
随机推荐
- OneProxy添加license
proxy-license=XXXX-XXXX-XXXX-XXXX 放到proxy.conf中,然后重启proxy
- Oracle10G无图形安装及升级
Oracle10.2.0.1静默安装及升级到10.2.0.4 下载及解压好database和Disk1 环境配置: su - oracle vim ~/.bash_profile 保存. vim /d ...
- 阿里云docker
https://cr.console.aliyun.com docker 安装mysql image sudo docker pull mysql docker 运行 mysql docker r ...
- ID3、C4.5、CART、RandomForest的原理
决策树意义: 分类决策树模型是表示基于特征对实例进行分类的树形结构.决策树可以转换为一个if_then规则的集合,也可以看作是定义在特征空间划分上的类的条件概率分布. 它着眼于从一组无次序.无规则的样 ...
- SPSS数据分析—因子分析
我们知道主成分分析是一种降维方法,但是其本质上只是一种矩阵变换的过程,提取出来的主成分并不都具有实际含义,而这种含义往往是我们所需要的,接下来的因子分析可以解决这个问题 因子分析可以看做是主成分分析的 ...
- EasyUI combobox 下拉高度自适应
要指出的是,combobox是继承自combo的,所以,combo的属性也可以被combobox使用,该问题也是这样产生的,知道这个原理,该问题就解决一半了,另一点要指出的是,在easyui中,num ...
- mysql 批量插入数据存储过程
create procedure pFastCreateNums (cnt int unsigned) begin declare s int unsigned default 1; truncate ...
- js关闭子窗口,刷新父窗口
父页面js:function btnAdd_onclick() {window.open("xxx.jsp", "","height=600, wid ...
- RAM清理器
或许有些氨基小白不知道RAM是什么,官方的解释是"运行内存" 只要你的RAM够大,你玩什么都不卡! 今天给大家带来的就是 <RAM清理器>!!体积小,能量大就是我给他介 ...
- Android图片压缩(质量压缩和尺寸压缩)
文章地址:::: http://blog.csdn.net/jdsjlzx/article/details/44228935