QGroundControl@Jetson Orin Nano - 从代码编译安装

news2024/11/24 0:52:33

QGroundControl@Jetson Orin Nano - Build from Source

  • 1. 源由
  • 2. 步骤
    • 2.1 QT 编译
      • 2.1.1 下载
      • 2.1.2 版本
      • 2.1.3 初始化
      • 2.1.4 配置
      • 2.1.5 编译
      • 2.1.6 安装
    • 2.2 QGC 编译
      • 2.2.1 下载
      • 2.2.2 版本
      • 2.2.3 初始化
      • 2.2.4 配置
      • 2.2.5 编译
      • 2.2.6 安装
      • 2.2.7 QT5命令备注
  • 3. 可行方案
  • 4. 总结
  • 5. 补充 - 问题清单
    • 5.1 cmake配置命令错误
    • 5.2 qtconnectivity5-dev库问题
    • 5.3 libqt5charts5-dev库问题
    • 5.4 qtlocation5-dev库问题
    • 5.5 qtpositioning5-dev库问题
    • 5.6 qtmultimedia5-dev库问题
    • 5.7 qtquickcontrols2-5-dev库问题
    • 5.8 libqt5svg5-dev库问题
    • 5.9 libqt5texttospeech5-dev库问题
    • 5.10 libqt5serialport5-dev库问题
    • 5.11 libqt5x11extras5-dev库问题
    • 5.12 cmake版本问题
    • 5.13 修改CMakeList.txt

1. 源由

先说结论:直接从QGroundControl代码在Jetson Orin Nano板子上编译不成功!

按照以下文档中的步骤和方法进行编译,最后卡在:

  1. Getting Started with Source and Builds
  2. Building Qt 6 from Git
/home/daniel/QGC/qgroundcontrol/libs/qmlglsink/qt6/gstqt6glutility.cc: In function ‘GstGLDisplay* gst_qml6_get_gl_display(gboolean)’:
/home/daniel/QGC/qgroundcontrol/libs/qmlglsink/qt6/gstqt6glutility.cc:94:62: error: ‘QX11Application’ is not a member of ‘QNativeInterface’; did you mean ‘QWaylandApplication’?
   94 |     auto x11_native = app->nativeInterface<QNativeInterface::QX11Application>();
      |                                                              ^~~~~~~~~~~~~~~
      |                                                              QWaylandApplication
/home/daniel/QGC/qgroundcontrol/libs/qmlglsink/qt6/gstqt6glutility.cc:94:79: error: no matching function for call to ‘QGuiApplication::nativeInterface<<expression error> >()94 |     auto x11_native = app->nativeInterface<QNativeInterface::QX11Application>();
      |                                                                               ^
In file included from /home/daniel/QGC/qt6/qt6-install/include/QtCore/qcoreapplication.h:16,
                 from /home/daniel/QGC/qt6/qt6-install/include/QtGui/qguiapplication.h:8,
                 from /home/daniel/QGC/qt6/qt6-install/include/QtGui/QGuiApplication:1,
                 from /home/daniel/QGC/qgroundcontrol/libs/qmlglsink/qt6/gstqt6glutility.cc:26:
/home/daniel/QGC/qt6/qt6-install/include/QtGui/qguiapplication.h:142:5: note: candidate: ‘template<class NativeInterface, class TypeInfo, class BaseType, typename std::enable_if<TypeInfo::isCompatibleWith<QGuiApplication>, bool>::type <anonymous> > NativeInterface* QGuiApplication::nativeInterface() const’
  142 |     QT_DECLARE_NATIVE_INTERFACE_ACCESSOR(QGuiApplication)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/daniel/QGC/qt6/qt6-install/include/QtGui/qguiapplication.h:142:5: note:   template argument deduction/substitution failed:
/home/daniel/QGC/qgroundcontrol/libs/qmlglsink/qt6/gstqt6glutility.cc:94:79: error: template argument 1 is invalid
   94 |     auto x11_native = app->nativeInterface<QNativeInterface::QX11Application>();
      |                                                                               ^
At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-unused-private-field’
ninja: build stopped: subcommand failed.

2. 步骤

注:/path/to/install是安装路径,请根据实际需要进行安装目录调整。

2.1 QT 编译

注:推荐使用6.6.3版本,但是笔者也试过5.15.2

  • QGC最新master(5a348d3) + QT6.6.3 ==》失败
  • QGC-Stable4.4 + QT6.6.3 ==》失败
  • QGC-Stable4.4 + QT5.15.2 ==》失败

2.1.1 下载

$ git clone git://code.qt.io/qt/qt5.git qt6

2.1.2 版本

$ cd qt6
$ git checkout 6.6.3

2.1.3 初始化

$ perl init-repository

2.1.4 配置

$ mkdir qt6-build
$ ./configure -prefix /path/to/install

2.1.5 编译

$ cmake --build . --parallel 4

2.1.6 安装

$ cmake --install .

2.2 QGC 编译

2.2.1 下载

$ git clone --recursive -j8 https://github.com/mavlink/qgroundcontrol.git

2.2.2 版本

$ cd qgroundcontrol
$ git checkout Stable_V4.4

2.2.3 初始化

$ git submodule update --recursive

2.2.4 配置

$ cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=/path/to/install

2.2.5 编译

$ cmake --build build --config Debug

注:改步骤由于X11(QNativeInterface::QX11Application)的问题,始终无法通过,换衣X11依赖等方面在Jetson Orin Nano上存在一些问题。

2.2.6 安装

$ ./build/QGroundControl

2.2.7 QT5命令备注

$ git clone git://code.qt.io/qt/qt5.git qt5
$ git checkout 5.15.2
$ perl init-repository
$ mkdir qt5-build
$ ./configure -prefix /path/to/install
$ make
$ make install

3. 可行方案

采用Installing-QGroundControl-on-Ubuntu-ARM64-using-Flatpak) 方案安装可行。

在这里插入图片描述

4. 总结

如果有朋友知道如何解决上述问题,也请告知,谢谢!

相关内容的进一步讨论: How did Flatpak build QGC for Jetson? #1

5. 补充 - 问题清单

5.1 cmake配置命令错误

$ cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=/path/to/install
$ cmake -B build -G Ninja CMAKE_BUILD_TYPE=Debug
CMake Error: The source directory "/home/daniel/QGC/qgroundcontrol/CMAKE_BUILD_TYPE=Debug" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.


$ cmake -B build -G Ninja
CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
  CMake 3.22.1 or higher is required.  You are running version 3.16.3


-- Configuring incomplete, errors occurred!

5.2 qtconnectivity5-dev库问题

$ sudo apt-get install qtconnectivity5-dev
CMake Error at /usr/lib/aarch64-linux-gnu/cmake/Qt5/Qt5Config.cmake:28 (find_package):
  Could not find a package configuration file provided by "Qt5Bluetooth" with
  any of the following names:

    Qt5BluetoothConfig.cmake
    qt5bluetooth-config.cmake

  Add the installation prefix of "Qt5Bluetooth" to CMAKE_PREFIX_PATH or set
  "Qt5Bluetooth_DIR" to a directory containing one of the above files.  If
  "Qt5Bluetooth" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:123 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/daniel/QGC/qgroundcontrol/build/CMakeFiles/CMakeOutput.log".

5.3 libqt5charts5-dev库问题

$ sudo apt-get install libqt5charts5-dev
CMake Error at /usr/lib/aarch64-linux-gnu/cmake/Qt5/Qt5Config.cmake:28 (find_package):
  Could not find a package configuration file provided by "Qt5Charts" with
  any of the following names:

    Qt5ChartsConfig.cmake
    qt5charts-config.cmake

  Add the installation prefix of "Qt5Charts" to CMAKE_PREFIX_PATH or set
  "Qt5Charts_DIR" to a directory containing one of the above files.  If
  "Qt5Charts" provides a separate development package or SDK, be sure it has
  been installed.
Call Stack (most recent call first):
  CMakeLists.txt:123 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/daniel/QGC/qgroundcontrol/build/CMakeFiles/CMakeOutput.log".

5.4 qtlocation5-dev库问题

$ sudo apt-get install qtlocation5-dev
CMake Error at /usr/lib/aarch64-linux-gnu/cmake/Qt5/Qt5Config.cmake:28 (find_package):
  Could not find a package configuration file provided by "Qt5Location" with
  any of the following names:

    Qt5LocationConfig.cmake
    qt5location-config.cmake

  Add the installation prefix of "Qt5Location" to CMAKE_PREFIX_PATH or set
  "Qt5Location_DIR" to a directory containing one of the above files.  If
  "Qt5Location" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:123 (find_package)


-- Configuring incomplete, errors occurred!

5.5 qtpositioning5-dev库问题

$ sudo apt-get install qtpositioning5-dev
CMake Error at /usr/lib/aarch64-linux-gnu/cmake/Qt5Location/Qt5LocationConfig.cmake:101 (find_package):
  Could not find a package configuration file provided by
  "Qt5PositioningQuick" (requested version 5.12.8) with any of the following
  names:

    Qt5PositioningQuickConfig.cmake
    qt5positioningquick-config.cmake

  Add the installation prefix of "Qt5PositioningQuick" to CMAKE_PREFIX_PATH
  or set "Qt5PositioningQuick_DIR" to a directory containing one of the above
  files.  If "Qt5PositioningQuick" provides a separate development package or
  SDK, be sure it has been installed.
Call Stack (most recent call first):
  /usr/lib/aarch64-linux-gnu/cmake/Qt5/Qt5Config.cmake:28 (find_package)
  CMakeLists.txt:123 (find_package)


-- Configuring incomplete, errors occurred!

5.6 qtmultimedia5-dev库问题

$ sudo apt-get install qtmultimedia5-dev
CMake Error at /usr/lib/aarch64-linux-gnu/cmake/Qt5/Qt5Config.cmake:28 (find_package):
  Could not find a package configuration file provided by "Qt5Multimedia"
  with any of the following names:

    Qt5MultimediaConfig.cmake
    qt5multimedia-config.cmake

  Add the installation prefix of "Qt5Multimedia" to CMAKE_PREFIX_PATH or set
  "Qt5Multimedia_DIR" to a directory containing one of the above files.  If
  "Qt5Multimedia" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:123 (find_package)


-- Configuring incomplete, errors occurred!

5.7 qtquickcontrols2-5-dev库问题

$ sudo apt-get install qtquickcontrols2-5-dev
CMake Error at /usr/lib/aarch64-linux-gnu/cmake/Qt5/Qt5Config.cmake:28 (find_package):
  Could not find a package configuration file provided by "Qt5QuickControls2"
  with any of the following names:

    Qt5QuickControls2Config.cmake
    qt5quickcontrols2-config.cmake

  Add the installation prefix of "Qt5QuickControls2" to CMAKE_PREFIX_PATH or
  set "Qt5QuickControls2_DIR" to a directory containing one of the above
  files.  If "Qt5QuickControls2" provides a separate development package or
  SDK, be sure it has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:123 (find_package)


-- Configuring incomplete, errors occurred!

5.8 libqt5svg5-dev库问题

$ sudo apt-get install libqt5svg5-dev
CMake Error at /usr/lib/aarch64-linux-gnu/cmake/Qt5/Qt5Config.cmake:28 (find_package):
  Could not find a package configuration file provided by "Qt5Svg" with any
  of the following names:

    Qt5SvgConfig.cmake
    qt5svg-config.cmake

  Add the installation prefix of "Qt5Svg" to CMAKE_PREFIX_PATH or set
  "Qt5Svg_DIR" to a directory containing one of the above files.  If "Qt5Svg"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  CMakeLists.txt:123 (find_package)


-- Configuring incomplete, errors occurred!

5.9 libqt5texttospeech5-dev库问题

$ sudo apt-get install libqt5texttospeech5-dev
CMake Error at /usr/lib/aarch64-linux-gnu/cmake/Qt5/Qt5Config.cmake:28 (find_package):
  Could not find a package configuration file provided by "Qt5TextToSpeech"
  with any of the following names:

    Qt5TextToSpeechConfig.cmake
    qt5texttospeech-config.cmake

  Add the installation prefix of "Qt5TextToSpeech" to CMAKE_PREFIX_PATH or
  set "Qt5TextToSpeech_DIR" to a directory containing one of the above files.
  If "Qt5TextToSpeech" provides a separate development package or SDK, be
  sure it has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:123 (find_package)


-- Configuring incomplete, errors occurred!

5.10 libqt5serialport5-dev库问题

$ sudo apt-get install libqt5serialport5-dev
CMake Error at /usr/lib/aarch64-linux-gnu/cmake/Qt5/Qt5Config.cmake:28 (find_package):
  Could not find a package configuration file provided by "Qt5SerialPort"
  with any of the following names:

    Qt5SerialPortConfig.cmake
    qt5serialport-config.cmake

  Add the installation prefix of "Qt5SerialPort" to CMAKE_PREFIX_PATH or set
  "Qt5SerialPort_DIR" to a directory containing one of the above files.  If
  "Qt5SerialPort" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:149 (find_package)


-- Configuring incomplete, errors occurred!

5.11 libqt5x11extras5-dev库问题

$ sudo apt-get install libqt5x11extras5-dev
CMake Error at /usr/lib/aarch64-linux-gnu/cmake/Qt5/Qt5Config.cmake:28 (find_package):
  Could not find a package configuration file provided by "Qt5X11Extras" with
  any of the following names:

    Qt5X11ExtrasConfig.cmake
    qt5x11extras-config.cmake

  Add the installation prefix of "Qt5X11Extras" to CMAKE_PREFIX_PATH or set
  "Qt5X11Extras_DIR" to a directory containing one of the above files.  If
  "Qt5X11Extras" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  libs/qmlglsink/CMakeLists.txt:26 (find_package)


-- Configuring incomplete, errors occurred!

5.12 cmake版本问题

cmake必须是3.22版本以上才能进行配置、编译。

$ sudo apt-get remove --purge cmake
$ tar -zxvf cmake-3.22.1.tar.gz
$ cd cmake-3.22.1
$ ./bootstrap
$ make
$ sudo make install
$ cmake --version

5.13 修改CMakeList.txt

$ git diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 765e4f450..89a3625d2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -37,6 +37,10 @@ include(CMakePrintHelpers)

 set(CMAKE_CXX_STANDARD 17)
 set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(OpenGL_GL_PREFERENCE "GLVND")
+set(CMAKE_PREFIX_PATH "/path/to/install")
+
+
 if(LINUX)
     set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/AppDir/usr)
 else()

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1877731.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

如何用GPT开发一个基于 GPT 的应用?

原文发自博客&#xff1a;GPT应用开发小记 如何开发一个基于 GPT 的应用&#xff1f;答案就在问题里&#xff0c;那就是用 GPT 来开发基于 GPT 的应用。本文以笔者的一个开源项目 myGPTReader 为例&#xff0c;分享我是如何基于 GPT 去开发这个系统的&#xff0c;这个系统的功能…

Typora failed to export as pdf. undefined

变换版本并没有用&#xff0c;调整图片大小没有用 我看到一个博客后尝试出方案 我的方法 解决&#xff1a;从上图中的A4&#xff0c;变为其他&#xff0c;然后变回A4 然后到处成功&#xff0c;Amazing&#xff01; 参考&#xff1a; Typora 导出PDF 报错 failed to export…

Tesseract Python 图片文字识别入门

1、安装tesseract Index of /tesseract https://digi.bib.uni-mannheim.de/tesseract/tesseract-ocr-w64-setup-v5.3.0.20221214.exe 2、安装中文语言包 https://digi.bib.uni-mannheim.de/tesseract/tessdata_fast/ 拷贝到C:\Program Files\Tesseract-OCR\tessdata 3、注…

《重构》读书笔记【第1章 重构,第一个示例,第2章 重构原则】

文章目录 第1章 重构&#xff0c;第一个示例1.1 重构前1.2 重构后 第2章 重构原则2.1 何谓重构2.2 两顶帽子2.3 为何重构2.4 何时重构2.5 重构和开发过程 第1章 重构&#xff0c;第一个示例 我这里使用的IDE是IntelliJ IDEA 1.1 重构前 plays.js export const plays {&quo…

springcloud第4季 springcloud-alibaba之nacos+openfegin+gateway+sentinel熔断限流【经典案例】

一 说明 1.1 架构说明 本案例实现原理&#xff1a; 采用alibaba的nacos&#xff0c;openfegin&#xff0c;sentinel&#xff0c;gateway等组件实现熔断限流。 主要理解sentinel的ResouceSentinel和fallback的区别联系。 ResourceSentinel 主要是页面配置熔断限流规则&#…

海康+libtorch的血泪教训

一、LibTorch使用&#xff0c; 详见&#xff1a; /INCLUDE:?warp_sizecudaatYAHXZ 二、海康二次开发&#xff0c; 目前选4.31&#xff0c;只能c14。 三、做dll注意&#xff1a;

实用的vueuseHooks,提高编码效率

文章目录 写在前面vueuse 官网安装HooksuseStorage [地址](https://vueuse.org/core/useStorage/)传统方法数据持久化 举例子传统持久化的弊端useStorage 数据持久化 举例子使用useStorage 更改存储数据使用useStorage 删除存储数据 useScriptTag [地址](https://vueuse.org/co…

FinalShell:功能强大的 SSH 工具软件,Mac 和 Win 系统的得力助手

在当今数字化的时代&#xff0c;SSH 工具软件成为了许多开发者、运维人员以及技术爱好者不可或缺的工具。而 FinalShell 作为一款出色的中文 SSH 工具软件&#xff0c;无论是在 Mac 系统还是 Windows 系统上&#xff0c;都展现出了卓越的性能和便捷的使用体验。 FinalShell 拥…

go语言DAY7 字典Map 指针 结构体 函数

Go中Map底层原理剖析_go map底层实现-CSDN博客 目录 Map 键值对key,value 注意&#xff1a; map唯一确定的key值通过哈希运算得出哈希值 一、 map的声明及初始化&#xff1a; 二、 map的增删改查操作&#xff1a; 三、 map的赋值操作与切片对比&#xff1a; 四、 通用所有…

深入探讨C++的高级反射机制

反射是一种编程语言能力&#xff0c;允许程序在运行时查询和操纵对象的类型信息。它广泛应用于对象序列化、远程过程调用、测试框架、和依赖注入等场景。 由于C语言本身的反射能力比较弱&#xff0c;因此C生态种出现了许多有趣的反射库和实现思路。我们在本文一起探讨其中的奥秘…

深入解析内容趋势:使用YouTube API获取视频数据信息

一、引言 YouTube&#xff0c;作为全球最大的视频分享平台之一&#xff0c;汇聚了无数优质的内容创作者和观众。从个人分享到专业制作&#xff0c;从教育科普到娱乐休闲&#xff0c;YouTube上的视频内容丰富多彩&#xff0c;满足了不同用户的需求。对于内容创作者、品牌以及希…

langchain学习总结

大模型开发遇到的问题及langchain框架学习 背景&#xff1a; 1、微场景间跳转问题&#xff0c;无法实现微场景随意穿插 2、大模型幻读&#xff08;推荐不存在的产品、自己发挥&#xff09; 3、知识库检索&#xff0c;语义匹配效果较差&#xff0c;匹配出的结果和客户表述的…

nacos 整合 openfeign实现远程调用

结合之前写过的案例 Springcloud Alibaba nacos简单使用 Springcloud 之 eureka注册中心加feign调用 在微服务架构中&#xff0c;服务注册与发现是一个关键组件。Nacos 是一个开源的服务注册与发现、配置管理平台&#xff0c;而 OpenFeign 是一个声明式的 Web 服务客户端&am…

【智能算法】目标检测算法

目录 一、目标检测算法分类 二、 常见目标检测算法及matlab代码实现 2.1 R-CNN 2.1.1 定义 2.1.2 matlab代码实现 2.2 Fast R-CNN 2.2.1 定义 2.2.2 matlab代码实现 2.3 Faster R-CNN 2.3.1 定义 2.3.2 matlab代码实现 2.4 YOLO 2.4.1 定义 2.4.2 matlab代码实现…

eBPF技术揭秘:DeepFlow如何引领故障排查,提升运维效率

DeepFlow 实战&#xff1a;eBPF 技术如何提升故障排查效率 目录 DeepFlow 实战&#xff1a;eBPF 技术如何提升故障排查效率 微服务架构系统中各个服务、组件及其相互关系的全景 零侵扰分布式追踪&#xff08;Distributed Tracing&#xff09;的架构和工作流程 关于零侵扰持…

力扣 单链表元素删除解析及高频面试题

目录 删除元素的万能方法 构造虚拟头结点来应对删除链表头结点的情况 一、203.移除链表元素 题目 题解 二、19.删除链表中倒数第K个节点 题目 题解 三、 83.删除某个升序链表中的重复元素&#xff0c;使重复的元素都只出现一次 题目 题解 82.删除某个升序链表中的…

【UML用户指南】-23-对高级行为建模-状态机

目录 1、概述 2、状态 2.1、状态的组成 3、转移 3.1、转移的组成 4、高级状态和转移 4.1、进入效应和退出效应 4.2、内部转移 4.3、do活动 4.4、延迟事件 4.5、子状态机 5、子状态 5.1、非正交子状态 5.2、历史状态 5.3、正交子状态 6、分叉与汇合 7、主动对象…

【摄像头标定】双目摄像头标定及矫正-opencv(python)

双目摄像头标定及矫正 棋盘格标定板标定矫正 棋盘格标定板 本文使用棋盘格标定板&#xff0c;可以到这篇博客中下载&#xff1a;https://blog.csdn.net/qq_39330520/article/details/107864568 标定 要进行标定首先需要双目拍的棋盘格图片&#xff0c;20张左右&#xff0c;…

【最简单】解决windows安装wsl,出现WslRegisterDistribution failed with error: 0x8007019e的问题

从官网下载安装包安装ubuntu18.04的过程中出现了下面的错误 在Windows上安装Windows Subsystem for Linux (WSL) 时&#xff0c;可能会遇到以下错误&#xff1a; WslRegisterDistribution failed with error: 0x8007019e 这个错误通常是由于系统未启用必要的功能或未正确配置…

计算机网络微课堂(湖科大教书匠)TCP部分

计算机网络微课堂&#xff08;湖科大教书匠&#xff09;TCP部分 【计算机网络微课堂&#xff08;有字幕无背景音乐版&#xff09;】 TCP的流量控制 一般来说&#xff0c;我们希望数据传输得更快一些。但如果发送方把数据发送得过快&#xff0c;接收方就可能来不及接收&#…