Skip to content

Simulation & synthetic data

Simulation is how you separate the estimator is wrong from the data was insufficient. In CamCalib the synthetic data is built from a real calibration, so the simulated rig is the rig you actually calibrated rather than an idealised stand-in.

studies/calib_video_real.py re-runs a calibration and renders it. With --sim it goes further: a GroundTruth is rebuilt from the result, every camera is re-simulated against it, and you get a second video built from synthetic observations.

Terminal window
python studies/calib_video_real.py cam_imu.yaml --sim

Because the twin’s true parameters are exactly the ones the real run reported, any disagreement between the two is the estimator’s, not the data’s.

--recover calibrates the simulated data and prints per-sensor error of the recovered parameters against the ground truth they were generated from:

Terminal window
python studies/calib_video_real.py cam_imu.yaml --sim --recover

This is the sharpest check available. If a parameter cannot be recovered from synthetic data generated by its own value — noise-free geometry, known answer — it will never be recovered from a real bag. A failure here is a modelling or observability problem, never a data-quality one.

Rendered in the IMU world frame:

  • A growing trajectory, drawn to the current time, with start/end markers
  • Per-camera detection-vs-reprojection panels labelled with the ROS topic or EuRoC folder, per-corner residuals coloured green/orange/red, board coverage, per-frame RMS
  • IMU position and orientation curves with a moving cursor
  • A rig layout panel — every camera and IMU drawn as a coordinate frame at its calibrated extrinsics, zoomed to the rig and moving with the trajectory (--rig-view=elev,azim)

Videos land in results/videos/. The rig panel is the fastest way to catch a sign error or a swapped sensor: a mirrored or inside-out rig is obvious at a glance and nearly invisible in a table of numbers.

For real data, per-dataset ground truth lives in examples/regression/gt/. Where a dataset has one, the regression dashboard annotates every parameter with its deviation — Δ +0.27% GT=190.97 — colour-coded by accuracy band. See Evaluation & metrics.

Two substitutes, in order of strength:

  1. Round-tripcamcalib roundtrip applies the calibration to its own bag and recalibrates. PASS requires IMU intrinsics to collapse and geometry to hold.
  2. Repeatability — a batch sweep across sequences of the same rig. Parameters that move between sequences were not constrained by the motion in them.