首页 最新 热门 推荐

  • 首页
  • 最新
  • 热门
  • 推荐

wfb-ng 开源代码之Jetson Orin安装

  • 25-02-19 16:21
  • 3180
  • 14067
blog.csdn.net

wfb-ng 开源代码之Jetson Orin安装

  • 1. 源由
  • 2. 准备
  • 3. 步骤
    • 3.1 DKMS安装
    • 3.2 RTL8812AU驱动
    • 3.3 确认网卡
    • 3.4 安装地面站
    • 3.5 wfg-ng服务操作
    • 3.6 其他操作
  • 4. 总结
  • 5. 问题:编译错误
  • 6. 参考资料

1. 源由

为了更好的使用Jetson上AI开发环境,通过wfb-ng将穿越机/无人机的视频以及控制链路引入后端分析。

这里将Step by Step简单介绍下wfb-ng开源代码在Jetson Orin的安装过程。

2. 准备

硬件:

  • Jetson Orin 开发板
  • RTL8812AU网卡
  • OpenIPC FPV摄像头

软件:开源,一切都是开源的!!!请预装系统,推荐使用Linux 35.5 + JetPack v5.1.3,目前ROS上开源支持的比较广泛。

  • Linux 35.5 + JetPack v5.1.3@ros-noetic安装
  • Linux 36.3@Jetson Orin Nano之系统安装

3. 步骤

3.1 DKMS安装

$ sudo apt-get install dkms
$ git clone [email protected]:svpcom/rtl8812au.git
$ cd rtl8812au
$ sudo ./dkms-install.sh
  • 1
  • 2
  • 3
  • 4

3.2 RTL8812AU驱动

$ make
$ sudo make install
$ sudo modprobe 88XXau_wfb
  • 1
  • 2
  • 3

插入网卡:

$ sudo dmesg|tail -n 8
[ 1267.101046] usb 1-2.1: new high-speed USB device number 6 using tegra-xusb
[ 1267.207162] usb 1-2.1: config 1 interface 0 altsetting 0 endpoint 0x85 has an invalid bInterval 0, changing to 7
[ 1267.219528] usb 1-2.1: New USB device found, idVendor=0bda, idProduct=881a, bcdDevice= 0.00
[ 1267.219534] usb 1-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1267.219538] usb 1-2.1: Product: 802.11n NIC
[ 1267.219541] usb 1-2.1: Manufacturer: Realtek
[ 1267.219544] usb 1-2.1: SerialNumber: 123456
[ 1271.179209] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

3.3 确认网卡

经检查RTL8812AU网卡实际系统中显示的是wlan1

$ ethtool -i wlan1
driver: rtl88xxau_wfb
version: 5.10.192-tegra
firmware-version:
expansion-rom-version:
bus-info: 1-2.1:1.0
supports-statistics: no
supports-test: no
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: no


$ lsusb
Bus 002 Device 002: ID 0bda:0489 Realtek Semiconductor Corp. 4-Port USB 3.0 Hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 13d3:3549 IMC Networks Bluetooth Radio
Bus 001 Device 005: ID 222a:0001
Bus 001 Device 004: ID 046d:c52e Logitech, Inc. MK260 Wireless Combo Receiver
Bus 001 Device 006: ID 0bda:881a Realtek Semiconductor Corp.
Bus 001 Device 002: ID 0bda:5489 Realtek Semiconductor Corp. 4-Port USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

$ iwconfig
lo        no wireless extensions.

dummy0    no wireless extensions.

eth0      no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:"AutoConnect"  Nickname:""
          Mode:Managed  Frequency:2.412 GHz  Access Point: B8:F8:83:6E:16:9F
          Bit Rate:300 Mb/s   Sensitivity:0/0
          Retry:off   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=81/100  Signal level=68/100  Noise level=0/100
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

l4tbr0    no wireless extensions.

rndis0    no wireless extensions.

usb0      no wireless extensions.

docker0   no wireless extensions.

wlan1     IEEE 802.11  ESSID:off/any
          Mode:Managed  Access Point: Not-Associated   Tx-Power=18 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51

3.4 安装地面站

$ git clone -b stable https://github.com/svpcom/wfb-ng.git
$ cd wfb-ng
$ sudo ./scripts/install_gs.sh wlan1
  • 1
  • 2
  • 3

3.5 wfg-ng服务操作

服务状态:

$ sudo systemctl status wifibroadcast@gs
  • 1

启动服务:

$ sudo systemctl start wifibroadcast@gs
  • 1

停止服务:

$ sudo systemctl stop wifibroadcast@gs
  • 1

使能服务:

$ sudo systemctl enable wifibroadcast@gs
  • 1

去使能服务:

$ sudo systemctl disable wifibroadcast@gs
  • 1

3.6 其他操作

制作秘钥对,其中drone.key部署在天空端,而gs.key部署在地面端。

$ wfb_keygen
  • 1

查看收发包状态:

$ wfb-cli gs
  • 1

4. 总结

在jetson板子上仍然可以使用以下gstreamer命令进行解析RTP视频流:

  • H264
$ gst-launch-1.0 udpsrc port=5600 caps='application/x-rtp' ! rtph264depay ! h264parse disable-passthrough=true config-interval=1 ! nvv4l2decoder ! nvvidconv ! xvimagesink
  • 1
  • H265,详见:H265 pipeline for gstreamer no video issue
$ gst-launch-1.0 udpsrc port=5600 caps='application/x-rtp' ! rtph265depay ! h265parse disable-passthrough=true config-interval=1 ! nvv4l2decoder ! nvvidconv ! xvimagesink

or 
$ gst-launch-1.0 udpsrc port=5600 caps='application/x-rtp,encoding-name=H265,payload=96' ! rtph265depay ! h265parse disable-passthrough=true config-interval=1 ! nvv4l2decoder ! nvvidconv ! xvimagesink
  • 1
  • 2
  • 3
  • 4

在jetson板子上使用video-viewer命令进行解析RTP视频流:

  • H264
$ video-viewer rtp://@:5600 --input-decoder=v4l2 --input-codec=h264
  • 1
  • H265
$ video-viewer rtp://@:5600 --input-decoder=v4l2 --input-codec=h265
  • 1

但是后续的重点是用nvidia的AI程序来进行视频的分析:

  • Linux 36.3 + JetPack v6.0@jetson-inference之视频操作
  • Linux 36.3 + JetPack v6.0@jetson-inference之图像分类
  • Linux 36.3 + JetPack v6.0@jetson-inference之目标检测
  • Linux 36.3 + JetPack v6.0@jetson-inference之语义分割

5. 问题:编译错误

Collecting git+https://github.com/svpcom/stdeb
  Cloning https://github.com/svpcom/stdeb to /tmp/pip-req-build-ycqy88pl
  Running command git clone -q https://github.com/svpcom/stdeb /tmp/pip-req-build-ycqy88pl
  error: RPC failed; curl 28 Failed to connect to github.com port 443: Connection timed out
  fatal: the remote end hung up unexpectedly
ERROR: Command errored out with exit status 128: git clone -q https://github.com/svpcom/stdeb /tmp/pip-req-build-ycqy88pl Check the logs for full command output.
make: *** [Makefile:27: /home/daniel/wfb/wfb-ng/env] Error 1
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
rm -rf deb_dist
$(PATH=/home/daniel/wfb/wfb-ng/env/bin:/home/daniel/wfb/wfb-ng/env/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin which python3) ./setup.py --command-packages=stdeb.command bdist_deb
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: invalid command 'bdist_deb'
make: *** [Makefile:65: deb] Error 1
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
rm -rf deb_dist
/home/daniel/wfb/wfb-ng/env/bin/python ./setup.py --command-packages=stdeb.command bdist_deb
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: invalid command 'bdist_deb'
make: *** [Makefile:50: deb] Error 1
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

编译最新库上版本,出现以上编译错误。其主要原因是虚拟编译环境,网络环境,出错后异常处理等问题导致最终就是出现以上问题。

解决方法挺简单的:rm -rf wfb-ng/env

  • install from latest git code failed with “error: invalid command ‘bdist_deb’” #374

6. 参考资料

【1】Ardupilot & OpenIPC & 基于WFB-NG构架分析和数据链路思考
【2】wfb-ng 开源工程结构&代码框架简明介绍
【3】wfb-ng 开源代码之wfb_tx&wfb_rx
【4】wfb-ng 开源代码之wfb_tx模式更新

注:本文转载自blog.csdn.net的lida2003的文章"https://blog.csdn.net/lida2003/article/details/143145101"。版权归原作者所有,此博客不拥有其著作权,亦不承担相应法律责任。如有侵权,请联系我们删除。
复制链接
复制链接
相关推荐
发表评论
登录后才能发表评论和回复 注册

/ 登录

评论记录:

未查询到任何数据!
回复评论:

分类栏目

后端 (14832) 前端 (14280) 移动开发 (3760) 编程语言 (3851) Java (3904) Python (3298) 人工智能 (10119) AIGC (2810) 大数据 (3499) 数据库 (3945) 数据结构与算法 (3757) 音视频 (2669) 云原生 (3145) 云平台 (2965) 前沿技术 (2993) 开源 (2160) 小程序 (2860) 运维 (2533) 服务器 (2698) 操作系统 (2325) 硬件开发 (2492) 嵌入式 (2955) 微软技术 (2769) 软件工程 (2056) 测试 (2865) 网络空间安全 (2948) 网络与通信 (2797) 用户体验设计 (2592) 学习和成长 (2593) 搜索 (2744) 开发工具 (7108) 游戏 (2829) HarmonyOS (2935) 区块链 (2782) 数学 (3112) 3C硬件 (2759) 资讯 (2909) Android (4709) iOS (1850) 代码人生 (3043) 阅读 (2841)

热门文章

101
推荐
关于我们 隐私政策 免责声明 联系我们
Copyright © 2020-2025 蚁人论坛 (iYenn.com) All Rights Reserved.
Scroll to Top