Skip to content

v0.5.0

Compare
Choose a tag to compare
@aaron-skydio aaron-skydio released this 29 Jun 03:36
· 411 commits to main since this release

History: v0.4.0...v0.5.0

🚨 Symbolic API moved to symforce.symbolic 🚨

The symbolic math components of SymForce are now unified under one import for ease of use:

import symforce.symbolic as sf

The symforce.symbolic module contains the SymForce-modified SymPy (or SymEngine) API, with our added logic functions and helper functions (i.e. things that were previously accessible from symforce.sympy), geometric lie group types (from symforce.geo), and camera types (from symforce.cam). If you just want the geo or cam types, those modules still exist and can be imported instead.

Usage of symforce.sympy is deprecated, you should use symforce.symbolic instead. It will be removed in a future release.

  • 46dc58b matrix.fixed_type_from_shape -> matrix_type_from_shape
  • b34909b Add deprecated symforce.sympy stub
  • 5e0afd5 Add T.Scalar to sf
  • a26a9d5 Add geo and cam to symforce.symbolic
  • 192f5cf Move sympy api to symforce.symbolic

🔣 Configurable default epsilons for library functions

SymForce now provides more flexibility around setting the default value of epsilon, its mechanism for handling singularity points.

Many library functions require an argument for epsilon, and previously defaulted it to 0 for ease of prototyping e.g. in a notebook. For runtime code, however, this can be a potential source of issues, since it can be easy to unintentionally forget to pass epsilon to one of these functions, meaning that an unhandled singularity creeps in. To address this, we have added a function sf.epsilon() which should be used as the default epsilon argument for library functions. The value that this returns is configurable - the default is 0 (so by default, behavior is the same). However, it can also be set to a symbol with sf.set_epsilon_to_symbol(), which is recommended for generating production code. Similarly, it can be set to a numerical value with sf.set_epsilon_to_number(). Either of these must be called before importing symforce.symbolic.

  • f63171c Fixed default epsilon
  • 7133947 Use sm.epsilon() as default eps
  • 8965840 sm.default_epsilon -> sm.numeric_epsiln

⚙️ Unified mechanism for adding code generation backends

We've unified much of the backend-specific differences, so that it should be easier to add new code generation backends going forward. See the PR and the example of adding a JavaScript backend for more information.

  • e4c2d19 Centralize code for creating new code generation backends

👮 SkyMarshal Updates

  • 90c4891 Enable skymarshal printing by default
  • 5fb13f7 Allow unknown notations in skymarshal
  • 06be0d8 [Skymarshal] Generate operator<< for all types

🛠️ Build System Fixes

  • 2e14e4d Add minimum spdlog version
  • fba4ae8 Workflow and build support for pip wheels
  • 7f59396 Bump default pybind to 2.9.2
  • ea82c15 Remove spdlog (and eigen and catch2) from the manifest
  • 7efa7cd Misc docs, CMake, and packaging fixes
  • 322c564 Upgrade pip requirements
  • c321ca0 Install eigen_lcm headers
  • aba8ef7 Fix install paths

🎁 Misc other changes

  • e7fea68 Fix spelling of word perturbation in lie-group docstrings
  • 7c778cc Use spdlog::set_level instead of sym::internal::SetLogLevel
  • 411c845 Retry symforce_docs_test 3 times on failure
  • 3915767 Copy robot_2d_localization example
  • 234f827 Make robot_3d_localization comment true
  • 41fbca0 Remove duplicate epsilon files
  • 7bee06e Change format_py_dir to take T.Openable
  • 5f4b9fc Emit a warning if optimizing factors that don't touch any keys
  • 84a1ca2 Call modify_symbolic_api once per sympy
  • cccb324 Fix up C++ example in README
  • 43c2dfd Fix derivatives of sm.Mod
  • 165b097 Fix plotting code for robot_3d_localization example
  • 9e08a78 fix factor_utils failing to compile on clang-6.0
  • 60c9ccf Ret Path (!str) in generate_lcm_types
  • bdd50e9 Enable sparse cc_sym.Factor creation