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

OpenIPC开源FPV之Adaptive-Link安装

OpenIPC开源FPV之Adaptive-Link安装

  • 1. 源由
  • 2. 介绍
    • 2.1 天空端安装
    • 2.2 地面端安装
  • 3. 问题汇总
    • 3.1 安装脚本问题
    • 3.2 网络安装问题
    • 3.3 非SSC30KQ/SSC338Q硬件
    • 3.4 代码疑问
  • 4. 总结
  • 5. 后续

1. 源由

鉴于飞行过程,发现一些马赛克现象,且60FPS桌面30FPS的录影有些许卡顿。

  • OpenIPC SSC30KQ IMX335 + Ardupilot 4.5.6 + 梅岭隧道南入口 FPV飞行
  • OpenIPC地面站OSD + Ardupilot 4.5.6 + 梅家坞山坳 FPV飞行

在这里插入图片描述

为了更好的确保FPV飞行质量:

  • 提高图像的清晰度
  • 保证图像流畅性
  • 更好应对穿越场景

引入Adaptive Link势在必行!

2. 介绍

前面,已经简单的介绍了关于OpenIPC Adaptive Link的原理和逻辑:

【1】OpenIPC开源FPV之Adaptive-Link工程解析
【2】OpenIPC开源FPV之Adaptive-Link天空端代码解析
【3】OpenIPC开源FPV之Adaptive-Link地面站代码解析

接下去,我们将进行安装,以便更好的后续在上面的场景上进行验证。

2.1 天空端安装

$ cd /etc
$ curl -L -o alink_install.sh https://raw.githubusercontent.com/sickgreg/OpenIPC-Adaptive-Link/refs/heads/main/alink_install.sh
$ chmod +x alink_install.sh
$ ./alink_install.sh drone install
$ reboot

2.2 地面端安装

$ curl -L -o alink_install.sh https://raw.githubusercontent.com/sickgreg/OpenIPC-Adaptive-Link/refs/heads/main/alink_install.sh
$ sudo chmod +x alink_install.sh
$ sudo ./alink_install.sh gs install

3. 问题汇总

3.1 安装脚本问题

  • Install gs adaptive link failed #14

不过在jetson-fpv中,会通过补丁的方式进行修正,并且所有安装方式都会使用菜单方式进行安装,详见:How to install the jetson-fpv?

3.2 网络安装问题

由于天空端采用了网络安装方式,因此,由于网络问题导致无法安装成功。

建议通过代理,可参考:apt-get通过代理更新系统

3.3 非SSC30KQ/SSC338Q硬件

因为,目前安装方式仅支持上述两个硬件,若需要其他硬件版本,可以参考以下方式自行编译:

  • Build scripts for goke|hi3516|star6b0|star6e|star6c targets on x86 #13

3.4 代码疑问

  • 【OSD】“pnlt%d xtx%ld idr%d” string lost #15
  • 【WiFi】Which is the best profile for the 8812EU currently?
  • 【WiFi】WIP: Add support for RTL8812EU-based Wi-Fi adapters for FPV firmware #1344
  • 【Version】stucked “initializing… 6.3Mb FPS:60 54% tx34c rssi-44, snr15 fec1 pnlt0 xtx0 i” #17
  • 【Version】[Request] Version control of adaptive link
  • 【Version】Build scripts for goke|hi3516|star6b0|star6e|star6c targets on x86
  • 【Version】 add exective attribute to bash files #12

4. 总结

通过实际楼道环境测试显示,H265最低比特率在2.2Mbps,最高在10Mbps左右。

实际情况,待天气好转,现场实测!

注意:目前该链路动态适配正在不断完善和开发,因此,很多情况会发生变化。上述仅供参考,谢谢!欢迎大家留言,指正,谢谢!

5. 后续

鉴于当前官方版本尚未进入版本管控,且在OpenIPC较新固件master+9fbdc40, 2025-02-15版本上无法使用最新的adaptive link

基于这些,我们做了一个兼容的版本,供大家使用,操作步骤如下:

  1. 更新最新的OpenIPC固件(晚于2025-02-15)
  2. 下载代码git clone https://github.com/SnapDragonfly/OpenIPC-Adaptive-Link.git
  3. 检出ssc30kq分支git checkout build_for_ssc30kq
  4. 编译最新版本./build.sh star6e
  5. 使用新构建的二进制alink_drone
  6. BL-M8812EU2 功率表格更新
$ cat /etc/txprofiles.conf
# <ra - nge> <gi> <mcs> <fecK> <fecN> <bitrate> <gop> <Pwr> <roiQP> <bandwidth> <qpDelta>
999 - 999 long 0 12 15 3332 5.0 61 0,0,0,0 20 -12
1000 - 1150 long 0 12 15 3333 5.0 60 0,0,0,0 20 -12
1151 - 1300 long 1 12 15 6667 5.0 59 12,6,6,12 20 -12
1301 - 1700 long 2 12 15 10000 5.0 58 12,6,6,12 20 -12
1701 - 1950 long 3 12 15 12500 5.0 56 8,4,4,8 20 -12
1951 - 2001 short 3 12 15 14000 5.0 56 4,0,0,4 20 -12
  1. 配置更新
$cat /etc/alink.conf
### alink_drone settings ###

### Allow power settings defined in txprofiles.conf
allow_set_power=1

### weights - how much consideration alink_drone puts on gs rssi vs snr
rssi_weight=0.3
snr_weight=0.7

### if gs heartbeat lost for x ms, set link low (fallback)
fallback_ms=1000
# keep link low for min x s
hold_fallback_mode_s=3

### limit time between any link change and the next
min_between_changes_ms=150
# wait x seconds before increasing link speed
hold_modes_down_s=4

### smooth out rssi/snr readings for link increase / decrease
hysteresis_percent=15
hysteresis_percent_down=5
exp_smoothing_factor=0.1
exp_smoothing_factor_down=1.0

### allow lost GS packet to request new keyframe
allow_request_keyframe=1
# allow drone driver-tx_dropped to request new keyframe
allow_rq_kf_by_tx_d=1
# limit time between keyframe requests
request_keyframe_interval_ms=100
# request a keyframe at every link changes
idr_every_change=0

### enable higher quality in center of image
roi_focus_mode=0

### penalise link by this amount per packet above alarm (0 = disabled)
fec_rec_penalty=0
# allow fec below alarm value
fec_rec_alarm=2
# limit penalty to
max_fec_rec_penalty=150
apply_penalty_for_s=1

### attempt to help encoder bitrate spikes by strategically lowering FPS when on high resolutions
allow_spike_fix_fps=0

### Command templates - Don't change these unless you know what you are doing
powerCommand="iw dev wlan0 set txpower fixed %d"
fpsCommandTemplate="echo 'setfps 0 %d' > /proc/mi_modules/mi_sensor/mi_sensor0"
qpDeltaCommand="curl localhost/api/v1/set?video0.qpDelta=%d"
mcsCommand="wfb_tx_cmd 8000 set_radio -B %d -G %s -S 1 -L 1 -M %d"
bitrateCommand="curl -s 'http://localhost/api/v1/set?video0.bitrate=%d'"
gopCommand="curl -s 'http://localhost/api/v1/set?video0.gopSize=%f'"
fecCommand="wfb_tx_cmd 8000 set_fec -k %d -n %d"
roiCommand="curl -s 'http://localhost/api/v1/set?fpv.roiQp=%s'"
idrCommand="curl localhost/request/idr"
customOSD=&L%d0&F%d&B &C tx&Wc
  1. reboot重启OpenIPC

http://www.kler.cn/a/561968.html

相关文章:

  • Python的那些事第三十二篇:用于创建静态、动画和交互式可视化的绘图库Matplotlib
  • 基于 ArcGIS Pro 与 R 的生态系统服务权衡与协同分析
  • DeepSeek掘金——SearpApi联网搜索 给DeepSeek插上翅膀
  • React 前端框架介绍
  • 如何获取zookeeper中的注册内容,在Java项目中演示
  • 2024-2025 学年广东省职业院校技能大赛 “信息安全管理与评估”赛项 技能测试试卷(二)
  • Django笔记1_简介
  • Python深度学习:遥感影像目标识别中的数据标注技巧
  • PC端-发票真伪查验系统-Node.js全国发票查询接口
  • 多模态人物视频驱动技术回顾与业务应用
  • 使用Python爬虫获取京东商品评论API接口的详细指南
  • 推理模型面试核心问题解析:方法与实战应用
  • 【MySQL】:四大排名函数
  • 【DeepSeek系列】05 DeepSeek核心算法改进点总结
  • Android AOSP系统裁记录
  • 算法——后缀树
  • 监控平台技术方案
  • 将 vue3 项目打包后部署在 springboot 项目运行
  • 【利用conda配置管理Python版本和依赖环境】
  • 【线程池】springboot线程池的底层设计原理