-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Camera IMU calibration
The camera-imu calibration tool estimates the spatial and temporal parameters of a camera system with respect to an intrinsically calibrated IMU. Image and IMU data has to be provided in a ROS bag.
The calibration parameters are estimated using a full batch optimization with splines to model the pose of the system. Detailed information about the approach can be found in the following papers: (see 1, 2)
##How to use it
###1) Requirements The intrinsic parameters of the IMU (e.g. scales, axis misalignment, nonlinearities,...) need to be calibrated beforehand and and its correction applied to the dataset.
Further an IMU configuration YAML has to be created containing the following statistical properties for the accelerometers and gyroscopes:
- noise density
- bias random walk
Please refer to the YAML formats page for the data format.
###2) Collect images Create a ROS bag containing the raw image streams either by directly recording from a ROS sensor streams or by using the bagcreater script on a list of image files and IMU data in a CSV file.
The calibration target is fixed in this calibration and the camera-imu system is moved in front of the target to excite all IMU axis. It is important to have good illumination and to keep the camera shutter times low to avoid motion blur while exciting the IMU.
Good results have been obtained by using a camera rate of 20 Hz and an IMU rate of 200 Hz.
Tips:
- try to excite all IMU axes (rotation and translation)
- avoid shocks, especially at the beginning/end when you pick up the sensor
- keep the motion blur low:
- low shutter times
- good illumination
WARNING: If you are using a calibration target with symmetries (checkerboard, circlegrid), movements which could lead to flips in the target pose estimates have to be avoided. To avoid this problem entirely the use of an Aprilgrid is recommended.
###3) Running the calibration The tool must be provided with the following input:
-
--bag filename.bag
ROS bag containing the image and IMU data
-
--cam camchain.yaml
intrinsic and extrinsic calibration parameters of the camera system. The output of the multiple-camera-calibration tool can be used directly here. (see YAML formats)
-
--imu imu.yaml
contains the IMU statistics and the IMU's topic (see YAML formats)
-
--target target.yaml
the calibration target configuration (see Cailbration targets)
The calibration can be run using:
kalibr_calibrate_imu_camera --bag [filename.bag] --cam [camchain.yaml] --imu [imu.yaml] --target [target.yaml]
The temporal calibration is turned off by default and can be enabled using the --time-calibration argument. More information about options is available using the help argument:<br>
kalibr_calibrate_imu_camera --h
###4) The output The calibration will produce the following output files:
- report-imucam-%BAGNAME%.pdf: Report in PDF format. Contains all plots for documentation.
- results-imucam-%BAGNAME%.txt: Result summary as a text file.
- camchain-imucam-%BAGNAME%.yaml: Results in YAML format. This file is based on the input camchain.yaml with added transformations (and optionally time shifts) for all cameras with respect to the IMU. Please check the format on the YAML formats page.
##An example using a sample dataset Download the dataset from the Downloads page and extract it. The archive will contain the bag, calibration target and IMU configuration file.
The calibration can be started using:
kalibr_calibrate_imu_camera --target april_6x6.yaml --cam camchain.yaml --imu imu_adis16448.yaml --bag dynamic.bag --bag-from-to 5 45
*NOTE: * Because there are shocks in the dataset (sensor pick-up/lay-down), only the data between 5 to 45 s is used.
Please cite the appropriate papers when using this toolbox or parts of it in an academic publication.
- Paul Furgale, Joern Rehder, Roland Siegwart (2013). Unified Temporal and Spatial Calibration for Multi-Sensor Systems. In Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), Tokyo, Japan.
- Paul Furgale, T D Barfoot, G Sibley (2012). Continuous-Time Batch Estimation Using Temporal Basis Functions. In Proceedings of the IEEE International Conference on Robotics and Automation (ICRA), pp. 2088–2095, St. Paul, MN.
Multiple camera calibration
Camera-IMU calibration
Multi-IMU and IMU intrinsic calibration
Rolling Shutter camera calibration
(only ROS):
Camera focus
Calibration validator
ROS2 support
Supported camera models
Calibration targets
Bag format
YAML formats
IMU Noise Model
Example: Calibrating a VI-Sensor
Example: Calibrating RealSense Cameras