当前位置: 首页 > news >正文

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

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

环境搭建完成

相关文章:

  • 哈尔滨服务器租用托管流程
  • 【Java/数据结构】ArrayList的实现及使用
  • DeepSeek在学术研究方向初期工作提示词分享
  • linux操作系统3
  • Docker和containerd之概览(Overview of Docker and Containerd)
  • ISE 14.7 IP核 Block Memory Generator 更换coe
  • NoSQL数据库概述
  • 随机变量的不同收敛性
  • C++ 与 Qt 的内存管理机制
  • 逐次逼近型A/D原理
  • HTTP服务器的工作逻辑
  • 味觉传送器E-Taste:开启虚拟世界的味觉之门
  • 紧急通知:某平台泄露充电桩财富公式!5台×120kW=1.3年回本,年利润34.3万!速删前收藏 - 慧知开源充电桩平台
  • 解决Xshell连接出现“SSH服务器拒绝了密码,请再试一次”问题
  • WPF-MVVM计数器
  • 华为供应链的变革模式和方法P105(105页PPT)(文末有下载方式)
  • MySQL中的事务隔离级别有哪些
  • 【MySQL】基础查询
  • xLua_001
  • AIAgent有哪些不错的开源平台
  • 上海天文馆走进徐家汇书院,XR沉浸式天文科普体验再推力作
  • 美国贸易政策|特朗普模式:你想做交易吗?
  • 武康大楼再开发:一栋楼火还不够,要带火街区“朋友圈”
  • 美联储官员:美国经济增速可能放缓,现行关税政策仍将导致物价上涨
  • 幼儿园教师拍打孩子额头,新疆库尔勒教育局:涉事教师已被辞退
  • 既是工具又是食物,可食用机器人开启舌尖上的新科技