Skip to content

GTSAM optimizers + Constraints#404

Merged
dellaert merged 8 commits intomasterfrom
feature/use_gtsam_constraints
Feb 7, 2026
Merged

GTSAM optimizers + Constraints#404
dellaert merged 8 commits intomasterfrom
feature/use_gtsam_constraints

Conversation

@dellaert
Copy link
Member

@dellaert dellaert commented Feb 1, 2026

This PR migrates GTDynamics from its internal constrained optimization implementation to GTSAM's native constrained optimization infrastructure.

See copilot's overview below.

Copy link
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

This PR migrates GTDynamics from its internal constrained optimization implementation to GTSAM's native constrained optimization infrastructure. The changes integrate GTSAM's NonlinearEqualityConstraints, PenaltyOptimizer, and AugmentedLagrangianOptimizer to replace the corresponding GTDynamics classes.

Changes:

  • Removed GTDynamics' EqualityConstraint, PenaltyMethodOptimizer, and AugmentedLagrangianOptimizer implementations in favor of GTSAM equivalents
  • Added new optimizer infrastructure including HistoryLMOptimizer, QPSolver, SQPOptimizer, and IPOptOptimizer (with optional IFOPT support)
  • Updated all tests, examples, and Python bindings to use the new GTSAM-based constraint API
  • Added comprehensive CI documentation and consolidated GitHub Actions workflows

Reviewed changes

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

Show a summary per file
File Description
gtdynamics/optimizer/EqualityConstraint.{h,cpp} Removed - replaced by gtsam::NonlinearEqualityConstraint
gtdynamics/optimizer/PenaltyMethodOptimizer.{h,cpp} Removed - replaced by gtsam::PenaltyOptimizer
gtdynamics/optimizer/AugmentedLagrangianOptimizer.{h,cpp} Removed - replaced by gtsam::AugmentedLagrangianOptimizer
gtdynamics/optimizer/Optimizer.cpp Updated to use GTSAM optimizers via helper function
gtdynamics/constrained_optimizer/* New directory with base class and advanced optimizers (SQP, IPOpt)
gtdynamics/optimizer/QPSolver.{h,cpp} New equality-constrained QP solver
gtdynamics/optimizer/HistoryLMOptimizer.h New LM optimizer that stores iteration history
gtdynamics/manifold/* Updated to use gtsam::NonlinearEqualityConstraints
tests/* Updated constraint instantiation to use GTSAM API
examples/* Updated to use new GTSAM constrained optimization API
CMakeLists.txt Added IFOPT support and new source subdirectories
README.md Added constrained optimization documentation and benchmark results
.github/workflows/common-ci.yml Consolidated CI workflow with C++ and Python testing

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dellaert dellaert force-pushed the feature/use_gtsam_constraints branch from 60d8304 to f45221c Compare February 3, 2026 03:22
@dellaert dellaert changed the base branch from master to feature/gtsam_optimizers February 3, 2026 03:23
@dellaert
Copy link
Member Author

dellaert commented Feb 3, 2026

@copilot open a new pull request to apply changes based on the comments in this thread

Copy link
Contributor

Copilot AI commented Feb 3, 2026

@dellaert I've opened a new pull request, #408, to work on those changes. Once the pull request is ready, I'll request review from you.

@dellaert dellaert marked this pull request as ready for review February 3, 2026 03:26
@dellaert dellaert mentioned this pull request Feb 3, 2026
Copilot AI and others added 2 commits February 3, 2026 03:27
…or message

Co-authored-by: dellaert <10515273+dellaert@users.noreply.github.com>
Co-authored-by: dellaert <10515273+dellaert@users.noreply.github.com>
@yetongumich
Copy link
Collaborator

LGTM.

Currently, we seem to still keep two versions (GTSAM version and GTDynamics version) of ConstrainedOptimizer.h and ConstrainedOptimizationProblem. But it seems necessary to support the unmigrated optimizers in GTDynamics.

Base automatically changed from feature/gtsam_optimizers to master February 6, 2026 22:26
Address code review comments: pragma placement, comment style, and error messages
@dellaert dellaert merged commit ab39a92 into master Feb 7, 2026
6 checks passed
@dellaert dellaert deleted the feature/use_gtsam_constraints branch February 7, 2026 04:28
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