背景
随着人们生活水平的提高,人们越来越追求精神上的满足感,观看无人机表演随着无人机技术的成熟越来越成为人们追求的一种精神上的享受,为了加快表演技术的成熟,本博客开始连载开源无人机表演相关技术点,一来作为总结之用,二来进行推动整个行业的发展。
本章基于开源飞控Ardupilot,逐步介绍开源无人机飞控仿真系统的搭建。
仿真界面
第一步 在Git上下载源码
$ git clone https://github.com/skybrush-io/ardupilot
$ cd ardupilot
$ git checkout CMCopter-4.2
$ git submodule update --init --recursive
第二步 在linux上搭建仿真环境
$ python3 -m venv .venv
$ source .venv/bin/activate
$ pip install -U pip wheel
$ pip install future empy intelhex pexpect
第三步 下载集群仿真程序
$ git clone https://github.com/skybrush-io/ap-swarm-launcher
$ cd ap-swarm-launcher
$ poetry install
第四步 启动仿真测试
poetry run ap-sitl-swarm -n 9 …/ardupilot/build/sitl/bin/arducopter
第五步 进行仿真测试
$ cd ap-swarm-launcher
$ poetry run ap-sitl-swarm -n 20 --num-drones-per-row 5 --spacing 5
–pos-noise 0.5 --yaw-noise 10 …/ardupilot/build/sitl/bin/arducopter
加载仿真数据