symforce-org / symforce

Fast symbolic computation, code generation, and nonlinear optimization for robotics
https://symforce.org
Apache License 2.0
1.41k stars 145 forks source link

IMU Preintegration #160

Closed hayk-skydio closed 1 year ago

hayk-skydio commented 2 years ago

Add a symforce.slam.imu_preintegration module that provides a symbolic implementation of tangent preintegration, and generates Python and C++ runtime functions for the main update function. Also adds a lightweight Python wrapper class to maintain state and tests against GTSAM.

hayk-skydio commented 2 years ago

Another thing to discuss @aaron-skydio is that this puts the python generated code into sym.factors. This makes sense to me and matches C++, but I doubt we want it in the symforce-sym package, and also it makes it perhaps so you have to pip install -e . before you can import it (ie the build is required to iterate)

aaron-skydio commented 2 years ago

I think it seems reasonable to put the generated python factors into symforce-sym, since we'll presumably do the same for C++ generated factor headers. Rerunning pip install -e . to update symforce-sym is something we should additionally fix though

aaron-skydio commented 1 year ago

This was moved to #279, which is now merged - further work on this should be new PR(s)