Ubuntu安装Ardupilot以及编译SITL

Ubuntu安装Ardupilot以及编译SITL

  1. 安装git
sudo apt update
sudo apt install git
  1. 克隆Ardupilot仓库
git clone https://github.com/ArduPilot/ardupilot.git

*其中会遇到没有权限的问题,则需要登陆github生成一个ssh key
在终端输入ssh-keygen -t rsa -C “github 邮箱地址”,在.ssh文件目录里打开id_rsa.pub复制其内容并登陆github在setting中的ssh and gpg keys添加粘贴即可

(参考:https://blog.csdn.net/W_317/article/details/106518894 )

  1. 安装必要依赖项
sudo apt update
sudo apt install git python-matplotlib python-serial python-wxgtk3.0 python-wxtools python-lxml(或者sudo apt install git python3-matplotlib python3-serial python3-wxgtk4.0 python3-lxml)
sudo apt-get install dropbear
sudo apt-get install samba
sudo nano /etc/samba/smb.conf([home]中的read only改为no)
sudo apt-get install libpcap-dev //用于wifi monitor和injection
sudo apt-get install libsodium-dev  //用于数据加密
sudo apt install python3-dev python3-opencv python3-pip python3-pexpect
  1. 安装MAVProxy:MAVProxy是一个用于无人机通信的控制台地面站,我们将使用它来连接到ArduPilot SITL。
sudo pip install MAVProxy
  1. 安装SITL依赖项:进入Ardupilot目录
cd /ardupilot/Tools/environment_install
./install-prereqs-ubuntu.sh -y
  1. 构建SITL:运行SITL的构建脚本来编译和安装SITL模拟器(建议执行前重启一次系统,部分环境变量不一定加载上,会出现已有该文件但是执行找不到的情况)
cd ardupilot
git submodule update --init --recursive
./waf configure --board sitl
./waf copter
  1. 设置环境变量:为了让MAVProxy知道SITL的位置,需要将PATH环境变量添加到ArduPilot的构建目录中。假设ArduPilot存储库位于~/ardupilot,运行以下命令:
export PATH=$PATH:$HOME/ardupilot/Tools/autotest
  1. 启动SITL
sim_vehicle.py -v ArduCopter --console

(参考:https://blog.csdn.net/lida2003/article/details/129763315?spm=1001.2014.3001.5506
https://blog.csdn.net/lida2003/article/details/129581472
,以总结步骤为准,参考博客会出现问题,总结的步骤整合了chatgpt3.5的回答)

  • 3
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值