---
## 3 · 玩具例子:单帧 tracking
Mono 30 Hz、室内、约 100 个 ORB 特征匹配。Jetson Orin 上的时间 `UNVERIFIED`:
| 步骤 | 时间 |
|---|---|
| ORB 提取(8 层金字塔、目标 1000) | ~8 ms |
| 常速 predict + 半径 match | ~3 ms |
| Motion-only BA(LM,4 iter) | ~5 ms |
| KF 决策 | <1 ms |
| **总 tracking** | **~17 ms** |
并行:local mapping ~100 ms/KF;DBoW2 ~20 ms/KF;full BA 只在闭环。这套预算就是为什么 ORB-SLAM3 是室内 30 Hz,不是 aerial 200 Hz。
---
## 4 · 工程:ORB 为什么仍在出货
ORB(Rublee 2011):FAST + steered BRIEF、256-bit 二进制、旋转不变、<1 ms/帧。**packed bits 上的 Hamming 距离吃进 L1 cache;不需要 GPU。** ORB 约 1 µs/keypoint,对比 SIFT 约 50 µs(L2 float)、SuperPoint 约 10 µs(要 GPU)。
为什么 ORB-SLAM3 内部不换掉 ORB?不是精度问题 —— **DBoW2 闭环建在 ORB 之上**,DBoW2 重训 + 集成是几个月的工程。SuperSLAM 之类的 fork 存在;没有一个挪到规范 fork 的位置。
---
## 5 · 数据与评测
报在 EuRoC MAV(stereo+IMU,ATE 2–10 cm `UNVERIFIED`)、TUM-VI(长 handheld 室内外,Atlas 用)、TUM-RGBD。⚠️ 按 `AGENTS.md` 仿真饱和约束:EuRoC 数字**不能**外推到户外 / 高速 / 振动。
---
## 6 · 能力与失败模式
**出货场景:** 室内 manipulation(RGB-D + IMU);AR/VR(stereo + IMU + Atlas multi-session);带闭环的仓库 AGV。
**失败场景:** 无纹理场景(白墙 → tracking 丢);高速 / 运动模糊(>2 rad/s 让 FAST 缺料);动态场景(静默地图污染、不会 crash;DynaSLAM 这类 fork 在修这点);aerial 200 Hz / sub-10 ms(见 `crossing/slam-vio-migration/`);户外 GNSS 感知的 AD。
### 6.1 Hidden Assumptions
- **静态刚性世界** —— 每个 map point 都被当作不动。人、门、车 → 静默地图污染、不 crash。
- **光照一致** —— BRIEF 比较像素对的亮度;HDR 切换会翻 descriptor 的 bit。
- **内参稳定** —— 塑料壳 RealSense 上的温度引起的焦距漂移看不见。
- **IMU bias 缓慢变化** —— 桨振破坏 random-walk 模型;aerial 用户选 VINS / OpenVINS 的 #1 原因。
- **每个 session 至少一次闭环** —— 没闭环时漂移累积、Atlas 也合不起来。
### 6.2 GitHub 实地失败(atlas 联动)
- **GitHub-validated**:**IMU 初始化失败**是 issue tracker 第一大类(#730 / #933 / #980 / #264),共因是 D435i / 自录 / Gazebo 的 IMU-cam 时间戳不同步 → preintegration 空 buffer → 死循环;硬件 trigger / Kalibr 时间偏移标定是入场费,详见 [`github_failure_atlas.md`](./github_failure_atlas.md)。
- **GitHub-validated**:**Pangolin / Eigen / g2o 版本不匹配**导致 segfault / `G2oTypes.cc` 崩 / `SO3::exp failed`(#967 / #828 / #451 / #156 自 2022 open),印证"内参 / 依赖版本稳定"隐藏假设;产品部署必须锁版本 fork + Docker,详见 [`github_failure_atlas.md`](./github_failure_atlas.md)。
- **GitHub-validated**:**maintainer 带宽 << 用户量** — 568 open issues / 最近 push 2024-07 / 主仓视同冻结,社区贡献全部流向外部 fork (`thien94/...`, `zang09/ORB_SLAM3_ROS2`, `SuperSLAM`),用户 #1001 (2026-04) 吐槽 "the worst repository I have ever tried to work with";选 ORB-SLAM3 意味着选 fork 文化,详见 [`github_failure_atlas.md`](./github_failure_atlas.md)。
---
## 7.5 · GitHub-validated pitfalls (2026-05-24 deep dive)
> 系统性扫描 538 个 open issue / 30 个 PR,覆盖 build hell、ROS 2 port、Atlas merge、IMU init、stereo 失败模式六大类。引用为原文,链接为 GitHub issue ID。
| # | Pitfall | Evidence | Severity | Workaround |
|---|---|---|---|---|
| 1 | **Atlas merge → heap corruption crash** — loop detection 触发 Atlas 合并时 malloc 元数据被改写 | [#919](https://github.com/UZ-SLAMLab/ORB_SLAM3/issues/919): "When I have a *Merge detected, the program crashes, returning a malloc(): corrupted top size, then an aborted." | 🔴 | 跑长 session 时禁用 loop closure 或 fork [`thien94/ORB_SLAM3`](https://github.com/thien94/ORB_SLAM3) 已修若干 merge race;不要在生产用主仓 Atlas |
| 2 | **G2oTypes.cc null-pointer segfault in monocular-inertial** — `EdgePriorPoseImu` 构造时 `pFp->mpcpi` 为 null 但代码只打 warning 不防御 | [#967](https://github.com/UZ-SLAMLab/ORB_SLAM3/issues/967): "It crashes because the pointer 'c' is null, so in the caller 'pFp->mpcpi' is null" | 🔴 | 多 IMU+cam dataset 切换时易触发;patch 加 null guard(社区 PR 未合)或避免动态切 dataset |
| 3 | **IMU 初始化失败 → "Empty IMU measurements vector"** — 即便 Kalibr 标定残差良好仍卡在初始化 | [#730](https://github.com/UZ-SLAMLab/ORB_SLAM3/issues/730): "IMU is not or recently initialized. Reseting active map..." 反复出现;30 fps 卷帘相机 + 49 Hz IMU | 🔴 | IMU ≥200 Hz 必备;用全局快门相机;硬件 trigger 同步;卷帘+低频 IMU 是 #1 翻车配置 |
| 4 | **Stereo 模式空特征帧 → segfault** — `Frame` 构造遇零 ORB 提前返回,`mfGridElementWidthInv` 等静态变量未初始化 | [#991](https://github.com/UZ-SLAMLab/ORB_SLAM3/issues/991): "Program crashes with segmentation fault or undefined behavior when accessing uninitialized grid variables" | 🟠 | 低光 / 白墙 / 黑帧入场即崩;前置帧质量过滤;不能依赖内部"无特征跳帧"语义 |
| 5 | **Build hell on Ubuntu 22.04 + Jetson aarch64** — Tracking.cc 编不过;g2o 先编成功后 ORB_SLAM3 自身崩 | [#996](https://github.com/UZ-SLAMLab/ORB_SLAM3/issues/996): "make[2]: *** [CMakeFiles/ORB_SLAM3.dir/build.make:93: CMakeFiles/ORB_SLAM3.dir/src/Tracking.cc.o] Error 1" on Jetson Orin Nano Ubuntu 22.04 aarch64 / kernel 5.15.148-tegra | 🟠 | Ubuntu 20.04 + GCC 9 是参考栈;22.04 / GCC 11+ / Eigen 3.4 / OpenCV 4.6+ 全部要 patch;用 Docker 锁版本 |
| 6 | **ROS 2 port = 社区 fork 拼图** — 主仓无 ROS 2 节点,用户只能挑 `zang09/ORB_SLAM3_ROS2` / `thien94/orb_slam3_ros` 等几个分叉,Humble 兼容靠 [#965](https://github.com/UZ-SLAMLab/ORB_SLAM3/issues/965) closed 但无主线合并 | [#869](https://github.com/UZ-SLAMLab/ORB_SLAM3/issues/869) "Could the version of ORBSLAM3-ROS be upgraded to ROS Noetic"; [#793](https://github.com/UZ-SLAMLab/ORB_SLAM3/issues/793) "How to publish pose topic on ROS2 with monocular-inertial node?"; [#960](https://github.com/UZ-SLAMLab/ORB_SLAM3/issues/960) oak-d ros2 bag | 🟠 | 选 fork 看活跃度 + 测试自家 sensor;不要混 ROS 1 桥;接受 fork pin-version 维护成本 |
| 7 | **Map merge → bad point cloud** — 合并后点云质量塌;timing 指标出 NaN | [#723](https://github.com/UZ-SLAMLab/ORB_SLAM3/issues/723) "Merging maps and bad point cloud"; [#489](https://github.com/UZ-SLAMLab/ORB_SLAM3/issues/489) NaN in REGISTER_TIMES | 🟡 | Atlas merge 在论文 demo 之外没经充分压测;多 session 长建图先脚本验证 metric 再上业务 |
| 8 | **Maintainer 静默 + 528 open issues** — Issue #1001 直接说"one of the worst repository I have ever tried to work with";PR #798 22 条评论 23 年开到现在未合 | [#1001](https://github.com/UZ-SLAMLab/ORB_SLAM3/issues/1001): "Bad documentation, bad code. I think that 500+ open issues says everything"; [PR #798](https://github.com/UZ-SLAMLab/ORB_SLAM3/pull/798) "[Stable Build]: Corrects major bugs, and creates buildable repo" 未合 | 🟡 | 视主仓为"参考实现 + 论文 reproducer";生产部署用社区 fork (`thien94/...`),自维 patch + Docker |
**Repo health signal**: 8.6k ★ / 538 open / closed unknown but >800 累计 / forks 3.1k / 30 PR open / last commit 2024-07(视同冻结)/ PR #999 (2026-03) 最新但 spam-ish
**讀者實務含義**:
1. ORB-SLAM3 是 *2021 论文实现*,不是 *2026 活跃产品*——选它等于选 fork 文化 + Docker 版本锁 + 自维 IMU init / Atlas merge patch。
2. 工作包络以 IMU 200 Hz + 全局快门 stereo + 充足纹理 + Ubuntu 20.04 GCC 9 栈为入场费;任一项偏离都进 #730/#967/#919/#991 已知踩坑区。
3. Atlas multi-map 是论文卖点但是踩坑重灾区;长 session 生产场景先评 [thien94 fork](https://github.com/thien94/ORB_SLAM3) 或考虑 OpenVINS / VINS-Fusion + 自接 PGO。
---
## 8 · 比较 & 面试 Tip
| 栈 | 模式 | 前端 | IMU | 闭环 | aerial? |
|---|---|---|---|---|---|
| **ORB-SLAM3** | mono/stereo/RGBD/+IMU | ORB | tight (preint) | DBoW2+Atlas | ❌ 室内 |
| VINS-Fusion | mono/stereo+IMU | KLT | tight | DBoW2 | ✅ |
| OpenVINS | mono/stereo+IMU | KLT | tight (MSCKF) | 较弱 | ✅ |
| DSO ([dissection](./direct_methods_dso_lsd.md)) | mono | direct | 弱 | 弱 | ❌ |
| DROID-SLAM | mono/stereo/RGBD | learned | 弱 | learned | ❌ |
| VGGT | N-view RGB | feed-forward | — | n/a | ❌ 速率不对 |
> **🎤 Interview Tip.** "我们机器人选 ORB-SLAM3 还是 VINS-Fusion?" —— 正确答:"看 embodiment 和控制速率。ORB-SLAM3 适合室内 RGB-D / manipulation / AR,多 session 重要的场景;VINS-Fusion 适合 aerial / 高速运动,tracking 延迟把权重压过去。" 错答:"ORB-SLAM3 更通用,所以选它" —— 通用是*codebase* 的特征,不是*工作包络*的特征。
---
## Boundary
- Aerial 实时 VIO(VINS / OpenVINS / DROID at 200 Hz) → [`embodiments/aerial/vio/`](../../embodiments/aerial/vio/overview.md)。这里不重写。
- "VGGT vs VIO" 跨 embodiment → [`crossing/slam-vio-migration/vggt_vs_drone_vio.md`](../../crossing/slam-vio-migration/vggt_vs_drone_vio.md)。
- Direct methods(DSO / LSD) → [`./direct_methods_dso_lsd.md`](./direct_methods_dso_lsd.md)。
- Kalibr / 标定 → [`./slam_toolchain_ecosystem.md`](./slam_toolchain_ecosystem.md)。
- 3DGS SLAM backend → [`foundations/3dgs-family/gs_slam_dissection.md`](../3dgs-family/gs_slam_dissection.md)。
---
## References
- ORB-SLAM3 —— Campos et al. *T-RO 2021* · https://arxiv.org/abs/2007.11898
- ORB-SLAM —— Mur-Artal et al. *T-RO 2015* · https://arxiv.org/abs/1502.00956
- ORB-SLAM2 —— Mur-Artal, Tardós *T-RO 2017* · https://arxiv.org/abs/1610.06475
- ORB —— Rublee et al. *ICCV 2011*;DBoW2 —— Gálvez-López, Tardós *T-RO 2012*
- IMU 预积分 —— Forster et al. *RSS 2015* · https://arxiv.org/abs/1512.02363
- Code —— https://github.com/UZ-SLAMLab/ORB_SLAM3
---
[← Back to Classical SLAM](./overview.md)