We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug Optimizing a factor with an sf.Unit3 type as input in python yields an incompatible function arguments error.
To Reproduce See the error of the following example
import symforce symforce.set_epsilon_to_symbol("epsilon") import sym import numpy as np import symforce.symbolic as sf from symforce.opt.factor import Factor from symforce.opt.optimizer import Optimizer from symforce.values import Values def residual(unit3: sf.Unit3) -> sf.V3: return unit3.to_unit_vector() def main(): values = Values( { "unit3": sym.Unit3.from_vector(np.array([0, 0, 1]), sym.epsilon), } ) optimizer = Optimizer( factors=[ Factor( residual=residual, keys=["unit3"], ) ], optimized_keys=["unit3"], ) # Fails here result = optimizer.optimize(values) if __name__ == "__main__": main()
Expected behavior I'd expect the optimization to run without error.
Environment
Example dockerfile
FROM python:3.8.16 RUN pip3 install symforce COPY example.py /example.py CMD ["python", "example.py"]
Additional context Excerpt of the error message
TypeError: set(): incompatible function arguments. The following argument types are supported: 1. (self: cc_sym.Values, key: cc_sym.Key, value: float) -> bool 2. (self: cc_sym.Values, key: index_entry_t, value: float) -> None 3. (self: cc_sym.Values, key: cc_sym.Key, value: Rot2) -> bool ... Invoked with: <Valuesd entries=0 array=0 storage_dim=0 tangent_dim=0 >, x_0, <Unit3 [0.0, 0.0, 0.0, 1.0]>
The text was updated successfully, but these errors were encountered:
Thanks for reporting, we forgot to add Unit3 to the Python wrappers when we added it - will have a fix shortly
Sorry, something went wrong.
aaron-skydio
No branches or pull requests
Describe the bug
Optimizing a factor with an sf.Unit3 type as input in python yields an incompatible function arguments error.
To Reproduce
See the error of the following example
Expected behavior
I'd expect the optimization to run without error.
Environment
Example dockerfile
Additional context
Excerpt of the error message
The text was updated successfully, but these errors were encountered: