whl-FAST-LIO2 is the Wheel.OS FAST-LIO2 refactor workspace.
It currently contains:
- FAST-LIO2 architecture contracts
- official algorithm invariants
- baseline scorecards and evaluation tooling
- map-product consistency contracts for downstream map generation
whl-FAST-LIO2 now contains a self-contained Apollo drop-in module under:
modules/fast_lio2/
This extracted module:
- contains its own Cyber component
- contains its own adapters, core, and internal proto files
- no longer depends on
modules/calibration/lidar_imu_calibration - now exposes only FAST-LIO2-native runtime names inside
modules/fast_lio2/ - can be copied into
apollo-base/modules/fast_lio2and built/launched there
At the same time, this repository itself is still not a full standalone Apollo workspace. It is best described as:
drop-in Apollo module + evaluation + source-of-truth repository
A complete runnable delivery consists of:
- Cyber component and proto config
- LiDAR / IMU input adapters
- FAST-LIO2 runtime core:
- synchronization
- IMU initialization and propagation
- point undistortion
- local map FOV management
- ikd-tree nearest search
- iterated Kalman scan-to-map update
- incremental map insertion
- Runtime outputs and map writers
- Evaluation / scorecard tools
The long-term goal is:
whl-FAST-LIO2/
fast_lio2/core <- full algorithm runtime
fast_lio2/cyber <- Apollo Cyber adapter
fast_lio2/evaluation <- baseline and scorecard
fast_lio2/map_infra <- optimized_frame_dataset contracts
The intended mapping flow is:
LiDAR + IMU + lidar-to-imu extrinsic
-> FAST-LIO2 sync / undistort / scan-to-map
-> local odometry + registered scan + local map
-> optimized_frame_dataset
-> tile map + localization map package
-> scorecard / regression report
The end-to-end mapping stack is expected to produce:
- pose
- odometry
- registered cloud
- map cloud
- health / residual / latency metrics
optimized_frame_dataset/frames.csvpcd/*.pcd
tile_bundle/localization_map_package/map_product_bundle/manifest.json
- scorecard JSON
- pass / fail / warning gates
- baseline comparison report
cmake -S . -B /tmp/whl_fast_lio2_build
cmake --build /tmp/whl_fast_lio2_build -j
/tmp/whl_fast_lio2_build/core_contract_smoke
/tmp/whl_fast_lio2_build/scorecard_contract_smoke
/tmp/whl_fast_lio2_build/map_product_contract_smoke
/tmp/whl_fast_lio2_build/official_pipeline_contract_smoke
python3 tools/evaluate_scorecard.py \
--metrics_json tests/scorecard_metrics_sensor_rgb.json \
--output_json /tmp/sensor_rgb_scorecard.json
python3 tools/evaluate_scorecard.py \
--metrics_json tests/scorecard_metrics_zhongji.json \
--output_json /tmp/zhongji_scorecard.jsonValidated again after the core modularization on 2026-05-21:
- Apollo drop-in build: passed
- Apollo
mainboardsmoke start: passed core_contract_smoke: passedscorecard_contract_smoke: passedmap_product_contract_smoke: passedofficial_pipeline_contract_smoke: passedsensor_rgb/zhongji_20251009scorecards: passed
The runtime-facing core no longer uses calibration-module naming:
adapter/runtime_data.hproto/fast_lio2_runtime_conf.protoproto/fast_lio2_runtime_status.protocore/fast_lio2_runtime_core.hcore/fast_lio2_runtime_core.cc
Imported upstream helper code under core/include/LI_init/ still keeps the
authors' original initialization naming, but it is now an internal FAST-LIO2
implementation detail rather than a dependency on Apollo calibration code.
Copy:
whl-FAST-LIO2/modules/fast_lio2
-> apollo-base/modules/fast_lio2
Then build:
cd /path/to/apollo-base
bazel build //modules/fast_lio2:libfast_lio2_component.soThen launch with Apollo mainboard / launch tooling using:
modules/fast_lio2/dag/fast_lio2.dagmodules/fast_lio2/conf/fast_lio2.pb.txt
For host-mode offline replay outside a Docker /apollo mount, generate rewritten
runtime assets with:
# first list the Bazel-cache candidates you want to use
find /path/to/apollo-base/.cache/bazel -path '*/execroot/_main/bazel-out/*/bin/modules/fast_lio2/libfast_lio2_component.so' -type f
find /path/to/apollo-base/.cache/bazel -path '*/execroot/_main/bazel-out/*/bin/cyber/mainboard/mainboard' -type f
find /path/to/apollo-base/.cache/bazel -path '*/execroot/_main/bazel-out/*/bin/cyber/tools/cyber_recorder/cyber_recorder' -type f
python3 tools/prepare_apollo_host_run.py \
--apollo_root /path/to/apollo-base \
--output_dir /tmp/fastlio_runs/sensor_rgb_host \
--record_path /mnt/synology/apollo/sensor_rgb.record \
--module_library /abs/path/to/libfast_lio2_component.so \
--mainboard_binary /abs/path/to/mainboard \
--cyber_recorder_binary /abs/path/to/cyber_recorderThis generates:
fast_lio2.host.pb.txtfast_lio2.host.daghost_run_summary.json
with:
- host-absolute
module_library - host-absolute
config_file_path - host-absolute
flag_file_path max_pending_pointcloud_frames=256for offline replay- a writable
Initialization_result.txtunder the chosen output directory
When an Apollo Bazel cache contains multiple matching outputs, the tool now fails
fast and requires explicit --module_library, --mainboard_binary, and
--cyber_recorder_binary overrides instead of guessing.
Validated on 2026-05-23 for sensor_rgb.record:
- slow replay command:
cyber_recorder play ... -r 0.1 - pending queue:
256 - result:
586normalscan2mapupdates in runtime log - output record topics:
- pose:
1809 - odometry:
1809 - metrics:
1809 - cloud_registered:
1809
- pose:
This repository remains the right place to:
- keep the self-contained module source
- maintain scorecards and baselines
- maintain mapping / map-product contracts