# claritylab-org/jetson-orb-slam3 architecture

> Architecture diagram of the GitHub repository claritylab-org/jetson-orb-slam3, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/claritylab-org/jetson-orb-slam3
- Repository: https://github.com/claritylab-org/jetson-orb-slam3

## Overview

Jetson-ORB-SLAM3 is a GPU-accelerated visual/inertial SLAM system. Sensor or dataset frames enter through System and Tracking; feature extraction and matching support pose tracking and initialization, then local mapping maintains the map while loop closing detects revisits and corrects it. Optimization and camera geometry support these stages, and the system can display results and export trajectories. The README also documents CPU extraction, overlapped feature extraction, and optional TensorRT/CNN place recognition. The tree and excerpts support the principal modules, but do not establish every internal call; uncertain wiring is omitted.

Main entry points: [`src/Tracking.cc`](https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/Tracking.cc) (Frame Tracking), [`src/LocalMapping.cc`](https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/LocalMapping.cc) (Local Mapping), [`src/LoopClosing.cc`](https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/LoopClosing.cc) (Loop Closing), [`src/System.cc`](https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/System.cc) (SLAM System)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_front["Tracking Front End"]
  node_system["SLAM System<br/>[System.cc]"]
  node_tracking["Frame Tracking<br/>[Tracking.cc]"]
  node_frame["Frame State<br/>[Frame.cc]"]
  node_orb["ORB Extractor<br/>[ORBextractor.cc]"]
  node_gpu["CUDA ORB<br/>[orb_gpu.cpp]"]
  node_pipeline["Pipelined Features"]
  node_matcher["Feature Matching<br/>[ORBmatcher.cc]"]
  node_init["Two-View Init"]
end

subgraph group_map["Mapping and Closure"]
  node_local["Local Mapping<br/>[LocalMapping.cc]"]
  node_atlas["Atlas<br/>[Atlas.cc]"]
  node_mapstate["Map State<br/>[Map.cc]"]
  node_keyframe["Keyframes<br/>[KeyFrame.cc]"]
  node_mappoint["Map Points<br/>[MapPoint.cc]"]
  node_database[("Keyframe Index")]
  node_loop["Loop Closing<br/>[LoopClosing.cc]"]
  node_vocab["ORB Vocabulary"]
  node_cnn["CNN Place Recognition"]
end

subgraph group_core["Geometry and Optimization"]
  node_camera["Camera Models<br/>[KannalaBrandt8.cpp]"]
  node_optimizer["Graph Optimizer<br/>[Optimizer.cc]"]
  node_g2o["g2o Solver<br/>[sparse_optimizer.h]"]
end

subgraph group_outputs["Results and Interfaces"]
  node_viewer["Viewer<br/>[Viewer.cc]"]
  node_draw["Map Display<br/>[MapDrawer.cc]"]
  node_trajectory["Trajectory Files"]
end

node_input(("Camera / IMU"))
node_display(("Display"))
node_engine["TensorRT Engine"]

node_input -->|"supplies frames"| node_system
node_system -->|"dispatches tracking"| node_tracking
node_tracking -->|"builds frame state"| node_frame
node_tracking -->|"extracts features"| node_orb
node_orb -->|"runs CUDA kernels"| node_gpu
node_tracking -.->|"overlaps extraction"| node_pipeline
node_tracking -->|"matches features"| node_matcher
node_tracking -->|"initializes map"| node_init
node_tracking -->|"projects observations"| node_camera
node_tracking -->|"updates atlas"| node_atlas
node_local -->|"updates map"| node_mapstate
node_local -->|"adds keyframes"| node_keyframe
node_local -->|"adds landmarks"| node_mappoint
node_local -->|"optimizes map"| node_optimizer
node_loop -->|"queries candidates"| node_database
node_loop -.->|"retrieves places"| node_cnn
node_loop -.->|"loads engine"| node_engine
node_loop -->|"corrects map"| node_optimizer
node_database -->|"scores words"| node_vocab
node_optimizer -->|"solves graph"| node_g2o
node_system -->|"starts viewer"| node_viewer
node_viewer -->|"renders map"| node_draw
node_viewer -->|"shows view"| node_display
node_system -->|"writes trajectory"| node_trajectory

click node_system "https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/System.cc"
click node_tracking "https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/Tracking.cc"
click node_frame "https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/Frame.cc"
click node_orb "https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/ORBextractor.cc"
click node_gpu "https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/cuda/orb_gpu.cpp"
click node_pipeline "https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/ORBextractor_gpu.cpp"
click node_matcher "https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/ORBmatcher.cc"
click node_init "https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/TwoViewReconstruction.cc"
click node_local "https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/LocalMapping.cc"
click node_atlas "https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/Atlas.cc"
click node_mapstate "https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/Map.cc"
click node_keyframe "https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/KeyFrame.cc"
click node_mappoint "https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/MapPoint.cc"
click node_database "https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/KeyFrameDatabase.cc"
click node_loop "https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/LoopClosing.cc"
click node_vocab "https://github.com/claritylab-org/jetson-orb-slam3/blob/main/Thirdparty/DBoW2/DBoW2/TemplatedVocabulary.h"
click node_cnn "https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/CNNLoopDetector.cpp"
click node_camera "https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/CameraModels/KannalaBrandt8.cpp"
click node_optimizer "https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/Optimizer.cc"
click node_g2o "https://github.com/claritylab-org/jetson-orb-slam3/blob/main/Thirdparty/g2o/g2o/core/sparse_optimizer.h"
click node_viewer "https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/Viewer.cc"
click node_draw "https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/MapDrawer.cc"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_system,node_tracking,node_frame,node_orb,node_gpu,node_pipeline,node_matcher,node_init toneBlue
class node_local,node_atlas,node_mapstate,node_keyframe,node_mappoint,node_database,node_loop,node_vocab,node_cnn toneAmber
class node_camera,node_optimizer,node_g2o toneMint
class node_viewer,node_draw,node_trajectory toneRose
class node_input,node_display,node_engine toneIndigo
```

## Components

### Tracking Front End

- [SLAM System](https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/System.cc): `src/System.cc`
- [Frame Tracking](https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/Tracking.cc): `src/Tracking.cc`
- [Frame State](https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/Frame.cc): `src/Frame.cc`
- [ORB Extractor](https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/ORBextractor.cc): `src/ORBextractor.cc`
- [CUDA ORB](https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/cuda/orb_gpu.cpp): `src/cuda/orb_gpu.cpp`
- [Pipelined Features](https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/ORBextractor_gpu.cpp): `src/ORBextractor_gpu.cpp`
- [Feature Matching](https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/ORBmatcher.cc): `src/ORBmatcher.cc`
- [Two-View Init](https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/TwoViewReconstruction.cc): `src/TwoViewReconstruction.cc`

### Mapping and Closure

- [Local Mapping](https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/LocalMapping.cc): `src/LocalMapping.cc`
- [Atlas](https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/Atlas.cc): `src/Atlas.cc`
- [Map State](https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/Map.cc): `src/Map.cc`
- [Keyframes](https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/KeyFrame.cc): `src/KeyFrame.cc`
- [Map Points](https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/MapPoint.cc): `src/MapPoint.cc`
- [Keyframe Index](https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/KeyFrameDatabase.cc): `src/KeyFrameDatabase.cc`
- [Loop Closing](https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/LoopClosing.cc): `src/LoopClosing.cc`
- [ORB Vocabulary](https://github.com/claritylab-org/jetson-orb-slam3/blob/main/Thirdparty/DBoW2/DBoW2/TemplatedVocabulary.h): `Thirdparty/DBoW2/DBoW2/TemplatedVocabulary.h`
- [CNN Place Recognition](https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/CNNLoopDetector.cpp): `src/CNNLoopDetector.cpp`

### Geometry and Optimization

- [Camera Models](https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/CameraModels/KannalaBrandt8.cpp): `src/CameraModels/KannalaBrandt8.cpp`
- [Graph Optimizer](https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/Optimizer.cc): `src/Optimizer.cc`
- [g2o Solver](https://github.com/claritylab-org/jetson-orb-slam3/blob/main/Thirdparty/g2o/g2o/core/sparse_optimizer.h): `Thirdparty/g2o/g2o/core/sparse_optimizer.h`

### Results and Interfaces

- [Viewer](https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/Viewer.cc): `src/Viewer.cc`
- [Map Display](https://github.com/claritylab-org/jetson-orb-slam3/blob/main/src/MapDrawer.cc): `src/MapDrawer.cc`
- **Trajectory Files**

### Other components

- **Camera / IMU**
- **Display**
- **TensorRT Engine**

## Connections

- Camera / IMU → SLAM System: supplies frames
- SLAM System → Frame Tracking: dispatches tracking
- Frame Tracking → Frame State: builds frame state
- Frame Tracking → ORB Extractor: extracts features
- ORB Extractor → CUDA ORB: runs CUDA kernels
- Frame Tracking → Pipelined Features: overlaps extraction
- Frame Tracking → Feature Matching: matches features
- Frame Tracking → Two-View Init: initializes map
- Frame Tracking → Camera Models: projects observations
- Frame Tracking → Atlas: updates atlas
- Local Mapping → Map State: updates map
- Local Mapping → Keyframes: adds keyframes
- Local Mapping → Map Points: adds landmarks
- Local Mapping → Graph Optimizer: optimizes map
- Loop Closing → Keyframe Index: queries candidates
- Loop Closing → CNN Place Recognition: retrieves places
- Loop Closing → TensorRT Engine: loads engine
- Loop Closing → Graph Optimizer: corrects map
- Keyframe Index → ORB Vocabulary: scores words
- Graph Optimizer → g2o Solver: solves graph
- SLAM System → Viewer: starts viewer
- Viewer → Map Display: renders map
- Viewer → Display: shows view
- SLAM System → Trajectory Files: writes trajectory
