Skip to content

Golden LIO results to block unwanted degradation. - #651

Merged
JanuszBedkowski merged 11 commits into
mainfrom
mp/lio-golden-ci
Nov 24, 2026
Merged

JanuszBedkowski merged 11 commits into
mainfrom
mp/lio-golden-ci

Conversation

@michalpelka

@michalpelka michalpelka commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

HDMapping's LIO is SOTa, so no PR should change results, every change of results more than 1mm in ATE will be treated like REGRESSION and WILL NOT BE merged.
If it is changing, should be reviewed thoroughly and be backed up by results and theory.
A this moment, possible bugs in LIO are part of SOTa.
If you have an improvement for specific problem, you are welcome to add it as opted-out feature.
More on that in CONTRIBUTING.md.

michalpelka and others added 11 commits November 22, 2026 23:48
lio_to_tum.py converts a lidar_odometry_step_1 result folder to a TUM
trajectory, from session_ini_poses.mri (the poses step 1 wrote; steps 2
and 3 overwrite session_poses.mrp) and the trajectory_lio_N.csv files.

lio_ate.py computes the position RMSE of a TUM trajectory against a golden
one, paired by timestamp and without alignment, and exits non-zero when it
is above --max-ate-m (default 1 cm). It is the check for the planned CI
gate that compares step 1 output with a golden trajectory.

Both use only the Python standard library, so CI runners need no extra
packages. Checked on the HUMANOID-LIO-DATASET long-corridor recording:
v0.106 against itself gives 0.00 mm (exit 0), v0.107 gives 89.16 mm (exit 1).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0158FTTFdaEUtjG7Jvj6EGip
Adds the composite action .github/actions/lio-regression, run after the
unit tests on Linux, Windows and macOS. It downloads the long-corridor
recording of the HUMANOID-LIO-DATASET (Zenodo 10.5281/zenodo.21318128,
MD5-checked and cached), runs lidar_odometry_step_1 with default
parameters, converts the result with scripts/lio_to_tum.py and fails when
scripts/lio_ate.py reports an ATE above 1 cm against
tests/golden/long-corridor.tum. The trajectory and run report are uploaded
as an artifact on every run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0158FTTFdaEUtjG7Jvj6EGip
A PR must not change the step 1 trajectory; CI enforces it against
tests/golden/long-corridor.tum. An intended improvement needs results on
datasets against ground truth and a theory that explains it. Updating the
golden trajectory, the check or its tolerance needs approval from
michalpelka or januszbedkowski (CODEOWNERS). AGENTS.md gets the short form
of the rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0158FTTFdaEUtjG7Jvj6EGip
The first CI run showed macOS writing the same 22000 poses with timestamps
that differ from Linux by up to 0.7 us (the last digits of a double at
1.8e9 s), so exact string matching rejected them as different poses.
Poses are now paired in order and their timestamps must agree within
--max-dt-s (default 1e-5 s).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0158FTTFdaEUtjG7Jvj6EGip
tests/golden/long-corridor.tum is the lio-long-corridor-Linux artifact of
the first CI run of this PR (Release, ubuntu-24.04, default parameters).
main gives the same step 1 trajectory as v0.106 after #650: this file
matches a local v0.106-equivalent run with an ATE of 0.00 mm.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0158FTTFdaEUtjG7Jvj6EGip
long-corridor (62 m) never reaches the 200 m sliding-window reset, and the
step 1 trajectory on it depends on which point decimate() keeps per voxel:
Linux closes the loop, Windows slips 10 m, macOS is 8 cm off. Each platform
is repeatable, but the recording is too degenerate to be a reference.

calibration-room/trial-1 of the same Zenodo dataset (380 s, ~300 m) is the
recording v0.107 diverged on, so the check would have caught #597 and #598.
The golden trajectory is the v0.106 result on Linux; a second v0.106 run
matches it with an ATE of 0.00 mm and v0.107 is 38 m RMSE off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0158FTTFdaEUtjG7Jvj6EGip
Each platform repeats its own step 1 result exactly (two CI runs, and a
local Windows laptop against the CI runner: 0.00 mm), but the platforms
differ from each other on calibration-room/trial-1: Windows by 10.27 mm,
macOS by 15.15 mm from Linux. The difference comes from compilers and
standard libraries (for example how std::sort orders equal elements in
decimate()), not from the odometry going wrong: all three end where
v0.106 ends.

The check now compares with tests/golden/calibration-room-trial-1-<OS>.tum.
Linux is the v0.106 result; Windows and macOS are the CI artifacts of the
previous run of this PR, on the same code. lio_to_tum.py always writes LF
line endings, so the files are byte-comparable across platforms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0158FTTFdaEUtjG7Jvj6EGip
Each platform repeats its own trajectory with an ATE of 0.00 mm, so 1 cm
was looser than needed, and it would have let #598 (deg to rad) through on
its own: on calibration-room/trial-1 that change moves the trajectory by
2.49 mm RMSE (20.8 mm max). 1 mm catches it.

An exact checksum would be about as strict (the TUM file keeps 1 um), but
it reports nothing about the size of a difference.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0158FTTFdaEUtjG7Jvj6EGip
The Linux golden file came from a local RelWithDebInfo build of v0.106.
The CI Release build of the same code differs from it by 0.37 mm RMSE
(5.88 mm max) on calibration-room/trial-1, too close to the 1 mm limit.
All three golden files now come from CI artifacts of commit 4b79628
(main, which gives the v0.106 trajectory). v0.107 is still 37.96 m off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0158FTTFdaEUtjG7Jvj6EGip
AUTO picks compiler flags from the runner's CPU (e.g. -mavx2 on Intel Linux
runners), so the LIO trajectory changed by 0.37 mm depending on which runner
GitHub assigned. GENERIC gives the same flags on every runner. The golden
trajectories are regenerated from this build in the next commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0158FTTFdaEUtjG7Jvj6EGip
GENERIC adds -march=x86-64, which clang rejects on the arm64 macOS runners.
AUTO on Apple Silicon adds no CPU-dependent flags, so macOS stays on AUTO.

The Windows golden comes from the GENERIC CI build (run 45141279525). The
Linux GENERIC build reproduced the existing Linux golden byte for byte.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0158FTTFdaEUtjG7Jvj6EGip
@michalpelka
michalpelka marked this pull request as ready for review November 23, 2026 10:38
@michalpelka
michalpelka requested a review from mwlasiuk November 23, 2026 10:38
@michalpelka
michalpelka marked this pull request as draft November 23, 2026 10:42

@mwlasiuk mwlasiuk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea

@michalpelka
michalpelka marked this pull request as ready for review November 23, 2026 22:56
@JanuszBedkowski
JanuszBedkowski merged commit 0a838b4 into main Nov 24, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants