# cwha0212/ligo. architecture

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

- Interactive diagram: https://gitdiagram.com/cwha0212/ligo.
- Repository: https://github.com/cwha0212/ligo.

## Overview

LIGO is a ROS 2 LiDAR–inertial odometry and mapping system with NMEA/PPP global positioning and indoor localization support. The documented runtime centers on processing LiDAR and IMU data, estimating motion, and optionally applying global or indoor constraints to produce mapped, globally referenced poses. The graph also preserves the documented MQTT integration. Edges are limited to relationships visible in the excerpts, SOURCE INDEX references, or README; several subsystem links are omitted because their runtime calls were not shown.

Main entry points: [`src/laserMapping.cpp`](https://github.com/cwha0212/ligo./blob/main/src/laserMapping.cpp) (Mapping Node), [`src/NMEA_Processing_fg.cpp`](https://github.com/cwha0212/ligo./blob/main/src/NMEA_Processing_fg.cpp) (NMEA Factor Graph), [`scripts/mqtt_mode_orchestrator.py`](https://github.com/cwha0212/ligo./blob/main/scripts/mqtt_mode_orchestrator.py) (MQTT Mode Orchestrator), [`include/ivox/ivox3d.h`](https://github.com/cwha0212/ligo./blob/main/include/ivox/ivox3d.h) (Incremental Voxel Map)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mapping["LiDAR Mapping"]
  node_mapping_node["Mapping Node<br/>[laserMapping.cpp]"]
  node_preprocess["Sensor Preprocessing<br/>[preprocess.cpp]"]
  node_ivox[("Incremental Voxel Map<br/>[ivox3d.h]")]
  node_ivox_node["Voxel Indexing<br/>[ivox3d_node.hpp]"]
  node_hilbert["Hilbert Indexing<br/>[hilbert.hpp]"]
end

subgraph group_fusion["State Estimation"]
  node_imu["IMU Processing<br/>[IMU_Processing.cpp]"]
  node_initialization["LIO Initialization"]
  node_estimator["State Estimator<br/>[Estimator.cpp]"]
  node_ikf["Iterated Kalman Filter<br/>[esekfom.hpp]"]
  node_manifolds["Manifold Toolkit"]
end

subgraph group_global["Global Localization"]
  node_nmea_process["NMEA Factor Graph"]
  node_nmea_assignment["NMEA Assignment"]
  node_nmea_factors["NMEA Factors<br/>[nmea_factor.hpp]"]
  node_indoor["Indoor Processing"]
  node_gicp["Indoor GICP Localizer"]
  node_grid_registry[("Indoor Map Registry")]
end

subgraph group_integration["Runtime Integration"]
  node_mqtt_orchestrator["MQTT Mode Orchestrator"]
  node_mqtt_config["MQTT Configuration<br/>[mqtt_config.py]"]
end

node_sensors(("Sensor Streams"))
node_mqtt(("MQTT Broker"))
node_pose_map(("Pose and Map Output"))

node_sensors -.->|"supplies data"| node_mapping_node
node_mapping_node -->|"uses"| node_initialization
node_mapping_node -->|"uses"| node_indoor
node_mapping_node -->|"uses"| node_grid_registry
node_mapping_node -.->|"publishes"| node_pose_map
node_preprocess -.->|"supports mapping"| node_ivox
node_ivox -->|"indexes points"| node_ivox_node
node_ivox_node -->|"uses indexing"| node_hilbert
node_imu -.->|"provides motion data"| node_estimator
node_estimator -.->|"uses filter"| node_ikf
node_ikf -->|"uses state types"| node_manifolds
node_nmea_process -->|"uses assignment"| node_nmea_assignment
node_nmea_process -.->|"adds constraints"| node_nmea_factors
node_mapping_node -.->|"fuses NMEA"| node_nmea_process
node_indoor -->|"uses localizer"| node_gicp
node_mqtt_orchestrator -->|"loads settings"| node_mqtt_config
node_mqtt_orchestrator -.->|"coordinates modes"| node_mqtt

click node_mapping_node "https://github.com/cwha0212/ligo./blob/main/src/laserMapping.cpp"
click node_preprocess "https://github.com/cwha0212/ligo./blob/main/src/preprocess.cpp"
click node_ivox "https://github.com/cwha0212/ligo./blob/main/include/ivox/ivox3d.h"
click node_ivox_node "https://github.com/cwha0212/ligo./blob/main/include/ivox/ivox3d_node.hpp"
click node_hilbert "https://github.com/cwha0212/ligo./blob/main/include/ivox/hilbert.hpp"
click node_imu "https://github.com/cwha0212/ligo./blob/main/src/IMU_Processing.cpp"
click node_initialization "https://github.com/cwha0212/ligo./blob/main/src/li_initialization.cpp"
click node_estimator "https://github.com/cwha0212/ligo./blob/main/src/Estimator.cpp"
click node_ikf "https://github.com/cwha0212/ligo./blob/main/include/IKFoM/IKFoM_toolkit/esekfom/esekfom.hpp"
click node_manifolds "https://github.com/cwha0212/ligo./tree/main/include/IKFoM/IKFoM_toolkit/mtk"
click node_nmea_process "https://github.com/cwha0212/ligo./blob/main/src/NMEA_Processing_fg.cpp"
click node_nmea_assignment "https://github.com/cwha0212/ligo./blob/main/src/NMEA_Assignment.cpp"
click node_nmea_factors "https://github.com/cwha0212/ligo./blob/main/include/nmea_factor/nmea_factor.hpp"
click node_indoor "https://github.com/cwha0212/ligo./blob/main/src/Indoor_Processing.cpp"
click node_gicp "https://github.com/cwha0212/ligo./blob/main/src/Indoor_SmallGICP_Localizer.cpp"
click node_grid_registry "https://github.com/cwha0212/ligo./blob/main/src/Indoor_GridMapRegistry.cpp"
click node_mqtt_orchestrator "https://github.com/cwha0212/ligo./blob/main/scripts/mqtt_mode_orchestrator.py"
click node_mqtt_config "https://github.com/cwha0212/ligo./blob/main/scripts/mqtt_config.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_mapping_node,node_preprocess,node_ivox,node_ivox_node,node_hilbert toneBlue
class node_imu,node_initialization,node_estimator,node_ikf,node_manifolds toneAmber
class node_nmea_process,node_nmea_assignment,node_nmea_factors,node_indoor,node_gicp,node_grid_registry toneMint
class node_mqtt_orchestrator,node_mqtt_config toneRose
class node_sensors,node_mqtt,node_pose_map toneIndigo
```

## Components

### LiDAR Mapping

- [Mapping Node](https://github.com/cwha0212/ligo./blob/main/src/laserMapping.cpp): `src/laserMapping.cpp`
- [Sensor Preprocessing](https://github.com/cwha0212/ligo./blob/main/src/preprocess.cpp): `src/preprocess.cpp`
- [Incremental Voxel Map](https://github.com/cwha0212/ligo./blob/main/include/ivox/ivox3d.h): `include/ivox/ivox3d.h`
- [Voxel Indexing](https://github.com/cwha0212/ligo./blob/main/include/ivox/ivox3d_node.hpp): `include/ivox/ivox3d_node.hpp`
- [Hilbert Indexing](https://github.com/cwha0212/ligo./blob/main/include/ivox/hilbert.hpp): `include/ivox/hilbert.hpp`

### State Estimation

- [IMU Processing](https://github.com/cwha0212/ligo./blob/main/src/IMU_Processing.cpp): `src/IMU_Processing.cpp`
- [LIO Initialization](https://github.com/cwha0212/ligo./blob/main/src/li_initialization.cpp): `src/li_initialization.cpp`
- [State Estimator](https://github.com/cwha0212/ligo./blob/main/src/Estimator.cpp): `src/Estimator.cpp`
- [Iterated Kalman Filter](https://github.com/cwha0212/ligo./blob/main/include/IKFoM/IKFoM_toolkit/esekfom/esekfom.hpp): `include/IKFoM/IKFoM_toolkit/esekfom/esekfom.hpp`
- [Manifold Toolkit](https://github.com/cwha0212/ligo./tree/main/include/IKFoM/IKFoM_toolkit/mtk): `include/IKFoM/IKFoM_toolkit/mtk`

### Global Localization

- [NMEA Factor Graph](https://github.com/cwha0212/ligo./blob/main/src/NMEA_Processing_fg.cpp): `src/NMEA_Processing_fg.cpp`
- [NMEA Assignment](https://github.com/cwha0212/ligo./blob/main/src/NMEA_Assignment.cpp): `src/NMEA_Assignment.cpp`
- [NMEA Factors](https://github.com/cwha0212/ligo./blob/main/include/nmea_factor/nmea_factor.hpp): `include/nmea_factor/nmea_factor.hpp`
- [Indoor Processing](https://github.com/cwha0212/ligo./blob/main/src/Indoor_Processing.cpp): `src/Indoor_Processing.cpp`
- [Indoor GICP Localizer](https://github.com/cwha0212/ligo./blob/main/src/Indoor_SmallGICP_Localizer.cpp): `src/Indoor_SmallGICP_Localizer.cpp`
- [Indoor Map Registry](https://github.com/cwha0212/ligo./blob/main/src/Indoor_GridMapRegistry.cpp): `src/Indoor_GridMapRegistry.cpp`

### Runtime Integration

- [MQTT Mode Orchestrator](https://github.com/cwha0212/ligo./blob/main/scripts/mqtt_mode_orchestrator.py): `scripts/mqtt_mode_orchestrator.py`
- [MQTT Configuration](https://github.com/cwha0212/ligo./blob/main/scripts/mqtt_config.py): `scripts/mqtt_config.py`

### Other components

- **Sensor Streams**
- **MQTT Broker**
- **Pose and Map Output**

## Connections

- Sensor Streams → Mapping Node: supplies data
- Mapping Node → LIO Initialization: uses (evidence: `src/laserMapping.cpp`)
- Mapping Node → Indoor Processing: uses (evidence: `src/laserMapping.cpp`)
- Mapping Node → Indoor Map Registry: uses (evidence: `src/laserMapping.cpp`)
- Mapping Node → Pose and Map Output: publishes
- Sensor Preprocessing → Incremental Voxel Map: supports mapping
- Incremental Voxel Map → Voxel Indexing: indexes points (evidence: `include/ivox/ivox3d.h`)
- Voxel Indexing → Hilbert Indexing: uses indexing (evidence: `include/ivox/ivox3d_node.hpp`)
- IMU Processing → State Estimator: provides motion data
- State Estimator → Iterated Kalman Filter: uses filter
- Iterated Kalman Filter → Manifold Toolkit: uses state types (evidence: `include/IKFoM/IKFoM_toolkit/esekfom/esekfom.hpp`)
- NMEA Factor Graph → NMEA Assignment: uses assignment
- NMEA Factor Graph → NMEA Factors: adds constraints
- Mapping Node → NMEA Factor Graph: fuses NMEA
- Indoor Processing → Indoor GICP Localizer: uses localizer
- MQTT Mode Orchestrator → MQTT Configuration: loads settings (evidence: `scripts/mqtt_mode_orchestrator.py`)
- MQTT Mode Orchestrator → MQTT Broker: coordinates modes
