Skip to content

Corrected-dataset export

camcalib apply-calib takes a cam-IMU calibration and a raw ROS1 bag and writes a new bag with the calibration already applied — IMU intrinsics and bias removed, every stream on one timeline. Downstream consumers then get corrected data without having to know anything about the calibration.

Config-driven, like the calibrator:

Terminal window
camcalib apply-calib -c recalib.yaml

Or by flags:

Terminal window
camcalib apply-calib --calib cam_imu.json --in raw.bag --out corrected.bag

Output defaults to <bag>.corrected.bag. The calibration records each sensor’s source topic, so the topic→sensor mapping is derived automatically — there is no map to hand-write. --map exists for the cases where you must override it.

CorrectionDetail
IMU intrinsicsDw / Da / Tg removed via the inverse model
Static biasRemoved, unless --keep-bias
Time alignmentEvery camera and auxiliary IMU re-stamped onto the base-IMU timeline by its td
Gyro↔accel offsetBase-IMU accel channel re-interpolated at t + t_ga, when t_ga was calibrated
UndistortionImages undistorted, with --undistort

A provenance sidecar is written alongside the bag recording what was applied.

A batch runner applies one calibration across a whole dataset family, which is the usual case: one calibration per rig, many recordings.

A correct calibration, applied to its own bag, must make that bag recalibrate to nothing left to correct — every Dw/Da at identity, biases at zero, while the extrinsics and stereo baseline stay put. That check is automated:

Terminal window
camcalib roundtrip -c cam_imu.yaml

See Round-trip validation.

TUM MIC05 and TUM-VI raw, where the correction is bit-exact and the corrected bag recalibrates to near-identity IMU intrinsics. On the T265, t_ga goes from −6.32 ms to +0.53 ms and camera td from −7.6 ms to −0.37 ms after correction.

Implementation: src/camcalib/recalib/; example config examples/configs/recalib_example.yaml.