Skip to content

[codex] Move covariance recovery into GaussianBayesTree and expose ISAM2 queries#2486

Open
dellaert wants to merge 2 commits intodevelopfrom
feature/covarianceRecovery
Open

[codex] Move covariance recovery into GaussianBayesTree and expose ISAM2 queries#2486
dellaert wants to merge 2 commits intodevelopfrom
feature/covarianceRecovery

Conversation

@dellaert
Copy link
Copy Markdown
Member

@dellaert dellaert commented Apr 2, 2026

Summary

Move Gaussian covariance recovery into GaussianBayesTree, keep Marginals as a thin nonlinear wrapper, and expose the same joint-marginal query surface on ISAM2.

What Changed

  • move JointMarginal out of Marginals into gtsam/linear
  • add marginal/joint information and covariance APIs on GaussianBayesTree
  • refactor Marginals to forward to the Gaussian Bayes-tree query layer
  • add matching marginal/joint information and covariance APIs on ISAM2
  • expose the new GaussianBayesTree and inherited ISAM2 query methods in the Python wrapper
  • expand the ISAM2.ipynb notebook with examples for the new Python methods, including Bayes-tree visualization

Why

The query machinery already lived on the Bayes-tree. This change moves the covariance logic to the new filegtsam/linear/GaussianBayesTreeQueries.h so GaussianBayesTree, Marginals, and ISAM2 all use the same implementation and expose the same API.

Validation

New tests and example code in gtsam/nonlinear/doc/ISAM2.ipynb

@dellaert dellaert marked this pull request as ready for review April 2, 2026 04:05
@dellaert dellaert requested a review from akshay-krishnan April 2, 2026 04:05
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

timeSFMBAL benchmark

  • Head: 5465abfcbdf1748955881b8e737a0a70bd145a8b
  • Base: 4f934679852002abc6e2375c4e63203091e81b1f
Runner Metric Base (s) Head (s) Delta (s) Change
linux-arm64-tbbOFF timeSFMBAL/dubrovnik-135-90642-pre.txt/MultifrontalCholesky 9.555637 9.495674 -0.059963 -0.63%
linux-arm64-tbbOFF timeSFMBAL/dubrovnik-135-90642-pre.txt/MultifrontalSolver 12.775944 12.779119 +0.003175 +0.02%
linux-arm64-tbbON timeSFMBAL/dubrovnik-135-90642-pre.txt/MultifrontalCholesky 5.390597 5.099988 -0.290610 -5.39%
linux-arm64-tbbON timeSFMBAL/dubrovnik-135-90642-pre.txt/MultifrontalSolver 9.483978 9.322370 -0.161609 -1.70%
linux-x64-tbbOFF timeSFMBAL/dubrovnik-135-90642-pre.txt/MultifrontalCholesky 11.358722 11.134132 -0.224590 -1.98%
linux-x64-tbbOFF timeSFMBAL/dubrovnik-135-90642-pre.txt/MultifrontalSolver 17.758466 17.817258 +0.058792 +0.33%
linux-x64-tbbON timeSFMBAL/dubrovnik-135-90642-pre.txt/MultifrontalCholesky 7.020114 7.063556 +0.043442 +0.62%
linux-x64-tbbON timeSFMBAL/dubrovnik-135-90642-pre.txt/MultifrontalSolver 14.902960 14.853715 -0.049245 -0.33%
macos-arm64-tbbOFF timeSFMBAL/dubrovnik-135-90642-pre.txt/MultifrontalCholesky 27.519250 35.805064 +8.285814 +30.11%
macos-arm64-tbbOFF timeSFMBAL/dubrovnik-135-90642-pre.txt/MultifrontalSolver 18.556236 20.350199 +1.793964 +9.67%
macos-arm64-tbbON timeSFMBAL/dubrovnik-135-90642-pre.txt/MultifrontalCholesky 37.497139 39.071487 +1.574348 +4.20%
macos-arm64-tbbON timeSFMBAL/dubrovnik-135-90642-pre.txt/MultifrontalSolver 16.063489 20.747896 +4.684407 +29.16%

Worker runs

Role Runner SHA Conclusion
head linux-x64 5465abfcbdf1748955881b8e737a0a70bd145a8b success
base linux-x64 4f934679852002abc6e2375c4e63203091e81b1f success
head linux-arm64 5465abfcbdf1748955881b8e737a0a70bd145a8b success
base linux-arm64 4f934679852002abc6e2375c4e63203091e81b1f success
head macos-arm64 5465abfcbdf1748955881b8e737a0a70bd145a8b success
base macos-arm64 4f934679852002abc6e2375c4e63203091e81b1f success

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