Qt Arducopter ArduPilot编译环境搭建

本文档提供了在Windows和Linux环境下编译ArduPilot无人机控制软件的详细步骤,包括Git仓库克隆、依赖项安装、Qt安装及配置、项目导入及编译等关键环节。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.ArduPilot下载

windows下:
Building ArduPilot for Pixhawk/PX4 on Windows with Make

git clone https://github.com/ArduPilot/ardupilot
cd ardupilot
git submodule update --init --recursive

Linux下:
Building ArduPilot for Pixhawk/2/PX4 on Linux with Make

Install git:

sudo apt-get -qq -y install git

Clone the source:

git clone https://github.com/ArduPilot/ardupilot.git
cd ardupilot
git submodule update --init --recursive

Run the install-prereqs-ubuntu.sh script:

Tools/scripts/install-prereqs-ubuntu.sh -y

Reload the path (log-out and log-in to make permanent):

. ~/.profile

2.Qt安装

下载:
http://download.qt.io/official_releases/qt/

windows下安装,直接运行exe。
linux下安装:
ubuntu下安装QT5.7.1

3.QtCreator导入工程

Building ArduPilot for Pixhawk/PX4 on Windows or Linux with QtCreator
1)Select File -> New File or Project.

2)Choose the Import Project template and from these templates Import Existing Project. Then press Next.
这里写图片描述

3)Enter a project name and choose the location of the ArduPilot Git repository. Then press Next.
这里写图片描述

4)Qt Creator shows you the files that will be imported into the project. Just press Next (we will worry about this a bit later).
这里写图片描述

5)click finish.

4.编译环境设置

1)编译器设置
这里写图片描述

注意:箭头所指位置设置一定要与Qt默认ABI一致,否则无法通过,如下图
这里写图片描述

2)kit设置
这里写图片描述

3)工程Build设置
这里写图片描述

4)编译

5)补充
Linux下设置基本相同,唯一在编译器选择时有差别,如下
这里写图片描述



参考文献:

Building ArduPilot for Pixhawk

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值