# halajun/vdo_slam architecture

> Architecture diagram of the GitHub repository halajun/vdo_slam, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/halajun/vdo_slam
- Repository: https://github.com/halajun/vdo_slam

## Overview

VDO-SLAM is an RGB-D visual SLAM library that combines camera tracking with static-scene and rigid-object motion estimation. Its documented workflow accepts synchronized RGB-D frames plus segmentation and optical-flow preprocessing, tracks features and objects, optimizes poses, and produces camera/object motion estimates. The graph includes the bundled g2o optimization layer and documented mask-preparation tool. Source excerpts are partial, so some capability links are based on README statements; unsampled implementation details are not expanded.

Main entry points: [`src/Tracking.cc`](https://github.com/halajun/vdo_slam/blob/master/src/Tracking.cc) (Frame tracking), [`src/Optimizer.cc`](https://github.com/halajun/vdo_slam/blob/master/src/Optimizer.cc) (Pose optimization), [`dependencies/g2o/g2o/core/optimizable_graph.cpp`](https://github.com/halajun/vdo_slam/blob/master/dependencies/g2o/g2o/core/optimizable_graph.cpp) (Optimization graph), [`src/System.cc`](https://github.com/halajun/vdo_slam/blob/master/src/System.cc) (SLAM system)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["SLAM runtime"]
  node_system["SLAM system<br/>[System.cc]"]
  node_tracking["Frame tracking<br/>[Tracking.cc]"]
end

subgraph group_scene["Scene understanding"]
  node_frame["Frame geometry<br/>[Frame.cc]"]
  node_orb["ORB features<br/>[ORBextractor.cc]"]
  node_object["Dynamic object tracking<br/>[Tracking.cc]"]
  node_scene_flow["Scene flow<br/>[Tracking.cc]"]
  node_map[("Static and dynamic map<br/>[Map.cc]")]
end

subgraph group_optimization["Pose optimization"]
  node_pose["Pose optimization<br/>[Optimizer.cc]"]
  node_g2o_graph["Optimization graph"]
  node_g2o_solver["Linear solvers"]
  node_g2o_types["SLAM graph types"]
end

subgraph group_preprocessing["Input preparation"]
  node_mask_tool["KITTI mask conversion"]
end

node_dataset(("RGB-D sequence"))
node_preprocess(("Segmentation and flow"))
node_motion_results["Camera and object motion"]

node_dataset -->|"provides frames"| node_system
node_preprocess -->|"provides masks and flow"| node_tracking
node_system -->|"dispatches tracking"| node_tracking
node_tracking -.->|"builds frames"| node_frame
node_frame -->|"extracts features"| node_orb
node_tracking -->|"tracks objects"| node_object
node_tracking -->|"computes scene flow"| node_scene_flow
node_tracking -.->|"updates map"| node_map
node_tracking -->|"requests optimization"| node_pose
node_pose -->|"configures graph"| node_g2o_graph
node_pose -->|"selects solver"| node_g2o_solver
node_pose -->|"adds graph types"| node_g2o_types
node_g2o_graph -.->|"solves system"| node_g2o_solver
node_g2o_graph -.->|"estimates motion"| node_motion_results
node_tracking -->|"returns camera pose"| node_motion_results
node_mask_tool -->|"prepares masks"| node_preprocess

click node_system "https://github.com/halajun/vdo_slam/blob/master/src/System.cc"
click node_tracking "https://github.com/halajun/vdo_slam/blob/master/src/Tracking.cc"
click node_frame "https://github.com/halajun/vdo_slam/blob/master/src/Frame.cc"
click node_orb "https://github.com/halajun/vdo_slam/blob/master/src/ORBextractor.cc"
click node_object "https://github.com/halajun/vdo_slam/blob/master/src/Tracking.cc"
click node_scene_flow "https://github.com/halajun/vdo_slam/blob/master/src/Tracking.cc"
click node_map "https://github.com/halajun/vdo_slam/blob/master/src/Map.cc"
click node_pose "https://github.com/halajun/vdo_slam/blob/master/src/Optimizer.cc"
click node_g2o_graph "https://github.com/halajun/vdo_slam/blob/master/dependencies/g2o/g2o/core/optimizable_graph.cpp"
click node_g2o_solver "https://github.com/halajun/vdo_slam/blob/master/dependencies/g2o/g2o/solvers/linear_solver_csparse.h"
click node_g2o_types "https://github.com/halajun/vdo_slam/blob/master/dependencies/g2o/g2o/types/types_six_dof_expmap.h"
click node_mask_tool "https://github.com/halajun/vdo_slam/blob/master/tools/kitti_mask_sem2gt.cpp"

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 toneBlue
class node_frame,node_orb,node_object,node_scene_flow,node_map toneAmber
class node_pose,node_g2o_graph,node_g2o_solver,node_g2o_types toneMint
class node_mask_tool toneRose
class node_dataset,node_preprocess,node_motion_results toneIndigo
```

## Components

### SLAM runtime

- [SLAM system](https://github.com/halajun/vdo_slam/blob/master/src/System.cc): `src/System.cc`
- [Frame tracking](https://github.com/halajun/vdo_slam/blob/master/src/Tracking.cc): `src/Tracking.cc`

### Scene understanding

- [Frame geometry](https://github.com/halajun/vdo_slam/blob/master/src/Frame.cc): `src/Frame.cc`
- [ORB features](https://github.com/halajun/vdo_slam/blob/master/src/ORBextractor.cc): `src/ORBextractor.cc`
- [Dynamic object tracking](https://github.com/halajun/vdo_slam/blob/master/src/Tracking.cc): `src/Tracking.cc`
- [Scene flow](https://github.com/halajun/vdo_slam/blob/master/src/Tracking.cc): `src/Tracking.cc`
- [Static and dynamic map](https://github.com/halajun/vdo_slam/blob/master/src/Map.cc): `src/Map.cc`

### Pose optimization

- [Pose optimization](https://github.com/halajun/vdo_slam/blob/master/src/Optimizer.cc): `src/Optimizer.cc`
- [Optimization graph](https://github.com/halajun/vdo_slam/blob/master/dependencies/g2o/g2o/core/optimizable_graph.cpp): `dependencies/g2o/g2o/core/optimizable_graph.cpp`
- [Linear solvers](https://github.com/halajun/vdo_slam/blob/master/dependencies/g2o/g2o/solvers/linear_solver_csparse.h): `dependencies/g2o/g2o/solvers/linear_solver_csparse.h`
- [SLAM graph types](https://github.com/halajun/vdo_slam/blob/master/dependencies/g2o/g2o/types/types_six_dof_expmap.h): `dependencies/g2o/g2o/types/types_six_dof_expmap.h`

### Input preparation

- [KITTI mask conversion](https://github.com/halajun/vdo_slam/blob/master/tools/kitti_mask_sem2gt.cpp): `tools/kitti_mask_sem2gt.cpp`

### Other components

- **RGB-D sequence**
- **Segmentation and flow**
- **Camera and object motion**

## Connections

- RGB-D sequence → SLAM system: provides frames
- Segmentation and flow → Frame tracking: provides masks and flow
- SLAM system → Frame tracking: dispatches tracking
- Frame tracking → Frame geometry: builds frames
- Frame geometry → ORB features: extracts features
- Frame tracking → Dynamic object tracking: tracks objects (evidence: `src/Tracking.cc`)
- Frame tracking → Scene flow: computes scene flow (evidence: `src/Tracking.cc`)
- Frame tracking → Static and dynamic map: updates map
- Frame tracking → Pose optimization: requests optimization (evidence: `src/Tracking.cc`)
- Pose optimization → Optimization graph: configures graph (evidence: `src/Optimizer.cc`)
- Pose optimization → Linear solvers: selects solver (evidence: `src/Optimizer.cc`)
- Pose optimization → SLAM graph types: adds graph types (evidence: `src/Optimizer.cc`)
- Optimization graph → Linear solvers: solves system
- Optimization graph → Camera and object motion: estimates motion
- Frame tracking → Camera and object motion: returns camera pose (evidence: `src/Tracking.cc`)
- KITTI mask conversion → Segmentation and flow: prepares masks
