# hzai-zjnu/duag-slam architecture

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

- Interactive diagram: https://gitdiagram.com/hzai-zjnu/duag-slam
- Repository: https://github.com/hzai-zjnu/duag-slam

## Overview

DUAG-C runs independent RGB-D Gaussian-SLAM per robot, then uses inter-robot loop closures to align poses and fuse matched map elements with Fisher-information weighting. The main runtime entry is the experiment runner; each RobotNode owns frame processing, message handling, and consensus dispatch. The README also documents dataset loading, uncertainty estimation, real-time visualization, and result analysis. Some of those branches are represented at their documented directory or module level because their implementation was not excerpted.

Main entry points: [`core/pipeline/robot_node.py`](https://github.com/hzai-zjnu/duag-slam/blob/main/core/pipeline/robot_node.py) (Robot orchestration), [`experiments/run_duag_c.py`](https://github.com/hzai-zjnu/duag-slam/blob/main/experiments/run_duag_c.py) (Experiment runner), [`core/pipeline/local_slam_wrapper.py`](https://github.com/hzai-zjnu/duag-slam/blob/main/core/pipeline/local_slam_wrapper.py) (Local SLAM), [`extracted/gs_slam/renderer.py`](https://github.com/hzai-zjnu/duag-slam/blob/main/extracted/gs_slam/renderer.py) (Gaussian renderer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Experiment runtime"]
  node_runner["Experiment runner<br/>[run_duag_c.py]"]
  node_datasets["Dataset loading<br/>[data_loaders.py]"]
  node_robot["Robot orchestration<br/>[robot_node.py]"]
  node_types["Map and pose types<br/>[types.py]"]
end

subgraph group_mapping["Local mapping"]
  node_local_slam["Local SLAM"]
  node_gaussian_model["Gaussian map model<br/>[gaussian_model.py]"]
  node_renderer["Gaussian renderer<br/>[renderer.py]"]
  node_rasterizer["CUDA rasterizer"]
end

subgraph group_consensus["Decentralized consensus"]
  node_loop_matching["Loop closure matching<br/>[matching.py]"]
  node_admm["Riemannian ADMM<br/>[riemannian_admm.py]"]
  node_lie["SE3 Lie algebra<br/>[lie_algebra.py]"]
  node_gaussian_consensus["Gaussian map fusion"]
  node_convergence["Consensus convergence<br/>[convergence.py]"]
end

subgraph group_support["Uncertainty and communication"]
  node_fim["FIM estimation"]
  node_uncertainty["Uncertainty propagation<br/>[propagation.py]"]
  node_communication["Robot communication"]
end

subgraph group_results["Visualization and results"]
  node_viewer["Live visualization<br/>[realtime_viewer.py]"]
  node_analysis["Result analysis<br/>[analyze_results.py]"]
end

node_operator(("Experiment operator"))

node_operator -->|"runs"| node_runner
node_runner -->|"creates agents"| node_robot
node_runner -->|"configures"| node_local_slam
node_runner -->|"enables"| node_viewer
node_runner -.->|"loads sequences"| node_datasets
node_robot -->|"processes frames"| node_local_slam
node_robot -->|"receives messages"| node_communication
node_robot -->|"dispatches matching"| node_loop_matching
node_robot -->|"updates poses"| node_admm
node_robot -->|"fuses maps"| node_gaussian_consensus
node_robot -->|"checks convergence"| node_convergence
node_local_slam -->|"updates map"| node_gaussian_model
node_local_slam -->|"renders views"| node_renderer
node_renderer -->|"reads Gaussians"| node_gaussian_model
node_renderer -->|"rasterizes"| node_rasterizer
node_local_slam -.->|"estimates uncertainty"| node_fim
node_gaussian_consensus -->|"matches Gaussians"| node_loop_matching
node_gaussian_consensus -->|"weights fusion"| node_uncertainty
node_admm -->|"uses SE3 operations"| node_lie
node_admm -->|"uses pose uncertainty"| node_uncertainty
node_uncertainty -->|"uses transforms"| node_lie
node_robot -->|"stores map state"| node_types
node_runner -.->|"analyzes outputs"| node_analysis

click node_runner "https://github.com/hzai-zjnu/duag-slam/blob/main/experiments/run_duag_c.py"
click node_datasets "https://github.com/hzai-zjnu/duag-slam/blob/main/experiments/data_loaders.py"
click node_robot "https://github.com/hzai-zjnu/duag-slam/blob/main/core/pipeline/robot_node.py"
click node_types "https://github.com/hzai-zjnu/duag-slam/blob/main/core/types.py"
click node_local_slam "https://github.com/hzai-zjnu/duag-slam/blob/main/core/pipeline/local_slam_wrapper.py"
click node_gaussian_model "https://github.com/hzai-zjnu/duag-slam/blob/main/extracted/gs_slam/gaussian_model.py"
click node_renderer "https://github.com/hzai-zjnu/duag-slam/blob/main/extracted/gs_slam/renderer.py"
click node_rasterizer "https://github.com/hzai-zjnu/duag-slam/tree/main/extracted/gs_slam/rasterizer"
click node_fim "https://github.com/hzai-zjnu/duag-slam/blob/main/core/uncertainty/hessian_estimator.py"
click node_uncertainty "https://github.com/hzai-zjnu/duag-slam/blob/main/core/uncertainty/propagation.py"
click node_communication "https://github.com/hzai-zjnu/duag-slam/tree/main/extracted/swarm_comm"
click node_loop_matching "https://github.com/hzai-zjnu/duag-slam/blob/main/core/consensus/matching.py"
click node_admm "https://github.com/hzai-zjnu/duag-slam/blob/main/core/consensus/riemannian_admm.py"
click node_lie "https://github.com/hzai-zjnu/duag-slam/blob/main/core/consensus/lie_algebra.py"
click node_gaussian_consensus "https://github.com/hzai-zjnu/duag-slam/blob/main/core/consensus/gaussian_consensus.py"
click node_convergence "https://github.com/hzai-zjnu/duag-slam/blob/main/core/consensus/convergence.py"
click node_viewer "https://github.com/hzai-zjnu/duag-slam/blob/main/core/visualization/realtime_viewer.py"
click node_analysis "https://github.com/hzai-zjnu/duag-slam/blob/main/experiments/analyze_results.py"

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_runner,node_datasets,node_robot,node_types toneBlue
class node_local_slam,node_gaussian_model,node_renderer,node_rasterizer toneAmber
class node_loop_matching,node_admm,node_lie,node_gaussian_consensus,node_convergence toneMint
class node_fim,node_uncertainty,node_communication toneRose
class node_viewer,node_analysis,node_operator toneIndigo
```

## Components

### Experiment runtime

- [Experiment runner](https://github.com/hzai-zjnu/duag-slam/blob/main/experiments/run_duag_c.py): `experiments/run_duag_c.py`
- [Dataset loading](https://github.com/hzai-zjnu/duag-slam/blob/main/experiments/data_loaders.py): `experiments/data_loaders.py`
- [Robot orchestration](https://github.com/hzai-zjnu/duag-slam/blob/main/core/pipeline/robot_node.py): `core/pipeline/robot_node.py`
- [Map and pose types](https://github.com/hzai-zjnu/duag-slam/blob/main/core/types.py): `core/types.py`

### Local mapping

- [Local SLAM](https://github.com/hzai-zjnu/duag-slam/blob/main/core/pipeline/local_slam_wrapper.py): `core/pipeline/local_slam_wrapper.py`
- [Gaussian map model](https://github.com/hzai-zjnu/duag-slam/blob/main/extracted/gs_slam/gaussian_model.py): `extracted/gs_slam/gaussian_model.py`
- [Gaussian renderer](https://github.com/hzai-zjnu/duag-slam/blob/main/extracted/gs_slam/renderer.py): `extracted/gs_slam/renderer.py`
- [CUDA rasterizer](https://github.com/hzai-zjnu/duag-slam/tree/main/extracted/gs_slam/rasterizer): `extracted/gs_slam/rasterizer`

### Decentralized consensus

- [Loop closure matching](https://github.com/hzai-zjnu/duag-slam/blob/main/core/consensus/matching.py): `core/consensus/matching.py`
- [Riemannian ADMM](https://github.com/hzai-zjnu/duag-slam/blob/main/core/consensus/riemannian_admm.py): `core/consensus/riemannian_admm.py`
- [SE3 Lie algebra](https://github.com/hzai-zjnu/duag-slam/blob/main/core/consensus/lie_algebra.py): `core/consensus/lie_algebra.py`
- [Gaussian map fusion](https://github.com/hzai-zjnu/duag-slam/blob/main/core/consensus/gaussian_consensus.py): `core/consensus/gaussian_consensus.py`
- [Consensus convergence](https://github.com/hzai-zjnu/duag-slam/blob/main/core/consensus/convergence.py): `core/consensus/convergence.py`

### Uncertainty and communication

- [FIM estimation](https://github.com/hzai-zjnu/duag-slam/blob/main/core/uncertainty/hessian_estimator.py): `core/uncertainty/hessian_estimator.py`
- [Uncertainty propagation](https://github.com/hzai-zjnu/duag-slam/blob/main/core/uncertainty/propagation.py): `core/uncertainty/propagation.py`
- [Robot communication](https://github.com/hzai-zjnu/duag-slam/tree/main/extracted/swarm_comm): `extracted/swarm_comm`

### Visualization and results

- [Live visualization](https://github.com/hzai-zjnu/duag-slam/blob/main/core/visualization/realtime_viewer.py): `core/visualization/realtime_viewer.py`
- [Result analysis](https://github.com/hzai-zjnu/duag-slam/blob/main/experiments/analyze_results.py): `experiments/analyze_results.py`

### Other components

- **Experiment operator**

## Connections

- Experiment operator → Experiment runner: runs (evidence: `README.md`)
- Experiment runner → Robot orchestration: creates agents (evidence: `experiments/run_duag_c.py`)
- Experiment runner → Local SLAM: configures (evidence: `experiments/run_duag_c.py`)
- Experiment runner → Live visualization: enables (evidence: `experiments/run_duag_c.py`)
- Experiment runner → Dataset loading: loads sequences (evidence: `README.md`)
- Robot orchestration → Local SLAM: processes frames (evidence: `core/pipeline/robot_node.py`)
- Robot orchestration → Robot communication: receives messages (evidence: `core/pipeline/robot_node.py`)
- Robot orchestration → Loop closure matching: dispatches matching (evidence: `core/pipeline/robot_node.py`)
- Robot orchestration → Riemannian ADMM: updates poses (evidence: `core/pipeline/robot_node.py`)
- Robot orchestration → Gaussian map fusion: fuses maps (evidence: `core/pipeline/robot_node.py`)
- Robot orchestration → Consensus convergence: checks convergence (evidence: `core/pipeline/robot_node.py`)
- Local SLAM → Gaussian map model: updates map (evidence: `core/pipeline/local_slam_wrapper.py`)
- Local SLAM → Gaussian renderer: renders views (evidence: `core/pipeline/local_slam_wrapper.py`)
- Gaussian renderer → Gaussian map model: reads Gaussians (evidence: `extracted/gs_slam/renderer.py`)
- Gaussian renderer → CUDA rasterizer: rasterizes (evidence: `extracted/gs_slam/renderer.py`)
- Local SLAM → FIM estimation: estimates uncertainty (evidence: `README.md`)
- Gaussian map fusion → Loop closure matching: matches Gaussians (evidence: `core/consensus/gaussian_consensus.py`)
- Gaussian map fusion → Uncertainty propagation: weights fusion (evidence: `core/consensus/gaussian_consensus.py`)
- Riemannian ADMM → SE3 Lie algebra: uses SE3 operations (evidence: `core/consensus/riemannian_admm.py`)
- Riemannian ADMM → Uncertainty propagation: uses pose uncertainty (evidence: `core/consensus/riemannian_admm.py`)
- Uncertainty propagation → SE3 Lie algebra: uses transforms (evidence: `core/uncertainty/propagation.py`)
- Robot orchestration → Map and pose types: stores map state (evidence: `core/pipeline/robot_node.py`)
- Experiment runner → Result analysis: analyzes outputs (evidence: `README.md`)
