How unsigned-long/ikalibr works
Project Type and Purpose
• iKalibr is a C++-based, ROS-integrated, targetless spatiotemporal calibration framework for multi-sensor rigs (IMUs, cameras, LiDARs, radars, RGB-D, event cameras).
• It provides a modular calibration pipeline: data ingestion → preprocessing/feature extraction → factor graph construction → optimization (via Ceres) → results/visualization.
• It ships as a ROS package (msgs, launches), a library (include/src/thirdparty), and a suite of CLI tools (exe/, script/).
File-Structure Analysis
• Top-level:
• /: exposed headers, organized by module (calib, core, factor, sensor, solver, util, viewer)
• src/: corresponding implementation files
• exe/: entry-point applications (solver, tool, nofree demos)
• launch/: ROS launch files for each tool/solver
• msg/: ROS message definitions for sensor data
• config/, data/: YAML instrument configurations and raw data sets
• thirdparty/: bundled external libs (ctraj, opengv, ufomap, veta)
• script/: Python helpers for plotting, data conversion
• CMakeLists.txt + package.xml: build and ROS packaging
• Architectural patterns:
• Modular C++ namespaces: sensor ↔ core ↔ factor ↔ solver ↔ util ↔ viewer
• Plugin-style support: new sensor types and factor types via headers in include/sensor and include/factor
• CLI + ROS interface: exe/ for command-line; launch/ + msg/ for rosbag and runtime
• Config-driven pipelines: YAML files in config/ steer loader, solver, prior settings
Key Insights from README
• Core pipeline is illustrated in docs/img/overview.drawio.jpg
• Supports targetless spatial + temporal calibration; no external targets needed
• Encourages extension to new sensor modalities
• Uses continuous-time velocity estimation for RGB-D specialization
1. Data Sources
• Raw recordings (rosbag, CSV, images, point clouds)
• Live sensors (ros topics)
2. Configuration Manager
• YAML loader (configor)
• Parameter manager (spat_temp_priori, calib_param_manager)
3. Sensor Interface & Data Loader
• sensor_data_loader modules (camera, imu, lidar, radar, event, depth)
4. Preprocessing & Feature Extraction
• core/event_preprocessing, feature_tracking, optical_flow_trace, scan_undistortion
5. Factor Graph Builder
• factor/* modules generate residuals: imu factors, visual factors, lidar factors, radar factors
6. Optimization Engine
• solver/calib_solver + Ceres callbacks
• Thirdparty optimization libs (ceres via include/calib/ceres_callback)
7. Output & Visualization
• viewer modules (visual_ang_vel_drawer, visual_colorized_cloud_map, etc.)
• CLI / ROS topics / result YAML files
8. Auxiliary Tools
• exe/tool (bag_merge, imgs_to_bag, data_format_transformer, imu_intri_calib)
• script/ Python helpers
• Data Sources → Sensor Interface
• Sensor Interface → Preprocessing & Feature Extraction
• Preprocessed Features → Factor Graph Builder
• Factors + Config Manager → Optimization Engine
• Optimizer → Output Manager → Viewer / YAML / ROS topics
• CLI tools call specific subsets of Sensor Interface / Config Manager / Output
c. Architectural Patterns & Principles
• Separation of Concerns: each module (sensor, core, factor, solver, viewer) in its own namespace/folder
• Extensibility: new sensor/factor types drop into include/sensor or include/factor; CMake auto-discovers
• Config-Driven Behavior: central configor JSON/YAML loader used across modules
• ROS Decoupling: message definitions + launch files isolate runtime orchestration
d. Key Technologies & Libraries
• C++17, CMake, ROS (msgs, launch, package.xml)
• Ceres Solver
• YAML configs via configor
• Thirdparty: opengv, ctraj, ufomap, veta
• Python scripts for visualization