# liangheming/voxelmapplus_fastlio2 architecture

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

- Interactive diagram: https://gitdiagram.com/liangheming/voxelmapplus_fastlio2
- Repository: https://github.com/liangheming/voxelmapplus_fastlio2

## Overview

FastLIO2-based ROS1 LiDAR-inertial mapping with voxel-plane mapping and an optional STD loop-closure/pose-graph workflow. The principal flow synchronizes Livox and IMU data, estimates motion and builds a map, then can pass odometry-aligned clouds into loop detection and pose-graph optimization. README capabilities include plane fusion and LRU map management. Some runtime calls and configuration wiring are only partially sampled; edges are limited to shown references/calls or README statements.

Main entry points: [`voxel_plus/src/lio_node.cpp`](https://github.com/liangheming/voxelmapplus_fastlio2/blob/main/voxel_plus/src/lio_node.cpp) (LIO ROS node), [`voxel_plus/src/map_builder/lio_builder.cpp`](https://github.com/liangheming/voxelmapplus_fastlio2/blob/main/voxel_plus/src/map_builder/lio_builder.cpp) (LIO processing), [`std_matcher/src/pgo_node.cpp`](https://github.com/liangheming/voxelmapplus_fastlio2/blob/main/std_matcher/src/pgo_node.cpp) (Loop and pose graph), [`voxel_plus/src/map_builder/ieskf.cpp`](https://github.com/liangheming/voxelmapplus_fastlio2/blob/main/voxel_plus/src/map_builder/ieskf.cpp) (Iterated Kalman filter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Sensor ingestion"]
  node_lio_node["LIO ROS node<br/>[lio_node.cpp]"]
  node_sync["Sensor synchronization<br/>[lio_node.cpp]"]
end

subgraph group_mapping["LIO mapping"]
  node_lio_builder["LIO processing<br/>[lio_builder.cpp]"]
  node_ieskf["Iterated Kalman filter<br/>[ieskf.cpp]"]
  node_voxel_map[("Voxel plane map<br/>[voxel_map.cpp]")]
  node_lio_outputs["Odometry and clouds<br/>[lio_node.cpp]"]
end

subgraph group_loop["Loop closure"]
  node_pgo_node["Loop and pose graph<br/>[pgo_node.cpp]"]
  node_std_descriptor["STD descriptors<br/>[descriptor.cpp]"]
end

subgraph group_support["Shared support"]
  node_conversion["Livox conversion<br/>[utils.cpp]"]
  node_commons["LIO data types<br/>[commons.h]"]
  node_interface_msg["Cloud with odometry"]
end

node_lidar(("Livox LiDAR"))
node_imu(("IMU"))
node_rosbag(("ROS bag playback"))
node_viewer(("ROS visualization"))

node_lidar -->|"publishes scans"| node_lio_node
node_imu -->|"publishes measurements"| node_lio_node
node_rosbag -->|"plays recorded data"| node_lidar
node_lio_node -->|"converts scans"| node_conversion
node_lio_node -->|"buffers and synchronizes"| node_sync
node_lio_node -->|"processes synchronized data"| node_lio_builder
node_lio_builder -->|"predicts and updates"| node_ieskf
node_lio_builder -->|"uses map"| node_voxel_map
node_lio_builder -->|"uses shared types"| node_commons
node_lio_node -->|"publishes results"| node_lio_outputs
node_lio_outputs -->|"packages cloud and pose"| node_interface_msg
node_lio_outputs -->|"publishes map and clouds"| node_viewer
node_lio_outputs -->|"provides loop input"| node_pgo_node
node_pgo_node -->|"uses STD manager"| node_std_descriptor
node_pgo_node -->|"publishes paths and constraints"| node_viewer

click node_lio_node "https://github.com/liangheming/voxelmapplus_fastlio2/blob/main/voxel_plus/src/lio_node.cpp"
click node_sync "https://github.com/liangheming/voxelmapplus_fastlio2/blob/main/voxel_plus/src/lio_node.cpp"
click node_conversion "https://github.com/liangheming/voxelmapplus_fastlio2/blob/main/voxel_plus/src/utils.cpp"
click node_lio_builder "https://github.com/liangheming/voxelmapplus_fastlio2/blob/main/voxel_plus/src/map_builder/lio_builder.cpp"
click node_ieskf "https://github.com/liangheming/voxelmapplus_fastlio2/blob/main/voxel_plus/src/map_builder/ieskf.cpp"
click node_voxel_map "https://github.com/liangheming/voxelmapplus_fastlio2/blob/main/voxel_plus/src/map_builder/voxel_map.cpp"
click node_commons "https://github.com/liangheming/voxelmapplus_fastlio2/blob/main/voxel_plus/src/map_builder/commons.h"
click node_lio_outputs "https://github.com/liangheming/voxelmapplus_fastlio2/blob/main/voxel_plus/src/lio_node.cpp"
click node_interface_msg "https://github.com/liangheming/voxelmapplus_fastlio2/blob/main/interface/msg/PointCloudWithOdom.msg"
click node_pgo_node "https://github.com/liangheming/voxelmapplus_fastlio2/blob/main/std_matcher/src/pgo_node.cpp"
click node_std_descriptor "https://github.com/liangheming/voxelmapplus_fastlio2/blob/main/std_matcher/src/std_manager/descriptor.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_lio_node,node_sync toneBlue
class node_lio_builder,node_ieskf,node_voxel_map,node_lio_outputs toneAmber
class node_pgo_node,node_std_descriptor toneMint
class node_conversion,node_commons,node_interface_msg toneRose
class node_lidar,node_imu,node_rosbag,node_viewer toneIndigo
```

## Components

### Sensor ingestion

- [LIO ROS node](https://github.com/liangheming/voxelmapplus_fastlio2/blob/main/voxel_plus/src/lio_node.cpp): `voxel_plus/src/lio_node.cpp`
- [Sensor synchronization](https://github.com/liangheming/voxelmapplus_fastlio2/blob/main/voxel_plus/src/lio_node.cpp): `voxel_plus/src/lio_node.cpp`

### LIO mapping

- [LIO processing](https://github.com/liangheming/voxelmapplus_fastlio2/blob/main/voxel_plus/src/map_builder/lio_builder.cpp): `voxel_plus/src/map_builder/lio_builder.cpp`
- [Iterated Kalman filter](https://github.com/liangheming/voxelmapplus_fastlio2/blob/main/voxel_plus/src/map_builder/ieskf.cpp): `voxel_plus/src/map_builder/ieskf.cpp`
- [Voxel plane map](https://github.com/liangheming/voxelmapplus_fastlio2/blob/main/voxel_plus/src/map_builder/voxel_map.cpp): `voxel_plus/src/map_builder/voxel_map.cpp`
- [Odometry and clouds](https://github.com/liangheming/voxelmapplus_fastlio2/blob/main/voxel_plus/src/lio_node.cpp): `voxel_plus/src/lio_node.cpp`

### Loop closure

- [Loop and pose graph](https://github.com/liangheming/voxelmapplus_fastlio2/blob/main/std_matcher/src/pgo_node.cpp): `std_matcher/src/pgo_node.cpp`
- [STD descriptors](https://github.com/liangheming/voxelmapplus_fastlio2/blob/main/std_matcher/src/std_manager/descriptor.cpp): `std_matcher/src/std_manager/descriptor.cpp`

### Shared support

- [Livox conversion](https://github.com/liangheming/voxelmapplus_fastlio2/blob/main/voxel_plus/src/utils.cpp): `voxel_plus/src/utils.cpp`
- [LIO data types](https://github.com/liangheming/voxelmapplus_fastlio2/blob/main/voxel_plus/src/map_builder/commons.h): `voxel_plus/src/map_builder/commons.h`
- [Cloud with odometry](https://github.com/liangheming/voxelmapplus_fastlio2/blob/main/interface/msg/PointCloudWithOdom.msg): `interface/msg/PointCloudWithOdom.msg`

### Other components

- **Livox LiDAR**
- **IMU**
- **ROS bag playback**
- **ROS visualization**

## Connections

- Livox LiDAR → LIO ROS node: publishes scans (evidence: `README.md`)
- IMU → LIO ROS node: publishes measurements (evidence: `voxel_plus/src/lio_node.cpp`)
- ROS bag playback → Livox LiDAR: plays recorded data (evidence: `README.md`)
- LIO ROS node → Livox conversion: converts scans (evidence: `voxel_plus/src/lio_node.cpp`)
- LIO ROS node → Sensor synchronization: buffers and synchronizes (evidence: `voxel_plus/src/lio_node.cpp`)
- LIO ROS node → LIO processing: processes synchronized data (evidence: `voxel_plus/src/lio_node.cpp`)
- LIO processing → Iterated Kalman filter: predicts and updates (evidence: `voxel_plus/src/map_builder/lio_builder.cpp`)
- LIO processing → Voxel plane map: uses map
- LIO processing → LIO data types: uses shared types
- LIO ROS node → Odometry and clouds: publishes results (evidence: `voxel_plus/src/lio_node.cpp`)
- Odometry and clouds → Cloud with odometry: packages cloud and pose (evidence: `voxel_plus/src/lio_node.cpp`)
- Odometry and clouds → ROS visualization: publishes map and clouds (evidence: `voxel_plus/src/lio_node.cpp`)
- Odometry and clouds → Loop and pose graph: provides loop input (evidence: `std_matcher/src/pgo_node.cpp`)
- Loop and pose graph → STD descriptors: uses STD manager (evidence: `std_matcher/src/pgo_node.cpp`)
- Loop and pose graph → ROS visualization: publishes paths and constraints (evidence: `std_matcher/src/pgo_node.cpp`)
