1. 资源限制与算法选型Jetson Orin Nano运行 VSLAM 适合构建中小规模场景如小型园区的地图和定位系统。场景类型推荐规模实际验证案例备注室内房间/走廊≤ 200㎡六足机器人搜救、地面机器人室内导航最擅长的场景性能充裕小型园区/建筑群≤ 10,000㎡无人机项目验证距离达100米以上需要优化参数建议使用VIO融合内存限制限制Jetson Orin Nano的内存是CPUGPU共用8GB 统一内存。在大规模地图情况下容易导致内存累积长时间运行可能 OOM应对配置 NVMe SSD 迁移 Docker 数据目录到 SSD使用轻量化 VSLAM 方案如 DPVO嵌入式首选定期保存/重置地图计算资源竞争限制同时运行 VSLAM 目标检测 控制CPU/GPU 负载较高应对使用 TensorRT 量化模型YOLO 量化后速度提升 5-6 倍优先保证 VSLAM 实时性其他任务可降频处理VSLAM算法选型根据 2026 年最新评测不同 VSLAM 方案在 Jetson 上的表现算法类型具体方案适用场景推荐度深度学习型DPVO嵌入式部署首选效率与鲁棒性平衡⭐⭐⭐⭐⭐学习型MASt3R / DUSt3R精度最高但算力需求大⭐⭐⭐传统型ORB-SLAM3在视觉退化环境中失效⭐⭐DPVODeep Patch Visual Odometry深度块视觉里程计由普林斯顿大学的研究者在 2022 年提出并被顶级人工智能会议 NeurIPS 接收。它的核心任务是仅凭单目相机的视频输入实时地估算出相机的运动轨迹6自由度位姿同时稀疏地重建出周围环境的3D结构。DPVO 是一个在视觉里程计VO领域非常有代表性的深度学习系统。简单来说它的核心优势是在不牺牲精度的前提下通过基于稀疏图像块的匹配替代传统方法中计算量巨大的“密集流”方法从而实现了极高的运行效率。特点说明稀疏匹配 (Sparse Matching)每帧图像只随机采样少量图像块如64个进行跟踪极大地减少了需要处理的数据量。深度补丁表示 (Deep Patch Representation)并非直接使用像素而是用一个轻量级的神经网络为每个图像块提取一个“特征向量”这能更好地描述该区域的纹理和结构提高了匹配的鲁棒性。循环迭代更新 (Recurrent Updates)设计了一个循环网络架构不断在“调整轨迹”和“优化相机姿态”之间迭代逐步求精确保了最终结果的精度。可微BA (Differentiable BA)将传统的“光束法平差 (Bundle Adjustment)”优化步骤设计成网络的一部分可以进行端到端训练让整个系统更智能地学习如何进行几何优化。根据论文中的基准测试在高端 GPU如 NVIDIA RTX 3090上DPVO 的表现令人印象深刻性能指标DPVO对比方法 (DROID-SLAM)结论运行速度60 帧/秒 (FPS)40 FPS快 1.5 倍内存占用4.9 GB8.7 GB节省约 44% 内存极限速度 (EuRoC数据集)120 FPS-速度极快准确性优于所有先前方法-精度更高DPVO 证明了“稀疏”方法在效率和准确性上可以全面超越“密集”方法是当时该领域的 state-of-the-art最先进水平。DPVO 不仅自身性能卓越其思想和代码也为后续研究提供了绝佳的平台。CL-DPVO (Curriculum Learning DPVO)这是 2024 年的一项工作。研究者通过“课程学习”的方法让模型先从简单的运动场景学起再逐步学习更复杂的动态成功提升了 DPVO 在极具挑战性的场景如快速旋转、剧烈抖动下的鲁棒性。客观评价根据一篇 2024 年发表的、专门针对室内移动机器人定位的综合性研究在对比了多种深度学习视觉里程计方法后研究者认为DPVO 是其中最高效、最有效的选择。2. DPVO版本介绍基础版本原版 DPVO 论文中的数据是在 RTX 309024GB 显存上测得的内存占用为 4.9GB速度可达 60 FPS。对于Jetson OrinNano 8GB8GB 的统一内存是最大的限制。原版 DPVO 需要约 5GB 内存留给系统和其它程序的空间较小。可以运行但可能需要牺牲一些性能例如降低处理帧率。进阶版本DPVO-QAT是 2025 年底提出的一个新框架专门为 DPVO嵌入式优化设计旨在让它能在资源受限的平台上高效运行。它的核心优化思路非常值得关注优化技术作用在 Jetson Orin 上的收益异构精度设计前端特征提取用 INT8 模拟后端优化保持 FP32 精度在保持精度的前提下大幅减少计算量和内存带宽压力量化感知训练 (QAT)在训练时就模拟量化误差让模型适应低精度避免了部署后单纯量化带来的精度大幅下降问题CUDA 核函数融合将多个简单的、连续的操作合并成一个复杂的CUDA核减少内核启动和数据搬运的开销显著降低延迟根据论文在TartanAir 数据集上DPVO-QAT 实现了平均 FPS 提升 52.1%中位延迟降低 29.1%峰值 GPU 内存减少 64.9%3. 基础版DPVO安装对于 Jetson Orin Nano 8GB 版本DPVO-QAT 是理想的部署方案。但是为了简单起见本文还是先从基础版本入手避免一上来搞得难度太大。1. 克隆项目git clone https://gitcode.com/gh_mirrors/dp/DPVO.git2. 安装DPVO依赖的环境通过Miniconda安装环境。注意Jetson 是 ARM 架构下载 aarch64 版本wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-latest-Linux-aarch64.sh bash Miniconda3-latest-Linux-x86_64.sh建议配置清华镜像源加速下载conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge conda config --set show_channel_urls yes3. 按照README提示安装cd DPVO/ conda env create -f environment.yml结果频频报错。可以打开environment.yml看一下。自此以下主要是记录安装过程中的报错和解决。不感兴趣的可以划走了----------------------------------------------------------分割线----------------------------------------------------------最后我选择了逐步安装。首先创建虚拟环境conda create -n py310_env python3.10.20接下来安装torch:先贴出来检验是否安装成功的方法python -c import torch; print(PyTorch version:, torch.__version__); print(CUDA available:, torch.cuda.is_available())如果能正常打印CUDA available: True则安装OK。如下是一些安装尝试# 尝试1: pip3 install --no-cache https://developer.download.nvidia.com/compute/redist/jp/v60dp/pytorch/torch-2.3.0a040ec155e58.nv24.03.13384722-cp310-cp310-linux_aarch64.whl # 报错缺少依赖 # 尝试2: 先安装依赖 pip install sympy -i https://mirrors.aliyun.com/pypi/simple/ pip install jinja2 fsspec networkx typing-extensions -i https://mirrors.aliyun.com/pypi/simple/ pip install -i https://mirrors.aliyun.com/pypi/simple/ torch2.3.1 # 仍然报错找不到cudnn.so.8 # 但我的硬件适配的比较好的是cudnn.so.9还是不要轻易动这个。那就只能升级torch了。 # 尝试3: 安装torch2.5 wget https://developer.nvidia.cn/w/compute/redist/jp/v61/pytorch/torch-2.5.0a0872d972e41.nv24.08.17622132-cp310-cp310-linux_aarch64.whl # 需先安装依赖 pip install sympy1.13.1 -i https://mirrors.aliyun.com/pypi/simple/ wget https://developer.download.nvidia.com/compute/cusparselt/0.7.0/local_installers/cusparselt-local-tegra-repo-ubuntu2204-0.7.0_1.0-1_arm64.deb sudo dpkg -i cusparselt-local-tegra-repo-ubuntu2204-0.7.0_1.0-1_arm64.deb sudo cp /var/cusparselt-local-tegra-repo-ubuntu2204-0.7.0/cusparselt-*-keyring.gpg /usr/share/keyrings/ sudo apt-get update sudo apt-get -y install libcusparselt0 libcusparselt-dev pip install torch-2.5.0a0872d972e41.nv24.08.17622132-cp310-cp310-linux_aarch64.whl最终安装torch2.5成功。另外torch-scatter安装多次报错。解决方法屏蔽先安装其他的包pip install -i https://mirrors.aliyun.com/pypi/simple/ -r requirements.txt如下是一些导致报错的安装pip install torch-scatter2.1.2 -i https://mirrors.aliyun.com/pypi/simple/ pip install torch-scatter -f https://data.pyg.org/whl/torch-2.5.0.html pip install torch-scatter -f https://data.pyg.org/whl/torch-2.5.0cu121.html pip install torch-scatter2.1.2 -v -i https://mirrors.aliyun.com/pypi/simple/ pip install torch-scatter -v -i https://mirrors.aliyun.com/pypi/simple/ pip install torch-scatter2.1.2 -f https://data.pyg.org/whl/torch-2.5.0cu121.html最后通过如下命令安装成功pip install torch-scatter2.1.2 --no-build-isolation -i https://mirrors.aliyun.com/pypi/simple/附上最终的requirements.txtnumpy1.26.4 #torch2.5.0, 下载安装 #torch-scatter2.1.2详细安装方法在文中 #torch-cuda12.1, 不用去管这个 torchvision0.27 # 与torch2.5.0对应 tensorboard numba tqdm einops pypose kornia plyfile evo opencv-python yacs安装补充README中安装DPVO# install DPVO pip install .这个命令在conda环境中运行会报错找不到torch通过如下的命令解决pip install . --no-build-isolation -i https://mirrors.aliyun.com/pypi/simple/同理pip install ./DPViewer # 替换为如下命令 pip install ./DPViewer -i https://mirrors.aliyun.com/pypi/simple/ --no-build-isolation安装图像检索系统DPRetrieval原安装命令-改进版pip install ./DPRetrieval --no-build-isolation -i https://mirrors.aliyun.com/pypi/simple/报错Building wheel for dpretrieval (pyproject.toml) ... error error: subprocess-exited-with-error File /tmp/pip-build-env-21eignu4/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py, line 509, in _build_extensions_serial self.build_extension(ext) File string, line 121, in build_extension File /home/pi/miniconda3/envs/py310_env/lib/python3.10/subprocess.py, line 526, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command [cmake, --build, .] returned non-zero exit status 2. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for dpretrieval Failed to build dpretrieval error: failed-wheel-build-for-install × Failed to build installable wheels for some pyproject.toml based projects ╰─ dpretrieval在 Jetson ARM64 架构上编译包含 C/CUDA 扩展的包经常遇到问题需要从源码手动编译cd DPRetrieval python setup.py build_ext --inplace python setup.py install继续报错如下python setup.py build_ext --inplace running build_ext -- pybind11 v2.9.2 -- Found PythonInterp: /home/pi/miniconda3/envs/py310_env/bin/python (found version 3.10.20) -- Found PythonLibs: /home/pi/miniconda3/envs/py310_env/lib/libpython3.10.so -- Configuring done -- Generating done -- Build files have been written to: /home/pi/projects/DPVO/DPRetrieval/build/temp.linux-aarch64-cpython-310/dpretrieval Consolidate compiler generated dependencies of target dpretrieval [ 50%] Building CXX object CMakeFiles/dpretrieval.dir/src/main.cpp.o /home/pi/projects/DPVO/DPRetrieval/src/main.cpp: In constructor ‘DPRetrieval::DPRetrieval(std::string, int)’: /home/pi/projects/DPVO/DPRetrieval/src/main.cpp:55:11: error: ‘OrbVocabulary’ {aka ‘class DBoW2::TemplatedVocabularycv::Mat, DBoW2::FORB’} has no member named ‘loadFromTextFile’ 55 | voc.loadFromTextFile(vocab_path); | ^~~~~~~~~~~~~~~~ In file included from /usr/include/c/11/bits/stl_algobase.h:64, from /usr/include/c/11/bits/specfun.h:45, from /usr/include/c/11/cmath:1935, from /usr/include/c/11/math.h:36, from /home/pi/miniconda3/envs/py310_env/include/python3.10/pyport.h:210, from /home/pi/miniconda3/envs/py310_env/include/python3.10/Python.h:50, from /home/pi/projects/DPVO/DPRetrieval/pybind11/include/pybind11/detail/common.h:213, from /home/pi/projects/DPVO/DPRetrieval/pybind11/include/pybind11/cast.h:13, from /home/pi/projects/DPVO/DPRetrieval/pybind11/include/pybind11/attr.h:13, from /home/pi/projects/DPVO/DPRetrieval/pybind11/include/pybind11/detail/class.h:12, from /home/pi/projects/DPVO/DPRetrieval/pybind11/include/pybind11/pybind11.h:13, from /home/pi/projects/DPVO/DPRetrieval/src/main.cpp:1: /usr/include/c/11/bits/stl_pair.h: In instantiation of ‘constexpr std::pairtypename std::__strip_reference_wrappertypename std::decay_Tp::type::__type, typename std::__strip_reference_wrappertypename std::decay_Tp2::type::__type std::make_pair(_T1, _T2) [with _T1 const double; _T2 const double; typename std::__strip_reference_wrappertypename std::decay_Tp2::type::__type double; typename std::decay_Tp2::type double; typename std::__strip_reference_wrappertypename std::decay_Tp::type::__type double; typename std::decay_Tp::type double]’: /usr/local/include/DBoW2/TemplatedDatabase.h:835:29: required from ‘void DBoW2::TemplatedDatabaseTDescriptor, F::queryChiSquare(const DBoW2::BowVector, DBoW2::QueryResults, int, int) const [with TDescriptor cv::Mat; F DBoW2::FORB]’ /usr/local/include/DBoW2/TemplatedDatabase.h:595:7: required from ‘void DBoW2::TemplatedDatabaseTDescriptor, F::query(const DBoW2::BowVector, DBoW2::QueryResults, int, int) const [with TDescriptor cv::Mat; F DBoW2::FORB]’ /usr/local/include/DBoW2/TemplatedDatabase.h:572:8: required from ‘void DBoW2::TemplatedDatabaseTDescriptor, F::query(const std::vectorT, DBoW2::QueryResults, int, int) const [with TDescriptor cv::Mat; F DBoW2::FORB]’ /home/pi/projects/DPVO/DPRetrieval/src/main.cpp:127:15: required from here /usr/include/c/11/bits/stl_pair.h:567:5: note: parameter passing for argument of type ‘std::pairdouble, double’ when C17 is enabled changed to match C14 in GCC 10.1 567 | make_pair(_T1 __x, _T2 __y) | ^~~~~~~~~ gmake[2]: *** [CMakeFiles/dpretrieval.dir/build.make:76: CMakeFiles/dpretrieval.dir/src/main.cpp.o] Error 1 gmake[1]: *** [CMakeFiles/Makefile2:100: CMakeFiles/dpretrieval.dir/all] Error 2 gmake: *** [Makefile:91: all] Error 2 Traceback (most recent call last): File /home/pi/miniconda3/envs/py310_env/lib/python3.10/subprocess.py, line 526, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command [cmake, --build, .] returned non-zero exit status 2.这个编译错误非常明确问题出在DBoW2 库的 API 变更上。DPRetrieval调用了voc.loadFromTextFile()但系统里安装的 DBoW2 版本已经不再支持这个函数了。解决方法修改源码适配新版 API编辑/home/pi/projects/DPVO/DPRetrieval/src/main.cpp找到第 55 行附近的代码// 把这行 voc.loadFromTextFile(vocab_path); // 改为 voc.load(vocab_path);保存后重新编译并安装成功-----------------------------------------------------------------------------------------------------至此安装流程完成。用了两天的功夫真是折腾啊