Skip to main content
Contents7 / 10 ▾
06
Chapter Six · One Codebase, Three Generations

ORB-SLAM: Every Version, Explained and Run

Chapter 4 introduced ORB-SLAM3 as one era among six. This chapter opens the hood on the whole lineage: the four threads every version shares, exactly what changed from v1 to v2 to v3, and two builds you run yourself, on two different releases, on two different sensors.

6.1Why ORB-SLAM Earns Its Own Chapter

A fair question, since Chapter 4 already spent a full section on ORB-SLAM3. The answer is the same reason RTAB-Map got Chapter 5 instead of a paragraph in Chapter 3: a taxonomy chapter tells you where a system sits among its peers, and a deep-dive chapter tells you how to actually run the thing, argue about it in an interview down to the mechanism, and pick the right release for the job in front of you. ORB-SLAM has earned that treatment more than almost any system in the field. Three papers, one continuously maintained lineage, 2015 to 2021, and a decade later it is still the answer to "what would you actually ship on a CPU."

The lineage also rewards close reading because each release solved one specific, nameable problem with the previous one: ORB-SLAM (2015) proved a single feature-based pipeline could do tracking, mapping, relocalization, and loop closing in real time on a laptop CPU, monocular only. ORB-SLAM2 (2017) generalized the same core to stereo and RGB-D without touching the ideas that worked. ORB-SLAM3 (2021) fixed the two things that were left: it fused an IMU properly, and it stopped dying forever when tracking was lost. Read version-by-version, the story is a masterclass in disciplined engineering rather than a pile of unrelated tricks.

Every ORB-SLAM release keeps the same skeleton: ORB features, a bag-of-words place recognizer, a covisibility graph, and three (later four) threads splitting fast tracking from slow optimization. What changed release to release is sensors in, robustness to tracking loss, and how many maps the system is willing to hold onto at once.

6.2Anatomy: The Threads Every Version Shares

Every ORB-SLAM release is organized as a small number of threads running at different rates, an architecture PTAM introduced in Chapter 4 and ORB-SLAM inherited wholesale, then extended.

Tracking, Every Frame

Runs at camera rate and must never miss a deadline. Extracts ORB features from the incoming frame, gets an initial pose guess (a constant-velocity motion model, or full relocalization if the previous frame was lost), then projects the local map into the image and refines the pose by minimizing reprojection error over just this one frame's pose, the map held fixed. This is motion-only bundle adjustment, the cheapest of the three BA flavors this chapter covers. Tracking's last job each frame is deciding whether the frame deserves to become a keyframe: enough time or motion has passed, or the map points visible have dropped enough that this view of the world is not yet on record.

Local Mapping, Per Keyframe

Runs whenever a new keyframe arrives, at a fraction of camera rate, and does the work tracking cannot afford: insert the keyframe into the covisibility graph, triangulate new map points against covisible neighbors, cull the map points and keyframes that stopped earning their keep (below), and run local bundle adjustment: joint optimization of a window of nearby keyframes and every point they see, with the boundary keyframes held fixed as an anchor. This is where map quality is actually made.

Loop Closing and Map Merging, Occasional

Runs whenever a keyframe's bag-of-words signature matches a place the system has seen before, rarely, and expensively. Verifies the match geometrically, computes a relative transform between now and then, instantly propagates a correction through a sparse pose graph (the essential graph, section 6.4), then launches a full bundle adjustment in the background to polish the whole map without blocking tracking or mapping. In ORB-SLAM3 this thread does one more job with no equivalent in v1 or v2: merging two previously separate maps when the robot recognizes a place across them, the mechanism that makes the Atlas (section 6.5) worth having.

Tracking every frame Local Mapping per keyframe local BA Loop Closing & Map Merging essential graph opt Full / Global BA (background thread) launched async after a loop or merge is accepted Atlas: active map + stored maps (ORB-SLAM3 only) tracking reads the current active map
Fig 6.1: the three threads every ORB-SLAM release runs, plus the Atlas that only ORB-SLAM3 adds. Solid arrows are the per-frame/per-keyframe pipeline; dashed arrows are the slower, occasional paths.

6.3The Two Load-Bearing Ideas

ORB Features, Chosen for Speed and Rotation Invariance

ORB (Rublee et al., ICCV 2011), Oriented FAST and Rotated BRIEF, is the reason the whole lineage runs on a CPU at all. FAST corners are detected across an 8-level image pyramid so scale changes don't lose the feature, and the octree-based distribution ORB-SLAM adds on top forces detections to spread across the image instead of clumping wherever texture happens to be densest, which matters directly for triangulation quality: bunched-up features triangulate poorly. Each corner gets an orientation from its intensity centroid, and BRIEF, a binary descriptor built from a fixed set of pairwise pixel-intensity comparisons, is computed after rotating that comparison pattern to match, which is what makes matching survive in-plane rotation that plain BRIEF cannot. Matching two ORB descriptors is a Hamming distance, a hardware popcount instruction, which is why extraction and matching together cost single-digit milliseconds per frame on a laptop core.

DBoW2, Recognizing a Place You've Seen Before

DBoW2 (Gálvez-López & Tardós, T-RO 2012) quantizes each keyframe's ORB descriptors against a vocabulary tree pre-trained offline on a large generic image corpus, turning an image into a sparse bag-of-words vector, then scores candidates with a tf-idf-style similarity. Chapter 5 walks through the same idea in RTAB-Map, so if you read that chapter first, the mechanism is already familiar; the difference worth naming is that DBoW2's vocabulary is fixed at build time, which loads in a couple of seconds and never adapts to a new environment, versus RTAB-Map's vocabulary, which grows online as the robot explores. Fixed and offline buys DBoW2 speed and predictable memory; online and incremental buys RTAB-Map robustness to environments the vocabulary never saw. Neither choice is wrong, they are answers to different design priorities.

A single high bag-of-words score is never enough to accept a loop closure on its own. Every version geometrically verifies the candidate first: match individual ORB descriptors between the two keyframes, solve for a relative pose with RANSAC, and only accept the loop if enough inliers agree. Chapter 5's "one lucky match against a lookalike corridor gets diluted before it can do damage" applies here in spirit, though the exact mechanism differs: RTAB-Map dilutes bad matches with a Bayesian filter over consecutive frames, ORB-SLAM dilutes them with geometric verification plus, in v3, a requirement that consistency hold across several consecutive keyframes before a candidate is trusted.

ORB
Oriented FAST and Rotated BRIEF. A corner detector plus a binary descriptor, both fast enough to run on every frame with a CPU budget to spare.
Bag of words (DBoW2)
Quantize an image's features against a fixed vocabulary; the resulting histogram is compared against stored places to shortlist loop-closure candidates.
Motion-only BA
Optimize a single frame's camera pose against the existing map, points held fixed. Runs every frame, in Tracking.
Local BA
Optimize a window of covisible keyframes and every point they see, with the window's boundary keyframes fixed as an anchor. Runs per keyframe, in Local Mapping.
Full / Global BA
Optimize every keyframe and every point in the map at once. Expensive, triggered by an accepted loop closure or map merge, runs in its own background thread so tracking never stalls waiting for it.

6.4Covisibility Graph, Essential Graph, and Why Both Exist

The covisibility graph is a weighted undirected graph over keyframes: an edge connects two keyframes if they share at least 15 map points, weighted by how many they share. It answers "which keyframes are relevant right now" in constant time, which is exactly what Tracking needs to decide which map points to project, and what Local Mapping needs to decide the window for local BA. This is architecturally the same idea as Chapter 5's memory management, bounding cost by searching only a relevant neighborhood instead of the whole map, achieved through a graph rather than a memory hierarchy.

The essential graph is a much sparser subgraph built for one purpose: propagating a loop-closure correction through the whole trajectory in milliseconds. It keeps a spanning tree (the minimum connectivity needed, essentially keyframe creation order), every accepted loop-closure edge, and only the strongest covisibility edges, sharing 100 or more points rather than 15. Optimizing over the essential graph is a pose-graph optimization, poses only, no map points, which is orders of magnitude cheaper than a full bundle adjustment and is what makes the map visibly snap straight the instant a loop closes, while the expensive full BA that actually polishes point positions runs afterward, in the background, without anyone waiting on it.

The covisibility graph is the full local road network, every street connected to every street it touches. The essential graph is the interstate highway system distilled from it: far sparser, but if you need to get a correction from one side of the country to the other in a hurry, the highways get you there in one jump, and the side streets can be repaved at leisure afterward.

For monocular sequences, the essential-graph and full-BA optimizations run in Sim(3), similarity transforms with 7 degrees of freedom (rotation, translation, and scale), because a monocular map's scale itself drifts over a long loop, not just its pose. Stereo, RGB-D, and any visual-inertial mode fix scale from the sensor, so their optimizations run in plain SE(3), 6 degrees of freedom, with no scale term to correct. This is a genuinely common interview trap: say "Sim3" for a stereo system and you have just implied its scale drifts, which it does not.

6.5Version by Version

VersionYearSensorsMapIMULicense
ORB-SLAM2015Monocular onlySingle mapNoGPLv3
ORB-SLAM22017Monocular, Stereo, RGB-DSingle map, save/load, localization modeNoGPLv3
ORB-SLAM32021Mono/Stereo/RGB-D, ± IMU, fisheyeAtlas: multi-map with mergingYes, tightly coupledGPLv3

ORB-SLAM (2015): The Original

ORB-SLAM (Mur-Artal, Montiel & Tardós, T-RO 2015) is monocular only, and its real contribution was proving that a single system could do tracking, local mapping, loop closing, and relocalization, all in real time on a CPU, at a time when the field was fragmented into specialists that did one of those well. Two mechanisms worth knowing by name: automatic map initialization computes both a homography and a fundamental matrix in parallel from the first two frames and picks whichever model better explains the observed motion (homography for near-planar scenes or pure rotation, fundamental matrix otherwise), which is how the system decides on its own when there's enough parallax to safely triangulate a starting map. And "survival of the fittest" culling discards map points that fail to be tracked in a minimum fraction of the frames that should have seen them, and discards keyframes whose points are almost entirely redundant with three or more neighbors, keeping the map lean without a human tuning a decay schedule. The repository (raulmur/ORB_SLAM) is explicitly archived by its own author in favor of ORB-SLAM2; read it for the ideas, build ORB-SLAM2 or 3 for anything you actually run.

ORB-SLAM2 (2017): One Codebase, Three Sensors

ORB-SLAM2 (Mur-Artal & Tardós, T-RO 2017) generalized the exact same tracking/mapping/loop-closing skeleton to stereo and RGB-D without touching the ideas that made v1 work; the difference is entirely in how map points get their initial depth. Monocular still triangulates from motion and needs the parallax check from v1. Stereo triangulates instantly from every frame's own left-right disparity, no motion required, which is why stereo ORB-SLAM2 has no monocular-style initialization dance and can produce a metric map from frame one. RGB-D takes depth straight from the sensor, skipping triangulation entirely for the points a depth pixel already covers. The other headline addition is a localization mode: load a previously saved map, disable local mapping and loop closing, and the system does nothing but track and relocalize against what is already there, the same map-once-reuse-daily idea Chapter 5 walks through for RTAB-Map, arriving at ORB-SLAM2 two years earlier.

ORB-SLAM3 (2021): The IMU and the Atlas

ORB-SLAM3 (Campos, Elvira, Rodríguez, Montiel & Tardós, T-RO 2021) closed the two gaps that remained after v2, and both are worth understanding at the mechanism level, not just the feature-list level.

Tightly coupled visual-inertial fusion. The IMU is fused as factors in the same bundle-adjustment graph as the visual reprojection errors, using IMU preintegration (Chapter 1), rather than bolted on as a separate filter. What actually earned the paper attention is the initialization: a four-stage procedure that gets an initial estimate of gyroscope bias, scale, gravity direction, accelerometer bias, and velocities in roughly two seconds of motion, refined immediately with a proper inertial-only bundle adjustment, versus the 10 to 30 seconds most contemporary visual-inertial systems needed. Chapter 4's VIO section covers why the observability problem exists in the first place; ORB-SLAM3's contribution was making the estimate usable almost immediately instead of waiting for it to slowly converge.

The Atlas. Every earlier version treated tracking loss as an emergency: freeze, enter relocalization, and hope. ORB-SLAM3 instead keeps a collection of maps, the Atlas, one active map that tracking currently writes into and any number of non-active stored maps. Lose tracking, and instead of stalling, the system simply starts a brand-new active map immediately and keeps going. Place recognition keeps running against every map in the Atlas, active or not, and the moment a keyframe in the new map matches a place from an old one, the two maps merge: a local welding bundle adjustment aligns them into one coordinate frame on the spot, and a full BA in the background cleans up the seam afterward. The practical result is a system that degrades to "start a new map" instead of "go blind," and heals the moment it recognizes familiar ground.

Versions one and two work like a single notebook: lose your page and you're stuck flipping through it hoping to recognize where you left off. The Atlas is a stack of notebooks: lose your page, grab a fresh one and keep writing, and the moment a sketch on the new page matches an old notebook, staple them together and treat them as one book from then on.
The Atlas is the single biggest practical reason to prefer ORB-SLAM3 over v2 even outside visual-inertial use: it turns "tracking lost" from a mapping-session-ending event into a brief, self-healing interruption, monocular or not, IMU or not.

6.6The Wider Family: Forks, Clean-Room Rewrites, Dynamic-Scene Variants

ORB-SLAM's influence extends well past the three official releases, and knowing the family tree signals you've looked past the headline repo.

  • stella_vslam (formerly OpenVSLAM, Sumikura, Shibuya & Sakurada, ACM Multimedia 2019): a clean-room reimplementation of the same feature-based, bag-of-words, covisibility-graph recipe, adding first-class support for fisheye and equirectangular (360°) cameras. OpenVSLAM was pulled from GitHub in 2020 after its maintainers cited patent concerns tied to the original ORB-SLAM patent held by the Universidad de Zaragoza; the community picked it back up under a new name and a clarified license, and stella_vslam is the one to clone today.
  • DynaSLAM (Bescos, Fácil, Civera & Neira, RA-L 2018): built directly on ORB-SLAM2, adds a Mask R-CNN segmentation pass that detects and masks out dynamic objects (people, vehicles) before they ever reach feature matching, and can inpaint the resulting holes in the background using earlier frames. The system this chapter and Chapter 5 both build assumes a mostly static world; DynaSLAM is the concrete answer for when that assumption breaks.
  • UcoSLAM (Muñoz-Salinas & Medina-Carnicer, Pattern Recognition 2020): fuses ORB-style natural features with square fiducial markers (ArUco) in the same map, so a handful of printed markers in a warehouse or lab dramatically speed up initialization and relocalization, at the cost of needing to place markers at all.
  • Community forks of ORB-SLAM3 add pieces the official repo doesn't ship: Python bindings for scripting and dataset experiments, and integrations with newer feature front-ends like SuperPoint in place of ORB. None are official, so pin a commit and read the fork's own test results before trusting it in anything that matters.

6.7Choosing a Version in 2026, and the License You're Actually Agreeing To

SituationReach ForBecause
Learning the codebase, reading the original ideasORB-SLAM (v1)Smallest, cleanest read; monocular only keeps the initialization logic front and center
Stereo or RGB-D rig, no IMU, CPU onlyORB-SLAM2Purpose-built for exactly this, plus a mature localization mode for deployment
Any visual-inertial rig, or anything that might lose trackingORB-SLAM3Only version with tight IMU fusion and the Atlas's self-healing recovery
Fisheye or 360° camera, no interest in IMU fusionstella_vslamFirst-class support for camera models ORB-SLAM3's pinhole/fisheye pair doesn't cover
Crowded, people-filled indoor spaceDynaSLAM on ORB-SLAM2The dynamic-object masking neither official version attempts
Shipping inside a closed-source productNone of the above, unmodifiedSee the license note below before you fall in love with any of them

Every official release, ORB-SLAM through ORB-SLAM3, is GPLv3, and the README of each repository adds a second, separate warning on top: the underlying algorithm is patented by the Universidad de Zaragoza, and the authors explicitly ask anyone wanting to use it commercially to contact them for a license, independent of the GPL question entirely. That is two separate reasons a shipped closed-source product cannot simply vendor this code and move on: GPLv3's copyleft obligations, and a patent that GPL compliance does nothing to clear. This is exactly the story that got OpenVSLAM pulled from GitHub in section 6.6. Chapter 4's licence check applies here with an extra layer; read it before any of this goes near a product roadmap.

Setup A: Build ORB-SLAM2, Run RGB-D on TUM fr1/desk. Goal: get the older, simpler, three-sensor codebase running end to end, and see the classic academic entry point to visual SLAM. Prereqs: Ubuntu 22.04, OpenCV ≥ 3.0 (2.4 also works), Eigen3, Pangolin built from source (Chapter 4's Setup box has the exact commands), ~2 GB disk.

sudo apt install build-essential cmake libeigen3-dev libopencv-dev libglew-dev
git clone https://github.com/raulmur/ORB_SLAM2.git && cd ORB_SLAM2
chmod +x build.sh && ./build.sh   # builds Thirdparty/DBoW2, Thirdparty/g2o, then the main library

# dataset: TUM RGB-D fr1/desk, a short handheld desk-scanning sequence
wget https://cvg.cit.tum.de/rgbd/dataset/freiburg1/rgbd_dataset_freiburg1_desk.tgz
mkdir -p ~/tum/fr1_desk && tar -xzf rgbd_dataset_freiburg1_desk.tgz -C ~/tum/fr1_desk --strip-components=1

# associate color and depth frames by timestamp (TUM's own tool)
wget https://cvg.cit.tum.de/_media/data/datasets/rgbd-dataset/tools/associate.py
python3 associate.py ~/tum/fr1_desk/rgb.txt ~/tum/fr1_desk/depth.txt > ~/tum/fr1_desk/associations.txt
./Examples/RGB-D/rgbd_tum \
  Vocabulary/ORBvoc.txt \
  Examples/RGB-D/TUM1.yaml \
  ~/tum/fr1_desk \
  ~/tum/fr1_desk/associations.txt

Expected: the Pangolin viewer opens showing the sparse point map growing and the current frame's tracked ORB features in green; vocabulary loading takes several seconds before the first frame (ORB-SLAM2's ORBvoc.txt is a large plain-text file, section 6.8 explains why this got faster in v3's binary format). When the sequence ends, CameraTrajectory.txt and KeyFrameTrajectory.txt land in TUM format in the working directory, ready for Chapter 8's evo scoring; a healthy fr1/desk run lands in the low centimeters ATE.

Sanity checks: (1) if rgbd_tum immediately exits complaining about the vocabulary, confirm you ran it from the repo root, since the path Vocabulary/ORBvoc.txt is relative; (2) a viewer that opens but shows nothing moving usually means the associations file is empty, check that associate.py actually found timestamp matches; (3) tracking that never leaves "Not Initialized" on a monocular run (not this setup, but the failure carries over) means there wasn't enough parallax, translate the camera sideways rather than rotating it during the first few seconds.

Setup B: ORB-SLAM3, Save the Map, Come Back and Reuse It. Goal: build the current release and exercise the Atlas's persistence, saving a map from one run and loading it as a ready-made non-active map in the next, the ORB-SLAM3 analogue of Chapter 5's localization-mode setup. Prereqs: Setup A's dependencies, plus this repo builds its own Pangolin-linked viewer the same way.

git clone https://github.com/UZ-SLAMLab/ORB_SLAM3.git && cd ORB_SLAM3
chmod +x build.sh && ./build.sh

# dataset: TUM RGB-D fr3/long_office_household, the same sequence Chapter 5 used
# for a headless RTAB-Map run, so both chapters' results are directly comparable
wget https://cvg.cit.tum.de/rgbd/dataset/freiburg3/rgbd_dataset_freiburg3_long_office_household.tgz
mkdir -p ~/tum/fr3_office && tar -xzf rgbd_dataset_freiburg3_long_office_household.tgz -C ~/tum/fr3_office --strip-components=1
python3 associate.py ~/tum/fr3_office/rgb.txt ~/tum/fr3_office/depth.txt > ~/tum/fr3_office/associations.txt

Open Examples/RGB-D/TUM3.yaml and add one line to the System section to save the Atlas on exit:

System.SaveAtlasToFile: "office_session"
# first run: builds the map and writes office_session.osa on a clean shutdown
./Examples/RGB-D/rgbd_tum \
  Vocabulary/ORBvoc.txt \
  Examples/RGB-D/TUM3.yaml \
  ~/tum/fr3_office \
  ~/tum/fr3_office/associations.txt

Let it run the full sequence, walk the same loop the RTAB-Map setup did, then close the viewer window; ORB-SLAM3 traps the shutdown and flushes office_session.osa into the working directory. Now edit the yaml a second time: comment out SaveAtlasToFile and add System.LoadAtlasFromFile: "office_session", then run the exact same command again, ideally starting the playback partway into the sequence or from a different pose. Expected: the viewer comes up with the previously mapped points already rendered as a non-active map, the new run's active map starts empty, and the instant a live frame matches a keyframe from the loaded map, the console reports a merge, the two coordinate frames weld together, and tracking continues inside the familiar map instead of building a redundant second copy from scratch.

Sanity checks: (1) no merge ever happens: confirm the second run actually revisits geometry the first run saw, since the Atlas only merges on a genuine place-recognition match, not on proximity in time; (2) .osa file never appears: the shutdown must be clean, killing the process with kill -9 skips the save, close the viewer window or let the sequence run out; (3) if you want to compare against Chapter 5's RTAB-Map run on this same sequence, export both trajectories in TUM format and score them with the same evo invocation from Chapter 8, matching ORB-SLAM3's ATE against RTAB-Map's on identical data is the single most concrete way to internalize "RTAB-Map wins at usable maps, ORB-SLAM3 wins at trajectory accuracy" from Chapter 5.

6.8Field-Tested Gotchas

1. Pure rotation kills monocular initialization. The homography/fundamental-matrix model selection from section 6.5 needs translational parallax to triangulate anything; rotate the camera in place during startup and the system sits in "Not Initialized" indefinitely. Translate sideways or forward for the first second of any monocular run.

2. Vocabulary loading time is a real UX problem, and it got fixed once. ORB-SLAM and ORB-SLAM2 load ORBvoc.txt, a plain-text file, which takes 10 to 20 seconds on a modest machine before the first frame is even processed. ORB-SLAM3 ships a binary ORBvoc.txt.bin alternative that loads in roughly a second; if you're scripting many short runs (batch benchmarking, for instance), converting to the binary vocabulary format is worth the one-time cost.

3. A GPLv3 dependency graph that bites twice. Beyond the license and patent warning in section 6.7, the bundled Thirdparty/DBoW2 and Thirdparty/g2o are themselves separately licensed (BSD-ish, with their own attribution terms); a from-scratch build that swaps in system-installed g2o instead of the bundled thirdparty copy is a common source of silent API-mismatch build failures, since the bundled g2o is an old pinned fork, not upstream g2o.

4. Tracking lost, and no Atlas to catch it, means the session is over. On ORB-SLAM and ORB-SLAM2, once relocalization fails to find a bag-of-words match, there is no fallback; the map simply stops growing until the camera returns to recognized territory. Budget for this explicitly on v1/v2 deployments: know what "lost" looks like in your logs and have a recovery procedure, because the software does not have one built in the way v3's Atlas does.

5. Real-time is a CPU-core promise, not a magic one. ORB-SLAM comfortably runs at 30 fps on a single modern CPU core for tracking, but Local Mapping and Loop Closing each want their own thread to avoid stalling Tracking; on a dual-core SBC, expect Local Mapping to fall behind under fast motion, growing a backlog of un-processed keyframes that eventually shows up as sluggish map growth.

6. RGB-D depth scale is a silent unit bug waiting to happen. The TUM RGB-D yaml configs set DepthMapFactor to match that dataset's 16-bit PNG depth encoding (5000 counts per meter); point the same executable at a different RGB-D source with a different depth encoding and unadjusted factor, and every map point lands at the wrong metric scale while looking perfectly plausible in the viewer. Check this value first whenever RGB-D SLAM output is subtly, uniformly wrong.

7. Repetitive scenes cause the same false-loop-closure risk Chapter 5 covers for RTAB-Map. Geometric verification catches most bad bag-of-words candidates, but a warehouse of identical racking can still occasionally pass RANSAC by chance. ORB-SLAM3 raises the bar by requiring consistency across several consecutive keyframes before accepting a candidate; v1/v2 lean more heavily on the inlier-count threshold alone, so raise it in repetitive environments rather than trusting the default.

8. Fisheye in ORB-SLAM3 is a specific, narrower thing than "wide lens." The Kannala-Brandt model ORB-SLAM3 supports is calibrated the same careful way Chapter 2 describes for any lens; a rough approximation of your fisheye's distortion parameters produces a map that looks fine near the image center and warps steadily worse toward the edges, which is easy to misread as a tracking problem when it's a calibration one.

6.9Reading List, in Priority Order

ORB-SLAM: A Versatile and Accurate Monocular SLAM SystemMur-Artal, Montiel, Tardós · IEEE T-RO 2015 · arXiv:1502.00956Read this one first regardless of which version you'll run; it's the cleanest statement of the shared skeleton. ORB-SLAM2: An Open-Source SLAM System for Monocular, Stereo, and RGB-D CamerasMur-Artal, Tardós · IEEE T-RO 2017 · arXiv:1610.06475Short relative to the others; mostly explains how stereo/RGB-D initialization replaces the monocular parallax dance. ORB-SLAM3: An Accurate Open-Source Library for Visual, Visual-Inertial and Multi-Map SLAMCampos, Elvira, Rodríguez, Montiel, Tardós · IEEE T-RO 2021 · arXiv:2007.11898The Atlas section and the fast IMU initialization section are the two parts worth reading twice. ORB: An Efficient Alternative to SIFT or SURFRublee, Rabaud, Konolige, Bradski · ICCV 2011The feature itself, independent of any SLAM system built on top of it. Bags of Binary Words for Fast Place Recognition in Image SequencesGálvez-López, Tardós · IEEE T-RO 2012DBoW2 itself; read alongside Chapter 5's RTAB-Map place-recognition section to see the same idea built two different ways. OpenVSLAM: A Versatile Visual SLAM FrameworkSumikura, Shibuya, Sakurada · ACM Multimedia 2019 · arXiv:1910.01122 · maintained today as stella_vslamThe clean-room rewrite; read the fisheye/equirectangular camera model sections if your rig isn't a plain pinhole. DynaSLAM: Tracking, Mapping, and Inpainting in Dynamic ScenesBescos, Fácil, Civera, Neira · RA-L 2018 · arXiv:1806.05620What to reach for the day this chapter's static-world assumption stops holding.

6.10Interview Questions, Answer Out Loud First

ORB-SLAM, ORB-SLAM2, ORB-SLAM3: what changed at each step, in one breath each?

ORB-SLAM proved the whole loop, tracking, local mapping, loop closing, relocalization, could run in real time on a CPU with monocular ORB features and DBoW2. ORB-SLAM2 generalized the same skeleton to stereo and RGB-D by swapping in sensor-appropriate initialization, and added a localization-only mode for deployment. ORB-SLAM3 tightly fused an IMU with a fast initialization scheme, added fisheye support, and replaced "tracking lost equals emergency" with the Atlas, a collection of maps that merges automatically on recognition. Say it in that order and you've demonstrated you understand it as an evolving argument, not three unrelated repos.

Why does the Atlas make ORB-SLAM3 meaningfully more robust than v1 or v2, independent of the IMU?

Because tracking loss stops being fatal to the session. In v1 and v2, losing tracking means the system sits in relocalization, contributing nothing to the map, until it happens to recognize a place it already knows. In v3, losing tracking simply starts a fresh active map immediately, so mapping continues uninterrupted, and place recognition keeps searching every stored map in the background; the moment it finds a match, a welding bundle adjustment merges the new map into the old one's coordinate frame. The IMU makes the fusion better in visual-inertial mode, but the Atlas's resilience to tracking loss is a monocular-camera-only win too.

Covisibility graph versus essential graph: why maintain two data structures instead of one?

They serve opposite ends of a speed/completeness trade-off. The covisibility graph is dense, an edge for every keyframe pair sharing at least 15 points, and answers "what's relevant to the current view" cheaply for tracking and local BA. The essential graph is deliberately sparse, a spanning tree plus loop edges plus only the strongest covisibility edges, and exists so that a loop-closure pose-graph optimization touches as few variables as possible while still staying globally connected. Optimizing the sparse graph gives an instant, visible correction; the expensive full bundle adjustment that refines actual point positions runs afterward, in the background, so nothing blocks on it.

Walk through exactly what happens when a loop closure is detected.

A new keyframe's bag-of-words signature scores above threshold against a stored place. First, geometric verification: match ORB descriptors between the two keyframes and solve a relative pose with RANSAC, requiring enough inliers to accept. Once accepted, compute the relative transform, Sim3 for monocular since scale itself has drifted, SE3 for stereo, RGB-D, or any IMU-fused mode since scale is already metric. Propagate that correction instantly through the essential graph, a sparse pose-graph optimization that snaps the whole trajectory into consistency in milliseconds. Finally, launch a full bundle adjustment over every keyframe and point in a background thread, refining the corrected map fully without blocking tracking or local mapping, which keep running on the just-corrected poses in the meantime.

Why Sim3 for monocular loop closure but SE3 for stereo, RGB-D, or visual-inertial?

A single camera cannot observe metric scale directly, so a monocular map's scale itself drifts over a long trajectory the same way its pose does, and correcting only the pose while ignoring accumulated scale drift would leave the map internally inconsistent. Sim3 adds the seventh degree of freedom, scale, to the six of SE3, so the loop-closure correction fixes both at once. Stereo triangulates real metric depth from a known baseline every frame, RGB-D reads metric depth directly from the sensor, and visual-inertial mode gets scale observable from the accelerometer, so none of those three ever accumulate scale drift in the first place, and SE3 is the correct, sufficient group.

What does ORB-SLAM3's IMU initialization actually do differently from a typical VIO stack?

Most visual-inertial systems wait 10 to 30 seconds of excited motion before trusting scale, gravity, and biases, treating the initial estimate as fragile until enough evidence accumulates. ORB-SLAM3 instead runs a staged procedure, first estimating gyroscope bias, then scale and gravity direction via a linear estimate, then refining all of it, scale, gravity, velocities, and both biases, in a proper inertial-only bundle adjustment, and gets a usable estimate in roughly two seconds. The key idea is treating initialization itself as an optimization problem to be solved well and fast, rather than a convergence process to be waited out; Chapter 1's factor-graph material and Chapter 4's VIO observability discussion are the prerequisites for why this problem is hard at all.

Your team wants to ship ORB-SLAM3 inside a closed-source product. What do you tell them?

Two separate blockers, not one. First, GPLv3: linking it into a distributed closed-source binary triggers copyleft obligations the product almost certainly can't accept. Second, and this surprises people, a patent held by the Universidad de Zaragoza covers the underlying algorithm, and the repository's own README explicitly says to contact the authors for a commercial license, independent of resolving the GPL question. Clearing the license doesn't clear the patent, and vice versa. The realistic paths: negotiate a commercial license directly, or evaluate a genuinely independent alternative, era-3 learned pipelines from Chapter 4 or a clean-room system, understanding that "clean-room" itself doesn't automatically clear a patent claim either, which is exactly the fight that got OpenVSLAM pulled from GitHub.