Skip to content

Fix bugs in covariance estimation for some cases#29

Merged
jlblancoc merged 2 commits intodevelopfrom
fix/cov
Jan 25, 2026
Merged

Fix bugs in covariance estimation for some cases#29
jlblancoc merged 2 commits intodevelopfrom
fix/cov

Conversation

@jlblancoc
Copy link
Copy Markdown
Member

@jlblancoc jlblancoc commented Jan 25, 2026

Summary by CodeRabbit

  • Bug Fixes

    • Corrected covariance calculation indexing in pose alignment operations to ensure accurate error term computation.
  • Tests

    • Added comprehensive test suite for covariance-to-covariance ICP functionality, validating pose convergence, covariance matrix properties, robustness kernel handling, and performance with large-scale pairings.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 25, 2026

📝 Walkthrough

Walkthrough

This pull request updates the mola_common submodule, refines covariance calculation logic with corrected indexing and type casting in the MP2P-ICP library, enables a previously disabled test target, and introduces a comprehensive test suite for cov2cov (covariance-to-covariance) ICP functionality with ten distinct test cases covering convergence, robustness, and performance scenarios.

Changes

Cohort / File(s) Summary
Submodule Update
3rdparty/mola_common
Updates submodule pointer from commit 309fd4e to 1745045d; no functional code changes introduced.
Covariance Calculation Logic
mp2p_icp/src/covariance.cpp
Corrects pose component initialization (from index 0 to index 2), adds explicit static_cast<int> for MRPT block indices, adjusts base-index progression with scaled increments (multiplying by dimensions: \*4, \*3), and updates error-term block indexing for point-to-point, point-to-line, line-to-line, point-to-plane, and plane-to-plane sections; updates cov-to-cov indexing formula and covariance assignment logic.
Test Infrastructure & Suite
tests/CMakeLists.txt,
tests/test-mp2p_cov2cov.cpp
Enables new test target mp2p_cov2cov in CMakeLists; adds 609-line comprehensive C++ test suite with helper utilities for ground-truth pose and pairing generation, ten distinct test cases covering convergence, covariance validity, outlier robustness, edge cases, and large-scale (500+) pairings, plus validation logic for pose accuracy and covariance properties (symmetry, positive-definiteness, magnitude bounds).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Poem

🐰 With indices cast and dimensions aligned,
Covariance flows in perfect design,
Ten tests hop forth to verify each case,
From convergence to robustness—checked with grace!
Math precision squared, our fuzzy friend's delight. 🧮✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Fix bugs in covariance estimation for some cases' directly relates to the main changes: bug fixes in covariance handling (covariance.cpp), addition of comprehensive cov2cov tests, and submodule updates supporting the fix.
Docstring Coverage ✅ Passed Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 25, 2026

Codecov Report

❌ Patch coverage is 91.90939% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.32%. Comparing base (8c3f819) to head (3ea9c40).
⚠️ Report is 3 commits behind head on develop.

Files with missing lines Patch % Lines
tests/test-mp2p_cov2cov.cpp 95.53% 13 Missing ⚠️
mp2p_icp/src/covariance.cpp 33.33% 12 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop      #29      +/-   ##
===========================================
+ Coverage    66.19%   67.32%   +1.13%     
===========================================
  Files          165      166       +1     
  Lines         8100     8393     +293     
  Branches       879      892      +13     
===========================================
+ Hits          5362     5651     +289     
- Misses        2738     2742       +4     
Files with missing lines Coverage Δ
mp2p_icp/src/covariance.cpp 83.09% <33.33%> (+12.08%) ⬆️
tests/test-mp2p_cov2cov.cpp 95.53% <95.53%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jlblancoc jlblancoc merged commit da75a70 into develop Jan 25, 2026
15 checks passed
@jlblancoc jlblancoc deleted the fix/cov branch January 25, 2026 11:26
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.

1 participant