How leggedrobotics/dlio works
This ROS1 DLIO fork estimates LiDAR motion from synchronized IMU and point-cloud streams, compensates for scan motion, and publishes odometry and trajectory products while building a map from keyframes. Its principal runtime path is the odometry node: sensor input and IMU state estimation feed deskewing and scan-to-submap registration; keyframes are sent to a separate mapper for map publication and automatic PCD saving. README capabilities also include live and bag-replay operation. Source excerpts are partial, so uncertain internal call links are omitted.
Main entry points: odom.cc Odometry runtime · nano_gicp.cc NanoGICP alignment · map.cc Map accumulation · odom_node.cc Odometry node
Components 18
Sensor processing
- Odometry node
src/dlio/odom_node.cc - Odometry runtime
src/dlio/odom.cc
Odometry estimation
- IMU state and bias
src/dlio/odom.cc - Cloud deskewing
src/dlio/odom.cc - Keyframes and submap
src/dlio/odom.cc
Registration engine
- NanoGICP alignment
src/nano_gicp/nano_gicp.cc - Least-squares optimizer
src/nano_gicp/lsq_registration.cc - KD-tree search
src/nano_gicp/nanoflann.cc - Point-cloud adaptor
include/nano_gicp/nanoflann_adaptor.h
Mapping and outputs
- Map node
src/dlio/map_node.cc - Map accumulation
src/dlio/map.cc - Voxel map
include/dlio/map.h - Pose and path outputs
src/dlio/odom.cc - Deskewed cloud output
src/dlio/odom.cc
Other components
- IMU and LiDAR
- ROS consumers
- Saved map PCD
- Sensor and runtime settings
cfg/dlio.yaml
Connections 19
- IMU and LiDAR → Odometry node: publishes sensors
- Odometry node → Odometry runtime: starts
- Sensor and runtime settings → Odometry runtime: configures
- Odometry runtime → IMU state and bias: processes IMU
- Odometry runtime → Cloud deskewing: deskews scans
- Odometry runtime → Keyframes and submap: builds submap
- Odometry runtime → NanoGICP alignment: aligns scan
- NanoGICP alignment → KD-tree search: searches neighbors
- KD-tree search → Point-cloud adaptor: indexes points
- NanoGICP alignment → Least-squares optimizer: optimizes alignment
- Odometry runtime → Pose and path outputs: publishes poses
- Odometry runtime → Deskewed cloud output: publishes cloud
- Pose and path outputs → ROS consumers: delivers odometry
- Deskewed cloud output → ROS consumers: delivers cloud
- Odometry runtime → Map node: publishes keyframes
- Map node → Map accumulation: starts
- Map accumulation → Voxel map: updates map
- Voxel map → ROS consumers: publishes map
- Map accumulation → Saved map PCD: saves on shutdown