Skip to content

Bring Galilean PIM in line with templated IMU preintegration - #2759

Merged
dellaert merged 3 commits into
developfrom
codex/galilean-pim-template
Aug 29, 2026
Merged

Bring Galilean PIM in line with templated IMU preintegration#2759
dellaert merged 3 commits into
developfrom
codex/galilean-pim-template

Conversation

@dellaert

@dellaert dellaert commented Aug 28, 2026

Copy link
Copy Markdown
Member

Summary

  • refactor the Galilean backend into GalileanPreintegration and define PreintegratedImuMeasurementsG as PreintegratedImuMeasurementsT<GalileanPreintegration>
  • replace the separately implemented Galilean PIM with the common templated PIM API, including Boost, Python pickle, and MATLAB string serialization
  • expose the Galilean PIM through the normal template/typedef wrapper machinery, using the alias-serialization support from Support serialization metadata on template typedefs wrap#208
  • optimize Galilean integration, bias correction, residual, and Jacobian hot paths

Performance

The Galilean hot-path microbenchmarks improved approximately as follows:

  • integration: 0.99 us to 0.56 us per sample
  • factor residual: 158 ns to 115 ns
  • factor residual with Jacobians: 1235 ns to 954 ns

Analytical outputs and Jacobians are unchanged.

Wrapper behavior

Python and MATLAB expose PreintegratedImuMeasurementsG through the same template/typedef machinery as the other preintegration backends. The generated wrapper includes the standard PIM methods and serialization without registering a duplicate native type.

Compatibility

  • existing PreintegratedImuMeasurements, ImuFactor, and ImuFactor2 construction, serialization, naming, and APIs remain supported
  • the NEES notebook was rerun and produced unchanged results, so its output is not included

Testing

  • testGalileanImuFactor.run
  • testSerializationNavigation.run
  • targeted Python IMU, Galilean, gravity, and serialization tests in the py312 environment
  • Python extension and stub targets built
  • gtsam_matlab_wrapper generated and compiled
  • wrap test suite: 134 passed
  • git diff --check

Closes #2756

@dellaert
dellaert force-pushed the codex/galilean-pim-template branch from 0ec3a57 to f3ecf89 Compare August 28, 2026 19:02
@dellaert
dellaert requested a review from rohan-bansal August 28, 2026 21:45
7d1983fa4 Merge pull request #208 from borglab/codex/typedef-serialization
7059bae4f Support serialization metadata on template typedefs

git-subtree-dir: wrap
git-subtree-split: 7d1983fa4fee70cededa4d43915333dde83e6e9a
@dellaert
dellaert force-pushed the codex/galilean-pim-template branch 2 times, most recently from 5daeb8d to 69ccb9f Compare August 29, 2026 16:08
@dellaert

Copy link
Copy Markdown
Member Author

@rohan-bansal will merge but if you see any issues just comment and ping me on slack.

@dellaert
dellaert merged commit 2450148 into develop Aug 29, 2026
7 checks passed
@dellaert
dellaert deleted the codex/galilean-pim-template branch August 29, 2026 18:41
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.

MATLAB wrapper fails to build after Galilean IMU wrapper additions

1 participant