Cross-checks¶
Verification never trusts a single estimate of how the robot moved. It compares every source that says something about a part of the robot against every other one, and reports how far apart they are. A comparison only counts if the two sources could have disagreed. This page lists what is compared, which pairs don't count, and how a disagreement is turned into "this sensor is wrong".
How a pair is compared¶
Sources are grouped by the part of the robot they describe, its channel (for a mobile base, base). Each pair in a channel is compared over 1-second windows, and the disagreement is reported as a residual named <channel>:<a>_vs_<b>: how far apart the two sources' motion is, as a fraction of the distance travelled. A sensor with a 10% scale error reads as about 10%.
| Kind of motion | Warn above | Fail above |
|---|---|---|
| Planar (mobile base) | 15% | 30% |
| Joints (arms) | 8% | 20% |
Override them per pair in the robot config ("thresholds": {"base:wheel_odom_vs_scan": {"warn": 0.15, "critical": 0.3}}), or for every robot in thresholds.cross_check_defaults in ~/.quatern/config.json.
The sources¶
A sensor joins a channel's cross-checks in one of two ways, set in the robot's .quatern.json:
| Config | What verification compares | Where it comes from |
|---|---|---|
"estimates": "base" (wheel odometry, visual odometry, ...) |
x, y and heading | The source's own readings. These are the sources the localizer fuses. |
An IMU with "corroborates": "base" |
heading only | The IMU's orientation when its driver fills one in, otherwise its gyro's yaw rate, integrated. |
A 2D lidar (or a lidar point cloud) with "corroborates": "base" |
x, y and heading | Quatern Code's own scan-to-map matcher, never the localizer under test. |
A corroborating source is never fed to the localizer. Adding one changes what verification can check, not the trajectory or the drift.
The catalog sets corroborates on every IMU and 2D lidar of a mobile base, and on the Unitree Go2's lidar cloud. quatern init does the same for an IMU or 2D lidar it finds on a mobile base, and says so:
Sensors: base_odom (odometry, estimates base), lidar_scan (laserscan, cross-checks base), imu (imu, cross-checks base).
A depth camera's point cloud isn't set by default: the robot's visual or depth odometry usually comes from the same camera, so the two would share their errors.
What each pair measures¶
Odometry vs IMU (heading). The heading change each source reports in every window. The gyro measures rotation inertially and knows nothing about the wheels, so a wrong track width, or slip while turning, shows up as the odometry turning too far or too little. A gyro bias shows up as a steady drift whether the robot turns or not. A pair that only compares heading needs at least 1 rad of turning over the run to be judged; with less, it's excluded with the reason, not counted as agreement.
Odometry vs lidar. The scan matcher starts each scan at the odometry's motion since the previous scan, then moves it to where its points best fit the map built from the earlier scans. Where the walls pin the pose down, the result is the lidar's, and the difference over a window is the correction the scans had to make to the odometry. A wrong wheel radius or wheel slip makes the odometry read distance long or short; the scans catch it.
Where the scans don't pin the pose (along a featureless corridor, or with too few returns on mapped structure) the matcher could only repeat the odometry back. Those scans get no estimate. They're counted as unmatched, never as agreement:
"scan_matching": {"scan": {"prior": "wheel_odom", "scans": 596, "matched": 562,
"matched_fraction": 0.943, "unmatched": {"unconstrained": 34}}}
The reasons are unconstrained, off map and few returns. If fewer than 80% of the scans match, the lidar's pairs are excluded, with the reason.
IMU vs lidar (heading). Both are independent of the drive, so this is the pair that tells a bad IMU from bad odometry when the two disagree.
Two estimating sources (wheel odometry vs visual odometry, ...). Their full pose.
Pairs that don't count¶
A source that already contains another can't corroborate it: their agreement is the same measurement twice. Declare it with fuses on the source that does the fusing:
That pair is then never computed. The report lists it as not counted, with the reason:
"not_cross_checks": {"base:wheel_odom_vs_imu": "wheel_odom already fuses imu, so their agreement would corroborate nothing"}
In the catalog:
| Robot | What its odometry already fuses |
|---|---|
| TurtleBot 3 Burger and Waffle | turtlebot3_node takes /odom's heading from the IMU (odometry.use_imu: true). |
| TurtleBot 4 | The Create 3 base fuses its wheel encoders, IMU and optical floor sensor into /odom. |
| Clearpath Husky and Jackal | platform/odom/filtered is robot_localization's EKF over the wheels and the IMU. |
| Unitree Go2 | The leg odometry takes its heading from the IMU. |
On those robots the lidar is the independent check: it checks the odometry (distance and heading) and the IMU (heading). On the AgileX LIMO, the Jetson rover, the sim diffbot and the C101, the odometry's heading comes from the wheels, so all three pairs count.
Your own robot
If your odometry node fuses the IMU (robot_localization, a vendor base, use_imu-style options), add "fuses": ["imu"] to it. Without it, the odometry and IMU agree by construction and the report counts that as corroboration it isn't.
Telling which source is wrong¶
With only two sources, a disagreement can't say which one is wrong. Quatern Code names a source the outlier when every pair it's in disagrees, the pairs without it agree, and at least one such pair exists: two other sources independently agreeing is what singles it out. A source and the one it fuses can't outvote a third, because their pair is never compared.
The verification result carries this per channel (quatern verify --json, under corroboration):
| Field | Holds |
|---|---|
estimated_by |
The sources that estimate the channel. |
corroborated_by |
The sources whose cross-check with that estimate agreed. |
residuals |
Each source's residual against every other. |
disagreeing |
The source the disagreements point at, what its error looks like, and the likely cause. |
not_cross_checks |
The pairs that weren't compared or don't count, and why. |
The likely cause is written in plain words, for example wheel_odom reads distance 24% long against scan: likely wheel or leg slip, or a wrong wheel radius, or imu drifts 0.080 rad/s clockwise in heading against wheel_odom and scan: likely gyro bias.
A real report, on a TurtleBot 3 in the simulator's hallway:
localization (mapping mode), 1 iteration(s):
base:wheel_odom vs scan 16.1% WARN over the 15% warn limit
base:imu vs scan 8.5% pass under 15%
...
next: proceed_to_deploy — ... (base: 1 of 2 cross-checks disagree across wheel_odom, imu and scan;
not counted: wheel_odom vs imu (one fuses the other), drift 0.06) ...
The odometry-vs-IMU pair isn't counted, because the TurtleBot 3's odometry takes its heading from the IMU. The lidar checks both, and puts the warning on the wheel odometry.
One source, nothing to compare
If only one source describes a channel and nothing corroborates it, there's no pair. The report says so (single source, no cross-check is possible for it), and a READY verdict then means nothing was cross-checked for that channel.
During a deploy¶
The watchdog runs the same comparisons live: the localizer against each source of its channel, and against the plan. A pair past the critical band for 5 checks in a row, once the robot has been moving for 0.5 s, stops the run. Pairs in the warn band print a warning and go into the receipt.