Skip to content

C202 Lesson 4: The Time Offset, Several IMUs and Wrist Sensors

Kalibr’s camera–IMU calibration writes one number that is easy to skim past: timeshift_cam_imu. A few milliseconds of unmodelled offset are enough to degrade visual-inertial tracking, and the number changes when the IMU filter or the exposure changes. This lesson covers the offset, then the two cases one camera–IMU pair does not cover: rigs with more than one IMU, and sensors on the wrists. The full treatment is on Camera-IMU Time Offset and Multiple IMUs and Head-to-Wrist Extrinsics.

See also the glossary’s calibration and synchronisation sections.

Term Meaning
Time offset t_d The shift that makes camera and IMU timestamps agree: t_imu = t_cam + t_d
Latency A fixed delay between a sample being taken and being timestamped; it looks exactly like an offset
Exposure midpoint The middle of a frame’s exposure, the instant that best represents it for motion
Online calibration Estimating t_d inside the tracker, from every recording
Inter-IMU extrinsics The fixed rotation and translation of a second IMU relative to the reference IMU on the same rigid structure
Head-to-wrist transform The pose of a wrist sensor in the head frame; it changes whenever the arm moves

The YAML formats page defines the field as “timeshift between camera and IMU timestamps in seconds (t_imu = t_cam + shift)”. Add it to a camera timestamp to get the same instant on the IMU clock. The results file prints it as timeshift cam0 to imu0: [s] (t_imu = t_cam + shift).

What timeshift_cam_imu means Two timelines. The top one is the camera clock with an image timestamp t_cam. The bottom one is the IMU clock, with many IMU samples. An arrow from t_cam on the camera line to a point on the IMU line is labelled plus shift, and that point is labelled t_imu = t_cam + shift: the instant on the IMU clock that the image really belongs to. camera clock: image timestamps IMU clock: IMU samples t_cam + shift t_imu = t_cam + shift
timeshift_cam_imu is the number of seconds to add to a camera timestamp to get the same instant on the IMU clock: t_imu = t_cam + shift. A negative value means the image's true IMU-clock time is earlier than its camera timestamp.

From the definition (The sign convention): camera timestamps that are late relative to the IMU’s give a negative value; IMU timestamps that are late, from heavy IMU filtering or a camera stamped at the start of exposure, give a positive one. Other tools may use the opposite sign, and a correction applied with the wrong sign doubles the error instead of cancelling it.

Every stage between a physical event and its timestamp adds delay, and the camera’s path differs from the IMU’s. Published measurements, from the field guide’s table of causes:

Cause Measured effect
IMU readout delay, one microcontroller triggering cameras and reading the IMU a constant 5.3 ms (TUM VI)
IMU digital filter setting 1.55, 5.26 and 19.95 ms on the same IMU for three filter widths (VersaVIS)
Images stamped at the start of exposure offset grew with exposure, fitted slope 0.498 (Furgale et al.)
Commercial sensor, default SDK timestamps 12.74 ms in a handheld recording, slope around 0.5 with exposure (RealSense ZR300)

Two lessons follow. The IMU filter is part of the calibration: the VersaVIS authors wrote that “time offset is highly dependent on the imu filter configuration”, so a firmware change to the IMU’s rate or filter invalidates the offset. Exposure moves the offset unless frames are stamped at mid-exposure. With start-of-exposure stamps, a drop in exposure from 20 ms to 1 ms changes the offset by 0.5 × 19 = 9.5 ms. The fixes are to stamp at mid-exposure, to shift each trigger by half the exposure, or to log every frame’s exposure and correct the stamps afterwards.

To find out which you have, calibrate at several fixed exposure times and fit the offset against exposure: a slope near +0.5 means start-of-exposure stamps, near −0.5 end-of-exposure stamps, near 0 mid-exposure stamps (Offline estimation with Kalibr).

Qin and Shen shifted the IMU timestamps of the EuRoC benchmark and ran VINS-Mono without temporal calibration: “The performance deteriorates dramatically when the time offset increases. The tolerance interval is only within 6 milliseconds.” With online calibration, accuracy no longer depended on the offset (Qin and Shen, 2018; How much offset a tracker tolerates).

Kalibr first estimates the offset by correlating the angular speed the cameras see with the angular speed the gyroscope measures, then refines it in the batch estimate. The --timeoffset-padding option (0.03 s by default) bounds that refinement. The multi-IMU page explains that “an initial guess for the temporal offset is obtained from correlating absolute angular velocities as perceived independently by camera and IMU”, that the padding is “merely a guess for the bounds within which this offsets will vary during calibration”, and that “trouble finding an appropriate value likely hints to issues in the dataset”. The source does the same: the reported shift is the correlation prior plus the refined part (getResultTimeShift in IccSensors.py).

Online estimation, and when one number is not enough

Section titled “Online estimation, and when one number is not enough”

An offline offset goes stale if the rig restarts into a different buffering delay, the exposure changes, or the clocks drift. Modern trackers keep t_d in their state: Li and Mourikis (2014) proved it “is locally identifiable, except in a small number of degenerate motion cases”, and OpenVINS and VINS-Mono estimate it while running. Rotation is what makes it observable, and egocentric recordings have plenty of head rotation (Online estimation in visual-inertial trackers).

If camera and IMU run on different oscillators, the offset grows steadily and no constant can keep up. The hardware answer is one clock for every sensor; RoboCap’s shared TCXO means drift “affects the absolute timeline only and not inter-sensor synchronization” (When the offset changes during a recording). A steadily changing online estimate over a long recording is the sign to look for.

Current rigs often carry two IMUs on one rigid head unit; RoboCap, the 6C cap and Aria Gen 2 all do (Multiple IMUs on one rigid body). Their relative pose is fixed, so it is calibrated once per build. Kalibr does it in the same camera–IMU run (Multi-IMU and IMU intrinsic calibration):

  • one imu.yaml per IMU after --imu: “The first IMU will be the reference IMU (IMU0)”;
  • one model per IMU after --imu-models;
  • the IMUs synchronised beforehand: only the cameras’ offset to IMU0 is estimated by maximum likelihood. --imu-delay-by-correlation estimates the other IMUs’ offsets by correlation, which “will not be as accurate as the maximum-likelihood estimate”.

The wiki’s form of the command:

Terminal window
kalibr_calibrate_imu_camera --bag [filename.bag] --cam [camchain.yaml] --imu [imu0.yaml ... imuN.yaml] --imu-models [MODEL0 ... MODELN] --target [target.yaml]

The lever-arm term that separates the IMUs is small at slow rotation, so the motion must be brisk and must vary: “motions such as constant acceleration or rotation along a single axis at a constant rate result in a failure mode” (Lee, Hanley and Bretl, 2022). Their IMU-only method needs no target; in their hardware tests Kalibr succeeded on 1 of 21 runs with a poorly lit target, and their method on all 21.

A wrist camera or IMU has no rigid link to the head, so there is no constant head-to-wrist transform to calibrate. It has to be measured every frame, by SLAM on each wrist device, a shared map, an XR headset’s controller tracking, or markers, or designed out by recording relative motion (Head and wrist sensors: no fixed extrinsic). Calibration moves to the fixed parts of that chain.

Extrinsics: where each sensor sits relative to the others A head seen from above with a stereo camera pair at the front and an IMU behind them. Each sensor has its own coordinate frame. The rotation and translation from the left camera to the right camera, and from the camera to the IMU, are fixed by the rig and are calibrated once. A wrist camera's position relative to the head changes every frame, so it is tracked, not calibrated. Every sensor also needs its time offset. left to right: R, t Fixed by the rig: calibrate once camera to IMU: R, t IMU wrist camera Moves every frame: tracked, not calibrated plus, for every sensor: its time offset
Extrinsics are the rotation R and translation t between sensors. On a rigid head unit they are fixed and calibrated once; a wrist camera moves relative to the head, so its pose is tracked frame by frame instead.

Integrating a wrist IMU alone drifts: in DexCap’s test, IMU-only tracking was 8.0 ± 3.1 cm off on returning to the start, against 0.4 ± 0.2 cm with SLAM.

  1. Kalibr reports timeshift_cam_imu = -0.004. Which stream’s timestamps are late, and what do you add to a camera timestamp to get IMU time?
  2. You calibrated at a 2 ms exposure. In the field, auto-exposure runs from 1 to 20 ms, and your frames are stamped at the start of exposure. Is the calibrated offset still right?
  3. Firmware raises the IMU’s filter width. Do you keep the old offset?
  4. Your rig has two IMUs read by different microcontrollers with no shared clock. What does Kalibr assume, and what does that mean for accuracy?
  5. Why can’t you calibrate the transform between the head camera and a wrist camera once, as you did with T_cam_imu?
  1. The camera’s: a negative shift means the image’s true IMU-clock time is earlier than its camera timestamp. Add −0.004 s to the camera timestamp.
  2. No. With start-of-exposure stamps the offset moves by half the change in exposure, up to 0.5 × 19 = 9.5 ms here. Stamp at mid-exposure, shift the trigger, or correct per frame from the logged exposure.
  3. No. The filter setting changes the offset, by up to about 18 ms between filter widths in the VersaVIS measurements. Recalibrate.
  4. That the IMUs are synchronised to each other. Without that, --imu-delay-by-correlation gives each extra IMU an offset from correlation, which is less accurate than the maximum-likelihood estimate; one time base for every IMU avoids the problem.
  5. The arm moves, so the transform changes every frame. It has to be tracked per frame (or designed out), not calibrated once.