How acfr/cam_lidar_calibration works
Project Type and Purpose
• This is a ROS (Robot Operating System) catkin package for estimating extrinsic calibration between a monocular camera and a 3D LiDAR.
• It provides an interactive sample-capture GUI, background subtraction, chessboard feature extraction, an optimisation engine, and a post-hoc assessment/visualisation phase.
High-Level Components
a. Sensors & ROS Master
• Camera (publishes /camera/image & /camera/camera_info)
• LiDAR (publishes /lidar/points as sensor_msgs/PointCloud2 with ring info)
• ROS Master (name service, parameter server, topic router)
b. Configuration
• cfg/params.yaml – camera & LiDAR topics, board specs, ROI bounds
• Dynamic Reconfigure via ROS
c. Nodes & Nodelets
• feature_extraction_node (src/feature_extraction_node.cpp) – subscribes to image+pointcloud, does background subtraction & chessboard extraction
• cam_lidar_panel nodelet (src/cam_lidar_panel.cpp + nodelet_definition.xml) – RQt GUI panel for “Capture Background”, “Capture Sample”, “Discard Sample”, “Optimise” buttons
• optimiser node (src/optimiser.cpp & action/RunOptimise.action) – triggered by UI, reads samples from disk, runs VOQ-based optimisation, writes CSV outputs
• assess_calibration node (src/assess_calibration.cpp) – consumes CSV, computes reprojection errors, optionally publishes markers for RViz
d. Services & Actions
• Optimise.srv – synchronous request to trigger optimisation
• RunOptimise.action – asynchronous action for longer-running optimisation tasks
e. Launch & Visualization
• launch/run_optimiser.launch – brings up the UI panel, feature extraction, and optimiser hooks
• launch/assess_results.launch – loads the assessment node and RViz config for showing reprojection error histograms and overlays
• rviz/*.rviz – prebuilt RViz configurations for live preview and projection overlays
f. Scripts & Utilities
• scripts/visualise_results.py – standalone Python script to plot histograms and wrap angles
g. Data & Persistence
• data/YYYY-MM-DD_HH-MM-SS/ – stores PCDs, PNGs, poses.csv, calibration_*.csv
Relationships & Data Flows
• Sensors → ROS Topics → FeatureExtractionNode
• FeatureExtractionNode → (publishes sample files to disk + sample metadata over a ROS topic)
• UI Panel → user commands → calls ROS Service/Action → Optimiser Node
• Optimiser Node → reads sample files → writes calibration_*.csv → publishes completion status
• Assessment Node (or script) → reads calibration_*.csv → computes errors → publishes RViz markers or plots
Architectural Patterns & Design Principles
• ROS Pub/Sub for streaming sensor data
• ROS Services & Actions for control flows (start optimisation, get results)
• Modular separation:
• Per-frame feature extraction (real-time)
• Sample management & storage
• Batch optimisation engine
• Post-processing assessment
• Reuse of standard ROS packages: tf2, pcl_ros, sensor_msgs, dynamic_reconfigure
• Docker container for reproducible builds (docker/Dockerfile + build/run scripts)
Key Points to Capture
• Real-time feature extraction vs. batch optimisation (two distinct phases).
• UI panel’s tight coupling with dynamic reconfigure & sample management.
• File-based handshake between capture phase and optimisation phase (samples saved to disk).
• Post-hoc assessment overlays in RViz or script-based plots.
• Docker boundary around the entire ROS system for reproducible deployment.
and segregates runtime (nodes + topics) from build/deploy (Docker, CMake, catkin).
This will give any new engineer or stakeholder an immediate, accurate snapshot of the Camera-LiDAR Calibration pipeline’s architecture.