Ardupilot开源无人机之Geek SDK进展2024-2025

1. 源由

前期搭建《Ardupilot开源无人机之Geek SDK》,主要目的是:

  1. 基于:《ArduPilot开源飞控系统 - 无人车、船、飞机等》
  2. 验证:《Ardupilot & OpenIPC & 基于WFB-NG构架分析和数据链路思考》可行性
  3. 框架:打通硬实时、软实时的控制面和数据面链路,提供一个简单、多样、高效的验证平台 jetson-fpv

2. 状态

  • 简单示例

  • 框架成型:jetson-fpv

  • 支持特性:

    • FPV features (FPV功能)

      • MSPOSD for ground station (OSD)
      • video-viewer (视频图像,可以达到120FPS)
      • Adaptive wireless link (链路自适应)
    • Jetson video analysis (Jetson推理功能)

      • detectnet for object detection
      • segnet for segmentation
      • posenet for pose estimation
      • imagenet for image recognition
    • yolo for object detection (YOLO目标检测)

    • Real time video stabilizer

    • DeepStream analysis (DeepStream目标跟踪分析)

      • ByteTrack
      • NvDCF tracker
  • 硬件形态
    在这里插入图片描述在这里插入图片描述

3. TODO

优先级

  • 【0101暂定】3.2 onnxruntime版本 > 3.1 跟踪目标框 > 3.5 Inference性能 > 3.6 特定目标集Training > 3.3 CUDA 11.8版本 > 3.4 pytorch v2.5.1版本
  • 【0109变更】3.3 CUDA 11.8版本 > 3.4 pytorch v2.5.1版本 > 3.2 onnxruntime版本 > 3.1 跟踪目标框 > 3.5 Inference性能 > 3.6 特定目标集Training
  • 【0117变更】目前NVIDIA主要支持L4T36.x(ubuntu22.04),对L4T35.x(ubuntu20.04)支持力度日渐转弱,进度很慢(尽管官方论坛说没有停止支持)。将不连续帧跟踪目标框持续OSD输出的问题尽快提上日程。
 └──> 【完成】3.3 CUDA 11.8版本
     │    └──> 【完成】4.1 CUDA 12.3版本
     └──> 【完成】3.4 pytorch v2.5.1版本
          └──> 【进行中】4.2 TensorRT 8.6
              ├──> 【进行中】3.2 onnxruntime版本
              └──> 【进行中】3.1 跟踪目标框
                  └──> 3.5 Inference性能
                      └──> 3.6 特定目标集Training
  • 【0120变更】鉴于目前NVIDIA闭源,虽然尚未宣布Jetpack5的EOL时间,但是实际在版本支持和研发投入上,已经明显出现乏力(详见:7.3)!而目前来说Super版本似乎从性能上是一个改观,为此我们后续将投入BSP6.2版本,顺便调整优先级,废弃一些闭源升级问题带来的折腾。
 ├──> 【暂停】【任务支线一:升级基础组件版本】
 │   └──> 【完成】3.3 CUDA 11.8版本
 │       │    └──> 【完成】4.1 CUDA 12.3版本
 │       └──> 【完成】3.4 pytorch v2.5.1版本
 │            └──> 【暂停】4.2 TensorRT 8.6
 │                └──> 【暂停】3.2 onnxruntime版本
 └──> 【完成】【任务支线二:升级系统Jetson Orin Nano Super,安装jetson-fpv】
     └──> 【完成】4.3 Jetpack6.2(Jetson Orin Nano Super)
         └──> 【完成】4.4 pytorch + torchvision安装(Jetson Orin Nano Super)
             └──> 【完成】4.5 dsyolo/nvdsinfer/byteTrack安装(Jetson Orin Nano Super)
                 └──> 【完成】4.6 wfb-ng网卡自动侦测
  • 【0128变更】中国年,更新下进展,将升级Super系统,安装脚本任务完成,新开任务。
 └──> 【完成】【任务支线四:采用隔帧提升性能】
         └──> 【完成】3.1 跟踪目标框
             └──> 【完成】3.5 Inference性能
  • 【0208变更】过年期间,进展更新。
 └──> 【完成】【任务支线三:调试每个模块,确保正常工作】
     └──> 【阻塞】4.7 jetson-fpv模块测试(Jetpack6.2)
  • 【0215更新】Jetpack6.2存在很多问题,且开源最新的大部分停留在Jetpack5.x/Jetpack6.1
 └──> 【完成】【任务支线六:调试每个模块,确保正常工作】
      └──> 【完成】4.8 jetson-fpv模块测试(Jetpack6.1)

3.1 【完成】跟踪目标框

已解决NvDCF算法plugin下bbox连续性问题,详见:deepstream: add tiler to fix bbox issue。该版本Tracking bbox在DS7.1/Jetpack6.2上确实是连续的。据反馈6.3/7.1使用NvDCF应该都是连续的。

注:因为NVIDIA的软件栈有较多版本组合,稍有差异可能会出现各种异常问题。关于版本集成测试方面,需要大量的组合测试,耗时费力,不过这个是作为软件公司,产品开发必须过的一关。

3.2 【暂停】onnxruntime版本

通过上面的问题沟通,逐步锁定源头和原因:ARCH对bf16的硬件支持 vs gcc版本问题。

基于Jetpack5.1.4升级gcc11版本
升级CUDA版本11.4.315 到11.8.89
提升3.3 CUDA 11.8任务优先级
需要考虑OpenCV对CUDA的版本依赖问题

3.3 【完成】CUDA 11.8版本

目前,了解到支持的版本状况:CUDA Toolkit Archive

  • Ubuntu 20.04 支持到 CUDA 12.3 (同时支持Ubuntu 22.04)
  • 从CUDA 12.4开始仅支持Ubuntu 22.04

安装deb文件

$ wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/arm64/cuda-ubuntu2004.pin
$ sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
$ wget https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda-tegra-repo-ubuntu2004-11-8-local_11.8.0-1_arm64.deb
$ sudo dpkg -i cuda-tegra-repo-ubuntu2004-11-8-local_11.8.0-1_arm64.deb

复制CUDA密钥

$ sudo cp /var/cuda-tegra-repo-ubuntu2004-11-8-local/cuda-*-keyring.gpg /usr/share/keyrings/

//more specific
$ sudo cp /var/cuda-tegra-repo-ubuntu2004-11-8-local/cuda-tegra-95320BC3-keyring.gpg /usr/share/keyrings/

安装cuda及其依赖组件

$ sudo apt-get update
$ sudo apt-get -y install cuda

3.4 【完成】pytorch v2.5.1版本 - Jetpack5

pytorch 2.5.1 编译

$ cat ./build.sh
#!/bin/bash

# git clone https://github.com/SnapDragonfly/pytorch.git
# git checkout nvidia_v2.5.1
# git submodule update --init --recursive

export USE_NCCL=0
export USE_DISTRIBUTED=0
export USE_QNNPACK=0
export USE_PYTORCH_QNNPACK=0
export TORCH_CUDA_ARCH_LIST="8.7"
export PYTORCH_BUILD_VERSION=2.5.1
export PYTORCH_BUILD_NUMBER=1
export L4T_BUILD_VERSION=35.6
export USE_PRIORITIZED_TEXT_FOR_LD=1
export USE_FLASH_ATTENTION=0
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH

python3 setup.py bdist_wheel

pytorch 2.5.1 二进制安装

$ wget https://github.com/SnapDragonfly/pytorch/releases/download/v2.5.1%2Bl4t35.6-cp38-cp38-aarch64/torch-2.5.1+l4t35.6-cp38-cp38-linux_aarch64.whl
$ sudo pip3 install torch-2.5.1+l4t35.6-cp38-cp38-linux_aarch64.whl

torchvision安装

$ git clone https://github.com/SnapDragonfly/vision.git torchvision
$ cd torchvision
$ git checkout nvidia_v0.20.1
$ export BUILD_VERSION=0.20.1
$ sudo python3 setup.py install --user
$ cd ..

升级JetPack5.1.4 L4T35.6后的版本信息

Software part of jetson-stats 4.2.12 - (c) 2024, Raffaello Bonghi
Model: NVIDIA Orin Nano Developer Kit - Jetpack 5.1.4 [L4T 35.6.0]
NV Power Mode[0]: 15W
Serial Number: [XXX Show with: jetson_release -s XXX]
Hardware:
 - P-Number: p3767-0005
 - Module: NVIDIA Jetson Orin Nano (Developer kit)
Platform:
 - Distribution: Ubuntu 20.04 focal
 - Release: 5.10.216-tegra
jtop:
 - Version: 4.2.12
 - Service: Active
Libraries:
 - CUDA: 11.8.89
 - cuDNN: 8.6.0.166
 - TensorRT: 8.5.2.2
 - VPI: 2.4.8
 - Vulkan: 1.3.204
 - OpenCV: 4.9.0 - with CUDA: YES
DeepStream C/C++ SDK version: 6.3

Python Environment:
Python 3.8.10
    GStreamer:                   YES (1.16.3)
  NVIDIA CUDA:                   YES (ver 11.4, CUFFT CUBLAS FAST_MATH)
        OpenCV version: 4.9.0  CUDA True
          YOLO version: 8.3.33
         Torch version: 2.5.1+l4t35.6
   Torchvision version: 0.20.1a0+3ac97aa
DeepStream SDK version: 1.1.8

3.5 【完成】Inference性能

DS7.1 Demo默认是INT8,且性能应该也较之前提升到67TB,1080P@60FPS无压力。

A: DeepStream-Yolo - INT8 calibration (PTQ)
B: NVIDIA - NvDCF tracker plugin

3.6 【遗留】特定目标集Training

4. Extra-Work

4.1 【完成】CUDA 12.3版本

在CUDA 11.8基础上遇到了 Build onnxruntime 1.19.2 fail due to API HardwareCompatibilityLevel问题,貌似API版本不兼容,那么就升到最高支持的12.3尝试下。

For JetPack 5, only CUDA is upgradable but up to v12.2,而这里12.3 貌似升级了一个不正确的版本,请特别注意!!!

$ wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/sbsa/cuda-ubuntu2004.pin
$ sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
$ wget https://developer.download.nvidia.com/compute/cuda/12.3.2/local_installers/cuda-repo-ubuntu2004-12-3-local_12.3.2-545.23.08-1_arm64.deb
$ sudo dpkg -i cuda-repo-ubuntu2004-12-3-local_12.3.2-545.23.08-1_arm64.deb
$ sudo cp /var/cuda-repo-ubuntu2004-12-3-local/cuda-5B67C214-keyring.gpg /usr/share/keyrings/
$ sudo apt-get update
$ sudo apt-get -y install cuda-toolkit-12-3
  • 版本信息
Software part of jetson-stats 4.2.12 - (c) 2024, Raffaello Bonghi
Model: NVIDIA Orin Nano Developer Kit - Jetpack 5.1.4 [L4T 35.6.0]
NV Power Mode[0]: 15W
Serial Number: [XXX Show with: jetson_release -s XXX]
Hardware:
 - P-Number: p3767-0005
 - Module: NVIDIA Jetson Orin Nano (Developer kit)
Platform:
 - Distribution: Ubuntu 20.04 focal
 - Release: 5.10.216-tegra
jtop:
 - Version: 4.2.12
 - Service: Active
Libraries:
 - CUDA: 12.3.107
 - cuDNN: 8.6.0.166
 - TensorRT: 8.5.2.2
 - VPI: 2.4.8
 - Vulkan: 1.3.204
 - OpenCV: 4.9.0 - with CUDA: YES
DeepStream C/C++ SDK version: 6.3

Python Environment:
Python 3.8.10
    GStreamer:                   YES (1.16.3)
  NVIDIA CUDA:                   YES (ver 11.4, CUFFT CUBLAS FAST_MATH)
         OpenCV version: 4.9.0  CUDA True
           YOLO version: 8.3.33
         PYCUDA version: 2024.1.2
          Torch version: 2.5.1+l4t35.6
    Torchvision version: 0.20.1a0+3ac97aa
 DeepStream SDK version: 1.1.8
onnxruntime     version: 1.16.3
onnxruntime-gpu version: 1.18.0

4.2 【暂停】TensorRT 8.6

For JetPack 5, only CUDA is upgradable but up to v12.2.
For JetPack 6, CUDA/cuDNN/TensorRT are upgradable.

4.3 【完成】Jetpack6.2(Jetson Orin Nano Super)

参考:
【1】Linux 36.3@Jetson Orin Nano之系统安装
【2】Jetson Orin Nano Archive系统版本
【3】Linux 36.2@Jetson Orin Nano之基础环境构建

4.3.1 安装系统

  1. 下载Jetpack6.2
  2. 安装Linux36.4.3 - Jetson Linux Developer Guide (online version)
  3. 准备安装环境
$ wget https://developer.nvidia.com/downloads/embedded/l4t/r36_release_v4.3/release/Jetson_Linux_r36.4.3_aarch64.tbz2
$ wget https://developer.nvidia.com/downloads/embedded/l4t/r36_release_v4.3/release/Tegra_Linux_Sample-Root-Filesystem_r36.4.3_aarch64.tbz2
$ tar xf Jetson_Linux_r36.4.3_aarch64.tbz2
$ sudo tar xpf Tegra_Linux_Sample-Root-Filesystem_r36.4.3_aarch64.tbz2 -C Linux_for_Tegra/rootfs/
$ cd Linux_for_Tegra/
$ sudo ./tools/l4t_flash_prerequisites.sh
$ sudo ./apply_binaries.sh
  1. 调整IPV6环境
$ sudo vi /etc/sysctl.conf

or
$ sudo sysctl net.ipv6.conf.all.disable_ipv6=0
$ sudo sysctl net.ipv6.conf.default.disable_ipv6=0
  1. 烧录固件(烧录模式)
$ sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 \
  -c tools/kernel_flash/flash_l4t_t234_nvme.xml -p "-c bootloader/generic/cfg/flash_t234_qspi.xml" \
  --showlogs --network usb0 jetson-orin-nano-devkit internal
  1. 接上显示器、键盘、鼠标

启动Jetson Orin Nano,按照桌面提示设置系统,更新系统:

$ sudo apt-get update
$ sudo apt-get upgrade

4.3.2 调整sudo继承环境变量

sudo 环境保持与用户环境一致

$ sudo visudo

!!!继承所有环境变量(注意安全风险),修改为以下内容!!!

Defaults    !env_reset

4.3.3 隐藏bar菜单栏

点击进入【Settings】-》【Appearance】-》【Auto-hide the Dock】,隐藏Dock

在这里插入图片描述

4.3.4 去掉Panel节省像素

在这里插入图片描述

$ mkdir just-perfection-desktop@just-perfection
$ cd just-perfection-desktop@just-perfection
$ unzip just-perfection-desktopjust-perfection.v26.shell-extension.zip
$ cd ..
$ mv just-perfection-desktop@just-perfection ~/.local/share/gnome-shell/extensions/

重启GNOME

$ gnome-shell --replace &

或者按 Alt + F2,输入 r,然后回车。

查看是否安装成功,并启用

$ gnome-extensions list | grep just-perfection
$ gnome-extensions enable just-perfection-desktop@just-perfection
$ gnome-extensions info just-perfection-desktop@just-perfection
just-perfection-desktop@just-perfection
  Name: Just Perfection
  Description: Tweak Tool to Customize GNOME Shell, Change the Behavior and Disable UI Elements
  Path: /home/daniel/.local/share/gnome-shell/extensions/just-perfection-desktop@just-perfection
  URL: https://gitlab.gnome.org/jrahmatzadeh/just-perfection
  Version: 26
  State: ENABLED

在这里插入图片描述

4.3.5 视频界面去掉title bar节省像素

在这里插入图片描述
解压GNOME插件

$ mkdir pixel-saverdeadalnix.me
$ mv pixel-saverdeadalnix.me.v29.shell-extension.zip pixel-saverdeadalnix.me
$ cd pixel-saverdeadalnix.me/
$ unzip pixel-saverdeadalnix.me.v29.shell-extension.zip
$ ls
app_menu.js  buttons.js  decoration.js  extension.js  metadata.json  pixel-saverdeadalnix.me.v29.shell-extension.zip  themes  util.js
$ cat metadata.json
{
  "_generated": "Generated by SweetTooth, do not edit",
  "description": "Pixel Saver is designed to save pixel by fusing activity bar and title bar in a natural way",
  "name": "Pixel Saver",
  "shell-version": [
    "3.34",
    "3.36",
    "3.38",
    "40",
    "41",
    "42",
    "43",
    "44"
  ],
  "url": "https://github.com/deadalnix/pixel-saver",
  "uuid": "pixel-saver@deadalnix.me",
  "version": 29
}
$ cd ..
$ mv pixel-saverdeadalnix.me/ pixel-saver@deadalnix.me
$ mv pixel-saver@deadalnix.me/ ~/.local/share/gnome-shell/extensions/

重启GNOME

$ gnome-shell --replace &

或者按 Alt + F2,输入 r,然后回车。

使能插件

$ gnome-extensions list
pixel-saver@deadalnix.me
just-perfection-desktop@just-perfection
apps-menu@gnome-shell-extensions.gcampax.github.com
auto-move-windows@gnome-shell-extensions.gcampax.github.com
drive-menu@gnome-shell-extensions.gcampax.github.com
launch-new-instance@gnome-shell-extensions.gcampax.github.com
native-window-placement@gnome-shell-extensions.gcampax.github.com
places-menu@gnome-shell-extensions.gcampax.github.com
screenshot-window-sizer@gnome-shell-extensions.gcampax.github.com
user-theme@gnome-shell-extensions.gcampax.github.com
window-list@gnome-shell-extensions.gcampax.github.com
windowsNavigator@gnome-shell-extensions.gcampax.github.com
workspace-indicator@gnome-shell-extensions.gcampax.github.com
ubuntu-dock@ubuntu.com
ubuntu-appindicators@ubuntu.com
ding@rastersoft.com
$ gnome-extensions enable pixel-saver@deadalnix.me
$ gnome-extensions info pixel-saver@deadalnix.me
pixel-saver@deadalnix.me
  Name: Pixel Saver
  Description: Pixel Saver is designed to save pixel by fusing activity bar and title bar in a natural way
  Path: /home/daniel/.local/share/gnome-shell/extensions/pixel-saver@deadalnix.me
  URL: https://github.com/deadalnix/pixel-saver
  Version: 29
  State: ENABLED

在这里插入图片描述

4.3.6 jetson-inference打补丁

使用链接中的补丁:Segnet/poseNet Segmentation fault (core dumped) for Jetpack6.2

$ git log -n 1
commit c038530ebf718e6867c4458c3e439406020732ff (HEAD -> master, origin/master, origin/HEAD)
Author: Dustin Franklin <dustinf@nvidia.com>
Date:   Wed Oct 16 06:56:03 2024 -0400

    updates for TRT10
$ git apply ../../patch/jetson-inference.1925.patch

4.3.7 其他问题汇总

  • 问题A:[Done] nvautoflash不支持刷系统,仅支持刷bootloader - Nvautoflash r36.4.3 jetpack6.2 stucked
  • 问题B:Error writing to /home/daniel/.config/Ultralytics/settings.json: [Errno 13] Permission denied: '/home/daniel/.config/Ultralytics/settings.json'
$ sudo chown -R daniel:daniel /home/daniel/.config/Ultralytics
$ sudo chmod -R u+w /home/daniel/.config/Ultralytics 
  • 装完后的界面应该能够提供jetson-fpv类似全屏效果:

在这里插入图片描述

4.4 【完成】pytorch + torchvision安装(Jetson Orin Nano Super)

参考:Jetson Orin Nano Super之pytorch + torchvision安装

Software part of jetson-stats 4.3.1 - (c) 2024, Raffaello Bonghi
Model: NVIDIA Jetson Orin Nano Developer Kit - Jetpack 6.2 [L4T 36.4.3]
NV Power Mode[0]: 15W
Serial Number: [XXX Show with: jetson_release -s XXX]
Hardware:
 - P-Number: p3767-0005
 - Module: NVIDIA Jetson Orin Nano (Developer kit)
Platform:
 - Distribution: Ubuntu 22.04 Jammy Jellyfish
 - Release: 5.15.148-tegra
jtop:
 - Version: 4.3.1
 - Service: Active
Libraries:
 - CUDA: 12.6.68
 - cuDNN: 9.3.0.75
 - TensorRT: 10.3.0.30
 - VPI: 3.2.4
 - Vulkan: 1.3.204
 - OpenCV: 4.11.0 - with CUDA: YES
DeepStream C/C++ SDK version: 7.1

Python Environment:
Python 3.10.12
    GStreamer:                   YES (1.20.3)
  NVIDIA CUDA:                   YES (ver 12.6, CUFFT CUBLAS FAST_MATH)
         OpenCV version: 4.11.0  CUDA True
           YOLO version: 8.3.65
         PYCUDA version: 2024.1.2
          Torch version: 2.5.1+l4t36.4
    Torchvision version: 0.20.0a0+afc54f7
 DeepStream SDK version: 1.2.0
onnxruntime-gpu version: 1.19.2

4.5 【完成】dsyolo/nvdsinfer/byteTrack安装(Jetson Orin Nano Super)

  • jetson-yolo(deepstream-app)
  • libByteTracker.so
  • libnvdsinfer_custom_impl_Yolo.so

问题:

4.6 【完成】wfb-ng网卡自动侦测

4.7 【阻塞】jetson-fpv模块测试(Jetpack6.2)

阻塞原因:JP6.2版本兼容性问题:Different behavior (NOT good) of yolov11n on Jetson Orin Nano Super #19134
Jetpack属于闭源软件,其版本从目前看来,会导致稳定性。但是对于非开源类软件,着实没有其他更好的方法。

  • 测试环境
$ sudo ./wrapper.sh version
[sudo] password for daniel:

Software part of jetson-stats 4.3.1 - (c) 2024, Raffaello Bonghi
Model: NVIDIA Jetson Orin Nano Developer Kit - Jetpack 6.2 [L4T 36.4.3]
NV Power Mode[0]: 15W
Serial Number: [XXX Show with: jetson_release -s XXX]
Hardware:
 - P-Number: p3767-0005
 - Module: NVIDIA Jetson Orin Nano (Developer kit)
Platform:
 - Distribution: Ubuntu 22.04 Jammy Jellyfish
 - Release: 5.15.148-tegra
jtop:
 - Version: 4.3.1
 - Service: Active
Libraries:
 - CUDA: 12.6.68
 - cuDNN: 9.3.0.75
 - TensorRT: 10.3.0.30
 - VPI: 3.2.4
 - OpenCV: 4.11.0 - with CUDA: YES
DeepStream C/C++ SDK version: 7.1

Python Environment:
Python 3.10.12
    GStreamer:                   YES (1.20.3)
  NVIDIA CUDA:                   YES (ver 12.6, CUFFT CUBLAS FAST_MATH)
         OpenCV version: 4.11.0  CUDA True
           YOLO version: 8.3.68
         PYCUDA version: 2024.1.2
          Torch version: 2.5.0a0+872d972e41.nv24.08
    Torchvision version: 0.20.0a0+afc54f7
 DeepStream SDK version: 1.2.0
onnxruntime     version: 1.20.1
onnxruntime-gpu version: 1.20.0

FPV Environment:
jetson-fpv Version: f52227a
    MSPOSD version: c28d645 20250205_151537
  • 测试内容:
$ sudo ./wrapper.sh help
Invalid module: help
Usage: ./wrapper.sh <module_name> {start|restart|ostart|orestart|stop|status|help|<other_command>} [additional_arguments]

Commands:
  start           Start a module
  restart         Restart a module
  ostart          Start a module without msposd
  orestart        Restart a module without msposd
  stop            Stop a module
  status          Check the status of a module
  help            Display this help message
  <other_command> Pass any other command directly to the module script, such as test etc.

Available modules
  Special modules: version wfb
     Base modules: viewer pyviewer gstreamer
 Extended modules: imagenet detectnet segnet posenet stabilizer yolo deepstream dsyolo dstrack

    Version Module: Check depended component versions.
        Wfb Module: Wifibroadcast transmission module.
     Viewer Module: Use video-viewer to handle video stream.
   pyViewer Module: Use python jetson_utils to handle video stream.
  GStreamer Module: GST pipelines to process audio and video, offering flexible, plugin-based support for playback, streaming, and media transformation.
   Imagenet Module: Image classification using Imagenet model.
  Detectnet Module: Object detection using DetectNet.
     Segnet Module: Image segmentation using SegNet.
    Posenet Module: Pose estimation using PoseNet.
 Stabilizer Module: Stabilizes the camera or system.
       Yolo Module: Real-time object detection using YOLO.
 Deepstream Module: Framework from NVIDIA that enables video analytics and AI processing, using hardware-accelerated inference for deep learning models in real-time.
 Deepstream + YOLO: DeepStream integrates YOLO for real-time object detection and tracking.
 Deepstream  Track: DeepStream with it's integrated tracking plugin.
  • 模拟RTP视频源

H264视频源

$ video-viewer file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4 rtp://@:5600 --input-loop=-1 --headless

验证H264视频源

$ video-viewer --input-codec=h264 rtp://@:5600
or

分析H264视频源

$ python3 ./utils/yolo.py rtp://@:5600
or
$ python3 ./utils/deepstream/deepstream_NvDCF.py -s -i rtp://@:5600
or 
$ python3 ./utils/deepstream/deepstream.py -s -i rtp://@:5600
or ... ...
  • 验证进度
 ├──> [✓] version
 ├──> [✓] wfb
 ├──> [✓] viewer
 ├──> [✓] pyviewer
 ├──> [✓] gstreamer
 ├──> [x] stabilizer // Not supported yet
 ├──> [inference]
 │   ├──> [x] imagenet // Not supported, due to caffee model not supported
 │   ├──> [x] detectnet // Not supported, due to caffee model not supported
 │   ├──> [✓] segnet
 │   └──> [✓] posenet
 ├──> [ ] yolo // Under Test
 ├──> [deepstream]
 │   ├──> [✓] deepstream 
 │   └──> [✓] nvdcf
 └──> [x] dsyolo // Not supported, due to deepstream-app code can't handling RTP streaming source

遇到问题

4.8 【完成】jetson-fpv模块测试(Jetpack6.1)

当然,开源在于舍不舍得投入时间,资源。闭源的问题在于金钱。

鉴于4.7的问题,还是得开一个新的基于Jetpack6.1的任务(至少在Jetpack6.2尚未完全稳定之前是这样)。

 ├──> [✓] version
 ├──> [✓] wfb
 ├──> [✓] viewer
 ├──> [✓] pyviewer
 ├──> [✓] gstreamer
 ├──> [x] stabilizer // Not supported yet
 ├──> [inference]
 │   ├──> [x] imagenet // Not supported, due to caffee model not supported
 │   ├──> [x] detectnet // Not supported, due to caffee model not supported
 │   ├──> [✓] segnet
 │   └──> [✓] posenet
 ├──> [ ] yolo // Under Test
 ├──> [deepstream]
 │   ├──> [✓] deepstream 
 │   └──> [✓] nvdcf 
 └──> [x] dsyolo // Not supported, due to deepstream-app code can't handling RTP streaming source
  • 版本
Software part of jetson-stats 4.3.1 - (c) 2024, Raffaello Bonghi
Model: NVIDIA Jetson Orin Nano Developer Kit - Jetpack 6.1 [L4T 36.4.0]
NV Power Mode[0]: 15W
Serial Number: [XXX Show with: jetson_release -s XXX]
Hardware:
 - P-Number: p3767-0005
 - Module: NVIDIA Jetson Orin Nano (Developer kit)
Platform:
 - Distribution: Ubuntu 22.04 Jammy Jellyfish
 - Release: 5.15.148-tegra
jtop:
 - Version: 4.3.1
 - Service: Active
Libraries:
 - CUDA: 12.6.68
 - cuDNN: 9.3.0.75
 - TensorRT: 10.3.0.30
 - VPI: 3.2.4
 - OpenCV: 4.11.0 - with CUDA: YES

--------------------------------
NVIDIA SDK:
DeepStream C/C++ SDK version: 7.1
    jetson-inference version: c038530 (dirty)
        jetson-utils version: 6d5471c

--------------------------------
Python Environment:
Python 3.10.12
    GStreamer:                   YES (1.20.3)
  NVIDIA CUDA:                   YES (ver 12.6, CUFFT CUBLAS FAST_MATH)
         OpenCV version: 4.11.0  CUDA True
           YOLO version: 8.3.75
         PYCUDA version: 2024.1.2
          Torch version: 2.5.0a0+872d972e41.nv24.08
    Torchvision version: 0.20.0a0+afc54f7
 DeepStream SDK version: 1.2.0
onnxruntime     version: 1.20.1
onnxruntime-gpu version: 1.20.0

--------------------------------
FPV Environment:
jetson-fpv version: 00061bc dirty
    WFB-ng version: 25.1.25.81795
    MSPOSD version: c28d645 20250217_163159

4.8.1 安装系统

$ wget https://developer.nvidia.com/downloads/embedded/l4t/r36_release_v4.0/release/Jetson_Linux_R36.4.0_aarch64.tbz2
$ wget https://developer.nvidia.com/downloads/embedded/l4t/r36_release_v4.0/release/Tegra_Linux_Sample-Root-Filesystem_R36.4.0_aarch64.tbz2
$ tar xf Jetson_Linux_R36.4.0_aarch64.tbz2
$ sudo tar xpf Tegra_Linux_Sample-Root-Filesystem_R36.4.0_aarch64.tbz2 -C Linux_for_Tegra/rootfs/
$ cd Linux_for_Tegra/
$ sudo ./apply_binaries.sh
$ sudo ./tools/l4t_flash_prerequisites.sh
$ sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 \
  -c tools/kernel_flash/flash_l4t_t234_nvme.xml -p "-c bootloader/generic/cfg/flash_t234_qspi.xml" \
  --showlogs --network usb0 jetson-orin-nano-devkit internal

4.8.2 环境优化

$ sudo apt-get install deepstream-7.1

4.8.3 yolo INT8 + coco8 dataset精度问题

鉴于NVIDIA L4T36.4.0(JP6.1) --> L4T36.4.3(JP6.2)直接一个apt-get upgrade就升上去了,而目前的问题是JP6.2有BUG,UBUNTU软件包升级通常采用apt-get upgrade,导致很多UBUNTU上的软件升级脚本会触发JP6.1升级,非常不便于维护。

若要验证,需要非常小心的手工安装!scripts: fix installation scripts for JP6.1/JP6.2 已经避开上述upgrade问题,并针对一些patch做了自动补丁。

最终rootcause是“However, for INT8. you will loose bounding boxes because by default, our export command is using coco8 dataset as the calibration dataset.”

5. 同步工作

5.1 需求

TBD:

5.2 试飞

5.3 问题

6. 遗留问题

【0218更新】JP6.1完成基本验证,整个JP版本切换基本清晰JP5.1.3/JP6.1/JP6.2

  1. “任务支线五:采用特定训练集训练定制识别” 将在后续其他章节讨论。
 └──> 【进行中】【任务支线五:采用特定训练集训练定制识别】
     └──> 【进行中】3.6 特定目标集Training
  1. wfb-ng fec_r/lost/d_err on OSD
  1. OpenIPC/pyosd
  2. svpcom/wfb-ng-osd
  1. 原始视频记录,不管何种方式,都需要录制两份视频:桌面视频+原始视频
  2. 【验证】[Request] OSD info save as sperate files, not in DVR #35
  3. 【验证】Can’t launch msposd on Groud stattion NVR Hi3536dv100 #18

2024过年基本工作结束,后续相关问题会在其他进展中探讨!!!感谢大家支持和理解!

7. 参考资料

【1】Ardupilot & OpenIPC & 基于WFB-NG构架分析和数据链路思考
【2】ArduPilot开源飞控之MAVProxy深入研读系列 - 2蜂群链路
【3】Ardupilot开源飞控之FollowMe计划
【4】Ardupilot开源飞控之FollowMe验证平台搭建
【5】Ardupilot开源无人机之Geek SDK讨论
【6】OpenIPC开源FPV之工程框架
【7】OpenIPC开源FPV之重要源码启动配置
【8】wfb-ng 开源代码之Jetson Orin安装
【9】wfb-ng 开源代码之Jetson Orin问题定位
【10】Linux 35.5 + JetPack v5.1.3@CUDA安装和版本切换
【11】Linux 35.6 + JetPack v5.1.4@yolo安装
【12】Linux 35.6 + JetPack v5.1.4@python opencv安装
【13】Linux 35.6 + JetPack v5.1.4@DeepStream安装
【14】Linux 35.6 + JetPack v5.1.4之RTP实时视频Python框架
【15】Linux 35.6 + JetPack v5.1.4之 pytorch编译
【16】Linux 35.6 + JetPack v5.1.4之 pytorch升级
【17】OpenIPC开源FPV之Adaptive-Link工程解析
【18】NVIDIA DeepStream插件之Gst-nvtracker
【19】Linux 36.3@Jetson Orin Nano之系统安装
【20】Linux 36.2@Jetson Orin Nano之基础环境构建
【21】Jetson Orin Nano Super之pytorch + torchvision安装
【22】Jetson Orin Nano Super之jetson-fpv开源代码下载
【23】Jetson Orin Nano Super之 onnxruntime 编译安装

8. 问题

8.1 风扇启动全速噪音问题

8.2 Jetson Orin Nano Super性能升级

Jetson Orin Nano Super DevKit硬件上稍有差异,但是Jetson Orin Nano只要BSP升级到Jetpack6.2 就具备了67 TOPS性能

在这里插入图片描述

8.3 Jetpack5 TensorRT 8.5不可升级版

鉴于目前NVIDIA反馈在Jetpack5.1.4上TensorRT仅支持到8.5版本,但是从TensorRT 版本发布上看,确实也能看到8.6GA版本【怀疑存在诸多未言明问题】。

虽然,开源也有不少问题,但是随着我们的投入,逐步解决了开源系统的升级编译,但是对于闭源系统,确实非常无奈!

8.4 Ardupilot RTL(Return To Land) 高度

  • RTL_ALT

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值