藻华自用资料四——无人机(ardupilot搭建)

embedded/2025/3/19 12:24:44/

2025.3.17

无人机Ardupilot开发环境的搭建

1.安装git

sudo apt-get install git

2.登陆官方仓库

https://github.com/ArduPilot/ardupilot

建立工作目录

mkdir fly

下载相关包

git clone -b Copter-4.0.7 https://github.com/ArduPilot/ardupilot.git

创建分支(注意位置)

git checkout -b Copter-4.0.7

查看分支:

git branch

拉下子模块

git submodule update --init --recursive

进入目录:

cd fly/ardupilot/Tools
cd environment_install

运行脚本

./install-prereqs-ubuntu.sh

单独安装失败的包

sudo apt update
sudo apt install python3-pip python3-matplotlib python3-serial python3-scipy python3-opencv python3-empy
sudo apt install python3-opencv
pip3 install empy

测试开发环境

./waf configure --board CubeBlack

如果报错:

/usr/bin/env: ‘python’: No such file or directory

则输入:

sudo apt update
sudo apt install python3 python3-pip
sudo ln -s /usr/bin/python3 /usr/bin/python
./waf configure --board CubeBlack

仍然报错:

y@y:~/fly/ardupilot$ ./waf configure --board CubeBlack
Setting top to                           : /home/y/fly/ardupilot
Setting out to                           : /home/y/fly/ardupilot/build
Autoconfiguration                        : enabled
Setting board to                         : CubeBlack
Using toolchain                          : arm-none-eabi
Could not find the program ['arm-none-eabi-ar']
(complete log in /home/y/fly/ardupilot/build/config.log)

 输入:

sudo apt install gcc-arm-none-eabi
which arm-none-eabi-ar
./waf configure --board CubeBlack

成功

环境编译:

./waf copter

环境搭建完成


http://www.ppmy.cn/embedded/173851.html

相关文章

AI学习第二天--大模型压缩(量化、剪枝、蒸馏、低秩分解)

目录 1. 量化:压缩大象的“脂肪” 比喻 技术逻辑 2. 剪枝:修剪大象的“无效毛发” 比喻 技术逻辑 3. 知识蒸馏:让大象“师从巨象” 比喻 技术逻辑 4. 低秩分解:把大象“折叠成纸偶” 比喻 技术逻辑 5. 推理优化&#…

堆排序:力扣215.数组中的第K个大元素

一、问题描述 在一个整数数组 nums 中,需要找出第 k 个最大的元素。这里要注意,我们要找的是数组排序后的第 k 个最大元素,而不是第 k 个不同的元素。例如,对于数组 [3,2,1,5,6,4],当 k 2 时,第 2 个最大…

LLVM学习-- 构建和安装

一 LLVM版本 二 适用预构建的二进制文件安装LLVM 三 适用包管理器安装LLVM 四 从源码构建用于Linux的LLVM 五 从源码构建用于Windows和Visual Studio的LLVM 六 从源码构建用于MacOS 和XCode的LLVM 1.1 LLVM项目从10年前第一次发布到版本3.4,其SVN存储库包含了超过20…

matlab 火电厂给水控制系统仿真

1、内容简介 略 matlab157-火电厂给水控制系统仿真 可以交流、咨询、答疑 2、内容说明 略 摘 要 虽然现在新能源发电领域比较火爆,但至今火力发电厂依然在我的的发电领域中拥有很重要的地位。我国虽然还是发展中国家,但是近年来GDP的增长已经处于世界…

Android Fresco 框架兼容模块源码深度剖析(六)

Android Fresco 框架兼容模块源码深度剖析 一、引言 在 Android 开发的多元环境中,兼容性是衡量一个框架优劣的重要指标。Fresco 作为一款强大的图片加载框架,其兼容模块在确保框架能在不同 Android 版本、不同设备和不同图片格式下稳定运行方面发挥着…

《TCP/IP网络编程》学习笔记 | Chapter 19:Windows 平台下线程的使用

《TCP/IP网络编程》学习笔记 | Chapter 19:Windows 平台下线程的使用 《TCP/IP网络编程》学习笔记 | Chapter 19:Windows 平台下线程的使用内核对象内核对象的定义内核对象归操作系统所有 基于 Windows 的线程创建进程与线程的关系Windows 中线程的创建方…

第29周 面试题精讲(3)

Java面试题详解 一、请介绍 MyBatis 中二级缓存的一些情况 问题:MyBatis 中二级缓存的作用和使用方法是什么? 答案: 一级缓存:默认开启,数据存储在 SqlSession 的生命周期中,SqlSession 关闭后缓存释放…

hackmyvm-Smol

信息收集 ┌──(root㉿kali)-[/home/kali] └─# arp-scan -I eth1 192.168.56.0/24 Interface: eth1, type: EN10MB, MAC: 00:0c:29:34:da:f5, IPv4: 192.168.56.103 WARNING: Cannot open MAC/Vendor file ieee-oui.txt: Permission denied WARNING: Cannot open MAC/Vendo…