# chen-liu520/hnurm26_fastlivo2_ros2 architecture

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

- Interactive diagram: https://gitdiagram.com/chen-liu520/hnurm26_fastlivo2_ros2
- Repository: https://github.com/chen-liu520/hnurm26_fastlivo2_ros2

## Overview

This repository combines FAST-LIVO2 ROS 2 LiDAR-inertial-visual mapping with a Livox sensor driver. The principal workflow is sensor data entering the driver, being converted to ROS point-cloud messages, then consumed by the mapper for state estimation and map/pose output. The README additionally documents MID360 vehicle-angle filtering and a low-performance launch option. Mapper internals and launch wiring are only partly sampled, so uncertain subsystem links are marked dashed rather than treated as verified calls.

Main entry points: [`src/FAST-LIVO2/src/LIVMapper.cpp`](https://github.com/chen-liu520/hnurm26_fastlivo2_ros2/blob/main/src/FAST-LIVO2/src/LIVMapper.cpp) (LIV Mapper), [`src/livox_ros_driver2/livox_ros_driver2/src/call_back/livox_lidar_callback.cpp`](https://github.com/chen-liu520/hnurm26_fastlivo2_ros2/blob/main/src/livox_ros_driver2/livox_ros_driver2/src/call_back/livox_lidar_callback.cpp) (Lidar Callback), [`src/livox_ros_driver2/livox_ros_driver2/src/comm/pub_handler.cpp`](https://github.com/chen-liu520/hnurm26_fastlivo2_ros2/blob/main/src/livox_ros_driver2/livox_ros_driver2/src/comm/pub_handler.cpp) (Packet Processing), [`src/livox_ros_driver2/livox_ros_driver2/src/lddc.cpp`](https://github.com/chen-liu520/hnurm26_fastlivo2_ros2/blob/main/src/livox_ros_driver2/livox_ros_driver2/src/lddc.cpp) (Data Distribution)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_driver["Livox Driver"]
  node_driver_node["Driver Node<br/>[driver_node.cpp]"]
  node_lidar_callback["Lidar Callback"]
  node_pub_handler["Packet Processing<br/>[pub_handler.cpp]"]
  node_lddc["Data Distribution<br/>[lddc.cpp]"]
  node_driver_ros["ROS Point Clouds<br/>[lddc.cpp]"]
end

subgraph group_mapping["FAST-LIVO2 Mapping"]
  node_mapper_entry["Mapper Entry<br/>[main.cpp]"]
  node_mapper["LIV Mapper<br/>[LIVMapper.cpp]"]
  node_launch_profiles["Mapping Profiles"]
end

subgraph group_estimation["Estimation Layers"]
  node_preprocess["Sensor Preprocessing<br/>[preprocess.cpp]"]
  node_imu["IMU Processing<br/>[IMU_Processing.cpp]"]
  node_vio["Visual Odometry<br/>[vio.cpp]"]
  node_voxel_map[("Voxel Map<br/>[voxel_map.cpp]")]
end

subgraph group_outputs["ROS Outputs"]
  node_mapping_output["Mapping Publishers<br/>[LIVMapper.cpp]"]
end

node_lidar(("Livox Sensor"))
node_ros_consumers(("ROS Consumers"))

node_lidar -.->|"sends packets"| node_lidar_callback
node_lidar_callback -.->|"dispatches packets"| node_pub_handler
node_pub_handler -.->|"provides point data"| node_lddc
node_lddc -->|"publishes clouds"| node_driver_ros
node_driver_node -.->|"registers callbacks"| node_lidar_callback
node_mapper_entry -->|"initializes and runs"| node_mapper
node_mapper -.->|"uses preprocessing"| node_preprocess
node_mapper -.->|"uses IMU processing"| node_imu
node_mapper -.->|"uses visual odometry"| node_vio
node_mapper -.->|"uses voxel mapping"| node_voxel_map
node_mapper -.->|"publishes results"| node_mapping_output
node_driver_ros -.->|"feeds sensor topics"| node_mapper
node_mapping_output -.->|"publishes ROS results"| node_ros_consumers
node_launch_profiles -.->|"configures launch"| node_mapper_entry

click node_driver_node "https://github.com/chen-liu520/hnurm26_fastlivo2_ros2/blob/main/src/livox_ros_driver2/livox_ros_driver2/src/driver_node.cpp"
click node_lidar_callback "https://github.com/chen-liu520/hnurm26_fastlivo2_ros2/blob/main/src/livox_ros_driver2/livox_ros_driver2/src/call_back/livox_lidar_callback.cpp"
click node_pub_handler "https://github.com/chen-liu520/hnurm26_fastlivo2_ros2/blob/main/src/livox_ros_driver2/livox_ros_driver2/src/comm/pub_handler.cpp"
click node_lddc "https://github.com/chen-liu520/hnurm26_fastlivo2_ros2/blob/main/src/livox_ros_driver2/livox_ros_driver2/src/lddc.cpp"
click node_driver_ros "https://github.com/chen-liu520/hnurm26_fastlivo2_ros2/blob/main/src/livox_ros_driver2/livox_ros_driver2/src/lddc.cpp"
click node_mapper_entry "https://github.com/chen-liu520/hnurm26_fastlivo2_ros2/blob/main/src/FAST-LIVO2/src/main.cpp"
click node_mapper "https://github.com/chen-liu520/hnurm26_fastlivo2_ros2/blob/main/src/FAST-LIVO2/src/LIVMapper.cpp"
click node_launch_profiles "https://github.com/chen-liu520/hnurm26_fastlivo2_ros2/blob/main/src/FAST-LIVO2/launch/low_mid360.launch.py"
click node_preprocess "https://github.com/chen-liu520/hnurm26_fastlivo2_ros2/blob/main/src/FAST-LIVO2/src/preprocess.cpp"
click node_imu "https://github.com/chen-liu520/hnurm26_fastlivo2_ros2/blob/main/src/FAST-LIVO2/src/IMU_Processing.cpp"
click node_vio "https://github.com/chen-liu520/hnurm26_fastlivo2_ros2/blob/main/src/FAST-LIVO2/src/vio.cpp"
click node_voxel_map "https://github.com/chen-liu520/hnurm26_fastlivo2_ros2/blob/main/src/FAST-LIVO2/src/voxel_map.cpp"
click node_mapping_output "https://github.com/chen-liu520/hnurm26_fastlivo2_ros2/blob/main/src/FAST-LIVO2/src/LIVMapper.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_driver_node,node_lidar_callback,node_pub_handler,node_lddc,node_driver_ros toneBlue
class node_mapper_entry,node_mapper,node_launch_profiles toneAmber
class node_preprocess,node_imu,node_vio,node_voxel_map toneMint
class node_mapping_output toneRose
class node_lidar,node_ros_consumers toneIndigo
```

## Components

### Livox Driver

- [Driver Node](https://github.com/chen-liu520/hnurm26_fastlivo2_ros2/blob/main/src/livox_ros_driver2/livox_ros_driver2/src/driver_node.cpp): `src/livox_ros_driver2/livox_ros_driver2/src/driver_node.cpp`
- [Lidar Callback](https://github.com/chen-liu520/hnurm26_fastlivo2_ros2/blob/main/src/livox_ros_driver2/livox_ros_driver2/src/call_back/livox_lidar_callback.cpp): `src/livox_ros_driver2/livox_ros_driver2/src/call_back/livox_lidar_callback.cpp`
- [Packet Processing](https://github.com/chen-liu520/hnurm26_fastlivo2_ros2/blob/main/src/livox_ros_driver2/livox_ros_driver2/src/comm/pub_handler.cpp): `src/livox_ros_driver2/livox_ros_driver2/src/comm/pub_handler.cpp`
- [Data Distribution](https://github.com/chen-liu520/hnurm26_fastlivo2_ros2/blob/main/src/livox_ros_driver2/livox_ros_driver2/src/lddc.cpp): `src/livox_ros_driver2/livox_ros_driver2/src/lddc.cpp`
- [ROS Point Clouds](https://github.com/chen-liu520/hnurm26_fastlivo2_ros2/blob/main/src/livox_ros_driver2/livox_ros_driver2/src/lddc.cpp): `src/livox_ros_driver2/livox_ros_driver2/src/lddc.cpp`

### FAST-LIVO2 Mapping

- [Mapper Entry](https://github.com/chen-liu520/hnurm26_fastlivo2_ros2/blob/main/src/FAST-LIVO2/src/main.cpp): `src/FAST-LIVO2/src/main.cpp`
- [LIV Mapper](https://github.com/chen-liu520/hnurm26_fastlivo2_ros2/blob/main/src/FAST-LIVO2/src/LIVMapper.cpp): `src/FAST-LIVO2/src/LIVMapper.cpp`
- [Mapping Profiles](https://github.com/chen-liu520/hnurm26_fastlivo2_ros2/blob/main/src/FAST-LIVO2/launch/low_mid360.launch.py): `src/FAST-LIVO2/launch/low_mid360.launch.py`

### Estimation Layers

- [Sensor Preprocessing](https://github.com/chen-liu520/hnurm26_fastlivo2_ros2/blob/main/src/FAST-LIVO2/src/preprocess.cpp): `src/FAST-LIVO2/src/preprocess.cpp`
- [IMU Processing](https://github.com/chen-liu520/hnurm26_fastlivo2_ros2/blob/main/src/FAST-LIVO2/src/IMU_Processing.cpp): `src/FAST-LIVO2/src/IMU_Processing.cpp`
- [Visual Odometry](https://github.com/chen-liu520/hnurm26_fastlivo2_ros2/blob/main/src/FAST-LIVO2/src/vio.cpp): `src/FAST-LIVO2/src/vio.cpp`
- [Voxel Map](https://github.com/chen-liu520/hnurm26_fastlivo2_ros2/blob/main/src/FAST-LIVO2/src/voxel_map.cpp): `src/FAST-LIVO2/src/voxel_map.cpp`

### ROS Outputs

- [Mapping Publishers](https://github.com/chen-liu520/hnurm26_fastlivo2_ros2/blob/main/src/FAST-LIVO2/src/LIVMapper.cpp): `src/FAST-LIVO2/src/LIVMapper.cpp`

### Other components

- **Livox Sensor**
- **ROS Consumers**

## Connections

- Livox Sensor → Lidar Callback: sends packets
- Lidar Callback → Packet Processing: dispatches packets
- Packet Processing → Data Distribution: provides point data
- Data Distribution → ROS Point Clouds: publishes clouds (evidence: `src/livox_ros_driver2/livox_ros_driver2/src/lddc.cpp`)
- Driver Node → Lidar Callback: registers callbacks
- Mapper Entry → LIV Mapper: initializes and runs (evidence: `src/FAST-LIVO2/src/main.cpp`)
- LIV Mapper → Sensor Preprocessing: uses preprocessing
- LIV Mapper → IMU Processing: uses IMU processing
- LIV Mapper → Visual Odometry: uses visual odometry
- LIV Mapper → Voxel Map: uses voxel mapping
- LIV Mapper → Mapping Publishers: publishes results
- ROS Point Clouds → LIV Mapper: feeds sensor topics
- Mapping Publishers → ROS Consumers: publishes ROS results
- Mapping Profiles → Mapper Entry: configures launch
