Skip to content

OptimizerG2O: track BA outliers per observation - #1741

Merged
matlabbe merged 3 commits into
introlab:masterfrom
admin123-abc:agent/g2o-ba-edge-outliers
Aug 10, 2026
Merged

matlabbe merged 3 commits into
introlab:masterfrom
admin123-abc:agent/g2o-ba-edge-outliers

Conversation

@admin123-abc

@admin123-abc admin123-abc commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #1652.

A rejected reprojection edge previously marked the entire landmark as an outlier. As a result, one bad observation could restore a landmark to its input position even when its other projections were valid.

This PR tracks BA outliers per (wordId, poseId) observation, matching wordReferences. Callers now remove only the rejected observation for their target pose. A landmark falls back to its input estimate only after all of its projection edges have been rejected.

A deterministic g2o regression covers:

  • a landmark with eight valid projections and one bad projection, which must remain optimized and report only the bad observation;
  • a control landmark with two rejected projections, which must fall back to its input position.

Validation:

  • Built rtabmap_core with g2o + Ceres and ran optimizer_g2o_ba_outliers successfully 20 times.
  • Built rtabmap_core with g2o disabled and Ceres enabled.
  • Added the test to the Ubuntu 24.04 CMake CI job.

Track rejected BA projections by word and pose, preserving a landmark's optimized estimate whenever at least one observation remains active. Add a deterministic g2o regression and focused Linux CTest coverage.
@matlabbe

matlabbe commented Jul 29, 2026 •

Copy link
Copy Markdown
Member

on-hold till #1492 (gtest branch) (having testing framework) is merged.

Otherwise, LGTM! You can target gtest branch instead of master to fix any merge conflicts now, otherwise I'll do it after gtest is merged to master.

@admin123-abc

Copy link
Copy Markdown
Contributor Author

Thanks! I'll wait for #1492 to be merged and handle any conflicts afterward if needed.

@matlabbe matlabbe removed the on-hold label Aug 6, 2026
@matlabbe

matlabbe commented Aug 9, 2026 •

Copy link
Copy Markdown
Member

I updated it with master and refactored gtsam and ceres to do the same. Once CI passes, I'll merge it.

@matlabbe
matlabbe merged commit df52523 into introlab:master Aug 10, 2026
29 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.

OptimizerG2O::optimizeBA(): should we track edge outliers instead of 3D point outliers?

2 participants