Skip to content
PreciSim
physics

Ground truth and tolerances

What "truth" means here, how deviation is computed, where tolerances come from — and why a small residual does not mean a good calibration.

What ground truth is

On a virtual device, truth is the parameter set used to generate the scene, not something recovered by another algorithm:

Chain Truth
Pixel size mm/px computed analytically from intrinsics and working distance
Hand-eye The camera-to-tool pose written in the configuration
Intrinsics fx, fy, cx, cy, k₁, k₂, p₁, p₂ from the configuration
Galvo field The distortion table used to generate the field
Z focus The focal plane position in the optical model
Stage geometry Squareness and centre of rotation from the configuration

So truth scoring is not "solve it again a different way" — it reconciles your result against the generator's input. This is the one decisive advantage a virtual device has over real hardware.

Residual ≠ deviation

The single most useful sentence in this documentation.

Definition What it tells you
Residual Fit error against the data used in the solve How self-consistent model and data are
Deviation Difference between your result and truth Whether the calibration is right

A small residual only says "your model explains the data you collected". If the data itself is systematically flawed — distortion uncorrected, poses clustered in the centre, unidirectional approach hiding backlash — the residual stays small and the deviation gets large.

Step 4 of Lab 1 makes this happen on purpose: exaggerate distortion and the residual RMS rises only from 0.08 px to 0.21 px, which looks tolerable, while the actual deviation goes from 0.018 mm to 0.15 mm — three times over tolerance.

How deviation is computed

Chains have different units, so each is reduced to an equivalent length error over the nominal working range, which makes them comparable:

Chain Deviation
Pixel size |scale_est − scale_true| / scale_true × L_ref, with L_ref = 20 mm
Hand-eye RMS Euclidean distance between predicted and true positions at test poses
Intrinsics Reprojection RMS (px) at test points, plus the equivalent mm error at field edge
Galvo field RMS and max in-field residual after correction (µm)
Z focus Standard deviation across independent runs (µm), plus offset from the true focal plane
Stage geometry Diagonal length error after compensation (mm/m)

Verify data must not have been used in the solve, or none of these numbers mean anything.

Where tolerances come from

Not from intuition — from an error budget, worked backwards:

  1. State the figure you must hold, e.g. "placement accuracy ±0.05 mm (3σ)";
  2. List every contributor: calibration, motion, vision repeatability, part tolerance, thermal drift;
  3. Combine in quadrature (RSS), because these are independent:
σ_total = sqrt(σ_calib² + σ_motion² + σ_vision² + σ_part² + σ_thermal²)
  1. Allocate a budget to each so that 3σ_total ≤ 0.05 mm.

The default budget for demo-2axis-vision:

Contributor 1σ (mm) Share of variance
Calibration (C1+C2+C3 combined) 0.0080 36 %
Motion (repeatability + backlash) 0.0042 10 %
Vision repeatability 0.0095 51 %
Part tolerance 0.0020 2 %
Thermal drift (over 30 min) 0.0015 1 %
RSS total 0.0133 3σ = 0.040 mm ✓

Read the shares, not the absolute values. On this machine vision repeatability is half the variance, so further work on the calibration algorithm buys little — better illumination and larger circles buy a lot. Telling you where not to optimise is what an error budget is for.

Carrying this to real hardware

There is no truth on a real machine, but the budget still applies; only the verification changes:

  • use a more accurate reference — indicator, gauge blocks, interferometer, a better target;
  • substitute consistency for accuracy: 30 repeats at one position, look at the spread;
  • use a closed-loop check: calibrate, perform a move of known size, measure the result.

The value of the virtual device is that you practise the method while the answer is known, so that on real hardware you can tell whether the number you measured is plausible at all.

Last updated: Sep 21, 2026
Was this page helpful?