**Full Changelog**: https://github.com/symforce-org/symforce/compare/v0.7.0...v0.8.0
This is probably our biggest release yet, with multiple major additions - we have built-in IMU Preintegration, new backends for CUDA and PyTorch, and a new symbolic type for unit vectors on S(2). Plus, we've made major improvements to memory usage in the C++ optimizer, made lots of additions to the symbolic API, and made plenty of improvements under the hood.
:rotating_light: Breaking Changes
- ae434760 Slices of 1D matrices are matrices, not lists - taking a 1D slice of a `geo.Matrix` now returns a `geo.Matrix`, previously it would return a list.
- f60180e6 Add include_jacobians flag - by default, the `Optimizer` will now not allocate or populate the problem jacobian, since it is not needed for optimization. If you'd like it to be filled out, set `include_jacobians` to `true`.
- There are some simplifications to the `sym::Factor` API, described in `Code Cleanup / Refactoring` below. Most users should be unaffected.
- Generated Python functions return vectors as 1D ndarrays - see the description below
:chart_with_upwards_trend: IMU Factor
SymForce has IMU Preintegration! We have a C++ `ImuFactor` with preintegration and linearization functions generated from a symbolic implementation. See the PRs 279 and 280 for more information, and see [`imu_factor.h`](https://github.com/symforce-org/symforce/blob/main/symforce/slam/imu_preintegration/imu_factor.h) for an example.
- ab1c6211 Add an on manifold Imu Factor bradley-solliday-skydio
:mechanical_arm: CUDA Backend
The CUDA backend generates `__host__ __device__` functions, i.e. functions that you can call from within a CUDA kernel. It's currently in an experimental state, and supports scalars, vectors/matrices, and `sf.DataBuffer` in the APIs of generated functions; other types like `geo` and `cam` objects can be passed via their storage vectors. See the commit for more examples.
- 45b2ce2c CUDA Backend aaron-skydio
:fire: PyTorch Backend
The PyTorch backend generates python functions that operate on PyTorch tensors, with each symbolic op becoming one PyTorch op. It supports broadcasting these operations across multiple optional batch dimensions. Like the CUDA backend, this is currently experimental - it supports scalars and vectors/matrices in generated functions APIs, and is not particularly optimized for performance.
- a5341d81 PyTorch backend aaron-skydio
- 5835edf9 Better PyTorch test coverage aaron-skydio
:white_circle: geo.Unit3
The `Unit3` symbolic type lets you represent unit vectors in 3D, including optimizing unit vector variables and performing manifold operations on them.
- 6dadff98 Add geo.Unit3 to model directions in R^3 chao-qu-skydio
:arrow_right: Generated Python functions return vectors as 1D ndarrays
By default, generated python functions will now return 1d ndarrays for outputs that are row or column vectors (including 1x1 matrices). This includes member functions of generated python types, such as `sym.Pose3.position()`. See the commit for more information.
- 718d0614 return 1d vectors if !return_2d_vectors bradley-solliday-skydio
:dash: Optimizer Performance/API Improvements
Major improvements to memory usage in the C++ optimizer, especially for large problems like bundle adjustment that have lots of small factors. Also, converting a `sym::Values` to LCM is significantly faster.
- f60180e6 Add include_jacobians flag ryan-brott-skydio
- 5b756a65 Linearizer: stop storing dense linearized factors ryan-brott-skydio
- 1c1268a3 Turn off sort_by_offset for keys when get LCM message xipeng-wang-skydio
- c7b2715a Factor Jacobian factory functions are constructors aaron-skydio
- 8111eb28 Factor supports more functor types samuel-wang-skydio
:symbols: Symbolic API additions
- 892885bd Default to automatically picking output_names aaron-skydio
- ae434760 Slices of 1D matrices are matrices, not lists nathan-skydio
- 652bc74a Add `CSCFormat.to_matrix` nathan-skydio
- bd42ee96 Add metadata field to ResidualBlock nathan-skydio
- a9598269 Simplify geo_factors_codegen w/ skip_dir_nesting bradley-solliday-skydio
- fc4b4d5d More logic methods aaron-skydio
- 6ed28d93 Add V2.x,y and V3.x,y,z aaron-skydio
- 42b9694f Add sf.clamp aaron-skydio
- 9769ee34 Add unit_* shorthands to Matrix aaron-skydio
- 1c44a943 Pipe sparse_matrices through Codegen.function aaron-skydio
- 24eaf202 Add CodegenConfig.custom_preamble aaron-skydio
- a4d4bbc2 Check that namespaces are valid identifiers aaron-skydio
- 04acf8a9 Allow setting default epsilon to same value aaron-skydio
- f8f7eb46 Assert Matrix shape is correct when copying matrix bradley-solliday-skydio
- 23b1f84a Change default epsilon value to symbol bradley-solliday-skydio
:broom: Code Cleanup / Refactoring
- 6c3cc2d5 Cache factor indexes in the Linearizer aaron-skydio
- 9774673e Raise exception during codegen if name is not valid nathan-skydio
- 3e11ebd1 Check sparse matrix condition for Jacobian and Hessian constructors changh95
- 783ede7c Reduce the overload set of Factor constructors chao-qu-skydio
- af42fd81 DataBuffers not marked as unused aaron-skydio
- 305387d6 Reduce surface area of keys_to_func and keys_to_optimize chao-qu-skydio
- 1244d2ce Move Factor::IsSparse to the Helpers section chao-qu-skydio
- af2dff09 Optimizer asserts keys and factors are nonempty aaron-skydio
- 4a3fd727 Clear before reserve in OptimizationStats.Reset() chao-qu-skydio
- b2cceee3 Use the correct default epsilon in optimizer chao-qu-skydio
- 49018a4a Use operator bool of std::function to determine is_sparse chao-qu-skydio
- 91719064 Pass sink parameters by value and move chao-qu-skydio
- d3bb744b Change some usages of ScalarType to Scalar chao-qu-skydio
- 474f1bd5 Fix a linter error when a geo type does not define chao-qu-skydio
- 26dfa72b Matrix types cleanup aaron-skydio
- c835dbdc Reduce number of functor copies in factor creation chao-qu-skydio
- ecdeeef7 Make Key constexpr chao-qu-skydio
- da7b88d1 Include cstdint instead of stdint.h chao-qu-skydio
:gear: Infra / Buildsystem changes
- 9741edff Set min version of lazy-object-proxy to 1.9.0 bradley-solliday-skydio
- 0f4ca330 Fix symengine python_requires for setuptools 67 aaron-skydio
- 4c368815 Run tests once aaron-skydio
- 4a0e69b1 Update requirements aaron-skydio
- 2207030f requirements_test supports running from different locations aaron-skydio
- 1f53590f Add clang to CI, simplify matrix aaron-skydio
- a04ae351 symforce/test/*.py covered by pylint aaron-skydio
- 02e86d90 Use gcc 5.5 instead of 5.3 in CI aaron-skydio
- 791347a1 GitHub Actions Workflow Updates aaron-skydio
:police_officer: SkyMarshal
- 732ce358 Typescript updates vincent-lecrubier-skydio
- faeb8d18 All name functions are constexpr aaron-skydio
- 61846938 Remove unused variable aaron-skydio
- aaa593e5 Typescript changes rachel-skydio
- 6dc889a2 Add support for optional `UNKNOWN=0` alias for enums in LCM protobuf generation. karl-rosaen-skydio
- 78ad2292 Require python LCM arguments to construct using `from_all_fields` peter-skydio