ArduPilot源码学习--(一)--MAC下编译ArduPilot源码
来源:互联网 发布:51单片机串口通信程序 编辑:程序博客网 时间:2024/05/16 09:13
最近大半个月都在搞ardupilot的东东,我的测试机是一台250的穿越机,Pixhawk 2.4.8的飞控(比较耐炸,机器刚到那天,测试时,由于GPS有问题,从大概6楼掉下来,四个桨叶的螺丝全掉了,桨叶也掉了两个,把所有东西找回来重新安装上,还是可以飞:))。
开始了我的ArduPilot之旅。。。。
我用的是一台MAC来做编译,使用eclipse开发环境,ArduPilot官网有使用MAC进行源码下载和编译教程,地址为:http://ardupilot.org/dev/docs/building-px4-with-make-on-mac.html
按步就班就可以了,只是这个命令时,下载好慢啊。。好像是从国外站点直接下载的。我下了两天。。
git submodule update --init --recursive过程中,我遇到好些问题:
1、git源码时,像modules文件夹里的nuttx等全是空的,必需要用上面的命令下载。我尝试过直接到对应的github上下载zip包,解压放里面,编译通不过。大概提示是文件夹已经存在。
2、下载这些模块时,网络慢,经常会断,但是早上下载的话,会快些。。
make命令提示:
CubardeMacBook-Air:arducopter cubar$ make
ArduPilot Building
==================
The following web page has detailed information on building the code
http://dev.ardupilot.org/wiki/building-the-code/
Before building a target you need to be in the target vehicle type directory
e.g. ArduPlane, ArduCopter, APMrover2, AntennaTracker
Most targets support a "-upload" extension to upload the firmware
to a connected board. e.g. "make px4-v2-upload"
Some targets support a "-debug" extension to enable a debug build
(with debug symbols, and without optimisation)
Note that the px4 builds are NOT parallel safe, NO -j flag
Targets
-------
px4-v1 - the PX4v1 board
px4-v2 - the Pixhawk
px4-v3 - the Pixhawk with 2M flash
px4-v4 - the XRacer
pxf - the Beagle Bone Black (BBB) + PXF cape combination
navio - the RaspberryPi + NavIO cape combination
linux - a generic Linux build
vrbrain - the VRBrain boards
sitl - the SITL Software In The Loop simulation
bbbmini - the Beagle Bone Black mini
bebop - the Parrot Bebop
raspilot - the RaspberryPi + pilot cape combination
erleboard - the ErleBoard legacy design
minlure - the drone lure for MinnowBoard and others
qflight - qualcomm flight board
erlebrain2 - the Erle-Brain 2 board
bhat - the RaspberryPi + BH HAT combination
pxfmini - the RaspberryPi Zero + PXFmini cape combination
navio2 - the RaspberryPi + NavIO2 cape combination
CubardeMacBook-Air:arducopter cubar$
编译成功的提示:
Pruning ROMFS files.
ROMFS: romfs.img
OBJ: romfs.o
CC: romfs.o.c
CC: romfs.o.c
LINK: /Users/cubar/src/ardupilot/modules/PX4Firmware/Build/px4fmu-v2_APM.build/firmware.elf
BIN: /Users/cubar/src/ardupilot/modules/PX4Firmware/Build/px4fmu-v2_APM.build/firmware.bin
%% Generating /Users/cubar/src/ardupilot/modules/PX4Firmware/Build/px4fmu-v2_APM.build/firmware.px4
%% Copying /Users/cubar/src/ardupilot/modules/PX4Firmware/Images/px4fmu-v2_APM.px4
text data bss dec hexfilename
1025164 2840 572241085228108f2c/Users/cubar/src/ardupilot/modules/PX4Firmware/Build/px4fmu-v2_APM.build/firmware.elf
PX4 ArduCopter Firmware is in ArduCopter-v2.px4
CubardeMacBook-Air:arducopter cubar$
问题来了,MAC下好像只有QGroundControl,没有MP。QC有点蛋疼的是不能越界修改参数,也不能查看日志(只能下载,下载后是一个bin文件,暂时没找到MAC下查看bin文件的软件,有个File Spy,能看到日志内容,但是不支持换行。。),因此,编译好后用U盘复制到WIN下面烧到PIX里。接下来就是各项校准。最后试飞。。。成功。。。
- ArduPilot源码学习--(一)--MAC下编译ArduPilot源码
- ArduPilot/APM源码学习笔记(一)
- win7 32/64位系统下编译ardupilot源码
- Ubuntu下编译 ardupilot
- APM.ardupilot 源码笔记2
- APM.ardupilot 源码笔记1
- Ardupilot 源码笔记(1)
- PX4源码和ardupilot使用Ubuntu命令下载和编译
- (5)学习ArduPilot源码——shetch范例
- ARDupilot
- Ardupilot Copter飞控源码框架介绍
- 一个非常好的ardupilot源码解析博客
- Ardupilot源码UART_test 分析笔记(1)
- win7下 pixhawk (ardupilot) 的编译
- Ubuntu16.04下如何编译 ardupilot
- Ardupilot -- APM源码笔记一(重制)~ APM源码基本结构
- Ardupilot编译脚本
- Ardupilot编译流程分析
- [zz终于搞懂]后缀数组-建数组代码分析
- 关于PHP内部编码与mysql字符差异问题的研究
- RecyclerView实现时光轴效果
- 【转载】C++常见问题: 字符串分割函数 split
- 梯度下降法
- ArduPilot源码学习--(一)--MAC下编译ArduPilot源码
- Python模块os
- Hibernate学习笔记之一
- EJB 是什么
- 使用Axis2技术发布webservice接口,使用wsCaller.jar工具测试接口
- LeetCode 121. Best Time to Buy and Sell Stock
- linux查看端口
- C语言基础:字符输入/输出验证
- weston快捷键