Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ethz-asl/kalibr/llms.txt

Use this file to discover all available pages before exploring further.

kalibr_calibrate_imu_camera estimates the rigid-body transformation and time offset between a camera chain and one or more IMUs. It reads image and IMU topics from a ROS bag together with a pre-computed camera chain calibration, then solves a continuous-time batch optimization to produce a camchain-imucam.yaml, an imu.yaml, and a PDF report. Temporal calibration is enabled by default.

Synopsis

kalibr_calibrate_imu_camera --bag <file.bag> \
                             --cam <camchain.yaml> \
                             --imu <imu.yaml> \
                             --target <target.yaml>

Example

kalibr_calibrate_imu_camera \
  --bag MYROSBAG.bag \
  --cam camchain.yaml \
  --imu imu.yaml \
  --target aprilgrid.yaml
aprilgrid.yaml:
target_type: 'aprilgrid'
tagCols: 6
tagRows: 6
tagSize: 0.088
tagSpacing: 0.3
imu.yaml (example for ADIS16448):
accelerometer_noise_density: 0.006
accelerometer_random_walk: 0.0002
gyroscope_noise_density: 0.0004
gyroscope_random_walk: 4.0e-06
update_rate: 200.0

Flags

Dataset source

--bag
string
required
Path to the ROS bag file containing image and IMU data. Topic names are read from the configuration YAML files.
--bag-from-to
float float
Use only bag data within this time window: start and end in seconds from the beginning of the bag.
--bag-freq
float
Downsample to this feature extraction frequency in Hz.
--perform-synchronization
boolean
Perform a clock synchronization between the camera and IMU clocks according to the algorithm by Zhang et al. (2002) before running the estimator.

Camera system configuration

--cams
string
Path to the camera chain configuration YAML file. This is typically the camchain.yaml output from kalibr_calibrate_cameras. See camchain YAML format.
--recompute-camera-chain-extrinsics
boolean
Recompute the camera chain extrinsics during optimization instead of treating them as fixed. Recommended only for debugging problems with chain extrinsics.
--reprojection-sigma
float
Standard deviation of the reprojected corner point distribution in pixels. This value is used to weight the reprojection error terms. Default: 1.0.

IMU configuration

--imu
string[]
required
One or more paths to IMU noise parameter YAML files. The first IMU listed is used as the reference IMU. See IMU YAML format.
--imu-delay-by-correlation
boolean
Estimate the time delay between multiple IMUs by cross-correlation. By default no temporal calibration between IMUs is performed.
--imu-models
string[]
IMU model strings, one per --imu entry. Accepted values: calibrated, scale-misalignment, scale-misalignment-size-effect. Defaults to calibrated when only a single IMU is provided and this flag is omitted.

Calibration target

--target
string
required
Path to the calibration target configuration YAML file. See target YAML format.

Optimization options

--no-time-calibration
boolean
Disable temporal calibration. The time offset between camera and IMU will not be estimated and is assumed to be zero.
--max-iter
integer
Maximum number of optimization iterations. Default: 30.
--recover-covariance
boolean
Recover and report the covariance of all estimated design variables after optimization.
--timeoffset-padding
float
Maximum allowed change in the time offset estimate during optimization, in seconds. Default: 0.03 (30 ms).

Output options

--show-extraction
boolean
Display each image during calibration target extraction. Enabling this flag disables interactive plots.
--extraction-stepping
boolean
Step through each image individually during extraction, waiting for a keypress. Disables interactive plots.
--verbose
boolean
Enable detailed debug-level logging. Also enables --show-extraction and disables interactive plots.
--dont-show-report
boolean
Do not open the PDF report on screen after calibration finishes.
--export-poses
boolean
Export the optimized camera-IMU poses to a CSV file with columns: time_ns, position, quaternion.

Output files

FileDescription
<bag>-camchain-imucam.yamlCamera-IMU extrinsics and time offsets
<bag>-imu.yamlUpdated IMU calibration parameters
<bag>-results-imucam.txtDetailed numeric calibration results
<bag>-report-imucam.pdfPDF report with error statistics and plots
<bag>-poses-imucam-imu0.csvOptimized poses (only with --export-poses)

IMU models

Model stringDescription
calibratedStandard IMU model with fixed scale and alignment (default)
scale-misalignmentAdds scale factor and axis misalignment estimation
scale-misalignment-size-effectAdds size-effect (lever-arm) estimation on top of scale and misalignment
Run kalibr_calibrate_cameras first to produce the camchain.yaml required by --cams. The camera chain must have sufficient target observations to initialize the spline trajectory.

Build docs developers (and LLMs) love