symforce-org / symforce

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

Remove Factor constructor/creation overloads that takes only keys #286

Closed chao-qu-skydio closed 1 year ago

chao-qu-skydio commented 1 year ago

This is the first step among several to try to encapsulate keys and keys_to_optimize into a class called FactorKeys (open to better names). So that all Factor creation functions will just take a Func and FactorKeys. I have a rough plan of how to implement FactorKeys and I'm also open to other suggestions.

But for now, I just want to remove some of the (what I deem to be unnecessary) overloads in Factor creation functions to reduce the API surface area for future refactoring.