Skip to content

Continuous Time GP Factor Graph#2514

Merged
dellaert merged 13 commits intoborglab:developfrom
utiasASRL:ct-gp-pr/wnoa-factor-graph
May 5, 2026
Merged

Continuous Time GP Factor Graph#2514
dellaert merged 13 commits intoborglab:developfrom
utiasASRL:ct-gp-pr/wnoa-factor-graph

Conversation

@holmesco
Copy link
Copy Markdown
Contributor

@holmesco holmesco commented May 1, 2026

This introduces a derived factor graph class that is designed to work with the Continuous-Time Gaussian Process factors introduced in #2411. In particular, factor graph optimization leverages shared memory for values and Jacobians of interpolated states that are shared between different factors.

Our custom factor graph, WnoaFactorGraph, defines it's own version of linearize and error that use a cache for common interpolation variables. For these methods to be used by the GTSAM optimization routines (instead of the base class definitions), we implemented the following changes:

  • store NonlinearOptimizer graphs via shared_ptr to preserve derived graph dispatch
  • Updated optimization routines accordingly (use graph() to recover graph rather than referencing stored property, graph_
  • make NonlinearFactorGraph::error/linearize virtual and override them in our new factor graph

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds continuous-time WNOA interpolation-aware infrastructure to reduce redundant computation across factors by sharing interpolated state values/Jacobians during error evaluation and linearization.

Changes:

  • Introduces WNOAFactorGraph<PoseType> with interpolation metadata, batching, and optimized error() / linearize().
  • Introduces WNOALevenbergMarquardtOptimizer<PoseType> specialized for WNOAFactorGraph.
  • Updates interpolation utilities and tests to support returning either NonlinearFactorGraph or WNOAFactorGraph.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
gtsam/nonlinear/tests/testWnoaInterpFactor.cpp Adds coverage for interpolating into WNOAFactorGraph and optimizing with the new WNOA LM optimizer; updates template call site.
gtsam/nonlinear/WnoaLevenbergMarquardtOptimizer.h Declares the WNOA-specialized LM optimizer.
gtsam/nonlinear/WnoaLevenbergMarquardtOptimizer.cpp Implements the WNOA-specialized LM optimizer and explicit instantiations.
gtsam/nonlinear/WnoaInterpolator.h Renames PSD parameter/member to q_psd_diag_ for clarity/consistency.
gtsam/nonlinear/WnoaInterpolator.cpp Updates implementation to match the renamed PSD parameter/member.
gtsam/nonlinear/WnoaInterpFactor.h Generalizes interpolateFactorGraph to return either NonlinearFactorGraph or WNOAFactorGraph.
gtsam/nonlinear/WnoaFactorGraph.h Declares the new interpolation-aware factor graph class.
gtsam/nonlinear/WnoaFactorGraph.cpp Implements interpolation caching/batching plus optimized error() / linearize() and explicit instantiations.

Comment thread gtsam/nonlinear/WnoaFactorGraph.cpp Outdated
Comment thread gtsam/nonlinear/WnoaFactorGraph.cpp Outdated
Comment thread gtsam/nonlinear/WnoaInterpFactor.h Outdated
Comment thread gtsam/nonlinear/WnoaLevenbergMarquardtOptimizer.h Outdated
Comment thread gtsam/nonlinear/WnoaLevenbergMarquardtOptimizer.cpp Outdated
Comment thread gtsam/nonlinear/WnoaFactorGraph.h
Comment thread gtsam/nonlinear/WnoaFactorGraph.h Outdated
@holmesco holmesco marked this pull request as ready for review May 4, 2026 00:47
@holmesco holmesco requested a review from Copilot May 4, 2026 15:06
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 4 comments.

Comment thread gtsam/nonlinear/WnoaInterpFactor.h Outdated
Comment thread gtsam/nonlinear/WnoaFactorGraph.h Outdated
Comment thread gtsam/nonlinear/WnoaFactorGraph.cpp Outdated
Comment thread gtsam/nonlinear/WnoaFactorGraph.cpp
Copy link
Copy Markdown
Member

@dellaert dellaert left a comment

Choose a reason for hiding this comment

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

Awesome! LGTM!
Proof in pudding will be a cool Python notebook that runs on colab as well :-)

@dellaert dellaert merged commit 4150d00 into borglab:develop May 5, 2026
32 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