Skip to content

variable dimension product groups#2450

Merged
dellaert merged 10 commits intodevelopfrom
feature/variable_product
Mar 8, 2026
Merged

variable dimension product groups#2450
dellaert merged 10 commits intodevelopfrom
feature/variable_product

Conversation

@dellaert
Copy link
Copy Markdown
Member

@dellaert dellaert commented Mar 7, 2026

  • adds support for variable-size (dynamic dimension) ProductLieGroup compositions
  • adds support for PowerLieGroup variable N (G is still fixed-size)
  • propagates GetDimension()'s return type to size_t across the library and bindings.

All tests pass, c++ and python. New c++ tests that test variable size capabilities.

@dellaert dellaert requested a review from Copilot March 7, 2026 14:43
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 support for variable-size (dynamic dimension) ProductLieGroup compositions and propagates GetDimension()'s return type to size_t across the library and bindings.

Changes:

  • Extend ProductLieGroup to support dynamic factor dimensions with runtime checks and new Expmap overloads.
  • Switch manifold dimension APIs (GetDimension, EKF dimension accessors) from int to size_t and tighten runtime matrix size validation.
  • Add/expand tests covering dynamic-dimension product groups and their Jacobians.

Reviewed changes

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

Show a summary per file
File Description
tests/testProductLieGroup.cpp Adds new tests for dynamic-dimension ProductLieGroup (Vector×Rot3, Vector×Vector) including Jacobian checks and exceptions.
tests/testNonlinearOptimizer.cpp Updates a test trait GetDimension return type to size_t to match the new dimension API.
gtsam/slam/PoseTranslationPrior.h Uses size_t for translation/pose dimensions when building Jacobians.
gtsam/nonlinear/ExtendedKalmanFilter-inl.h Updates EKF internal dimension variable to size_t.
gtsam/navigation/navigation.i Updates SWIG-exposed dimension() signature to size_t.
gtsam/navigation/ManifoldEKF.h Improves runtime matrix-size validation and switches EKF runtime dimension storage/accessors to size_t.
gtsam/linear/NoiseModel.h Removes redundant casts now that GetDimension returns size_t.
gtsam/base/VectorSpace.h Switches GetDimension to size_t and implements DynamicTraits::Expmap for partially dynamic matrices.
gtsam/base/ProductLieGroup.h Introduces dynamic-dimension support, runtime checks, and additional Expmap overloads.
gtsam/base/Manifold.h Changes GetDimensionImpl::GetDimension to return size_t for consistency.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 7, 2026

timeSFMBAL benchmark

  • Head: 90386a5bb42d17bf7ddeea21ceb3f24b217365ce
  • Base: 06b3457c3c01b1cef57bed5697844ee08dcbca4f
Runner Metric Base (s) Head (s) Delta (s) Change
linux-arm64-tbbOFF timeSFMBAL/dubrovnik-135-90642-pre.txt/MultifrontalCholesky 9.736675 9.787208 +0.050533 +0.52%
linux-arm64-tbbOFF timeSFMBAL/dubrovnik-135-90642-pre.txt/MultifrontalSolver 12.892439 12.923618 +0.031179 +0.24%
linux-arm64-tbbON timeSFMBAL/dubrovnik-135-90642-pre.txt/MultifrontalCholesky 5.556777 5.684124 +0.127347 +2.29%
linux-arm64-tbbON timeSFMBAL/dubrovnik-135-90642-pre.txt/MultifrontalSolver 9.553572 9.542690 -0.010882 -0.11%
linux-x64-tbbOFF timeSFMBAL/dubrovnik-135-90642-pre.txt/MultifrontalCholesky 11.318853 11.615621 +0.296768 +2.62%
linux-x64-tbbOFF timeSFMBAL/dubrovnik-135-90642-pre.txt/MultifrontalSolver 17.836787 18.196584 +0.359797 +2.02%
linux-x64-tbbON timeSFMBAL/dubrovnik-135-90642-pre.txt/MultifrontalCholesky 7.064142 7.638545 +0.574402 +8.13%
linux-x64-tbbON timeSFMBAL/dubrovnik-135-90642-pre.txt/MultifrontalSolver 14.929066 15.503297 +0.574231 +3.85%
macos-arm64-tbbOFF timeSFMBAL/dubrovnik-135-90642-pre.txt/MultifrontalCholesky 28.028389 34.883060 +6.854671 +24.46%
macos-arm64-tbbOFF timeSFMBAL/dubrovnik-135-90642-pre.txt/MultifrontalSolver 14.861486 22.742530 +7.881044 +53.03%
macos-arm64-tbbON timeSFMBAL/dubrovnik-135-90642-pre.txt/MultifrontalCholesky 27.158637 37.745593 +10.586956 +38.98%
macos-arm64-tbbON timeSFMBAL/dubrovnik-135-90642-pre.txt/MultifrontalSolver 14.118471 21.940098 +7.821627 +55.40%

Worker runs

Role Runner SHA Conclusion
head linux-x64 90386a5bb42d17bf7ddeea21ceb3f24b217365ce success
base linux-x64 06b3457c3c01b1cef57bed5697844ee08dcbca4f success
head linux-arm64 90386a5bb42d17bf7ddeea21ceb3f24b217365ce success
base linux-arm64 06b3457c3c01b1cef57bed5697844ee08dcbca4f success
head macos-arm64 90386a5bb42d17bf7ddeea21ceb3f24b217365ce success
base macos-arm64 06b3457c3c01b1cef57bed5697844ee08dcbca4f success

@dellaert
Copy link
Copy Markdown
Member Author

dellaert commented Mar 7, 2026

@ProfFan timing is still useless unless caching is disabled.

@dellaert dellaert marked this pull request as ready for review March 7, 2026 18:03
@dellaert dellaert requested review from Copilot and rohan-bansal March 7, 2026 18:03
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 14 out of 14 changed files in this pull request and generated 6 comments.

Copy link
Copy Markdown
Contributor

@rohan-bansal rohan-bansal left a comment

Choose a reason for hiding this comment

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

PR looks good, thanks for adding this! Will build upon it.

@dellaert dellaert merged commit 21a075c into develop Mar 8, 2026
32 checks passed
@dellaert dellaert deleted the feature/variable_product branch March 8, 2026 02:05
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