-
Notifications
You must be signed in to change notification settings - Fork 768
New issue
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
Custom factors & Python packaging #764
Comments
On (1), I think you can use zero covariance which will make the constraint an equality constraint :) |
Thanks for the quick reply.
|
Python factor is now in develop, please try and test it hard so we can know what to change :) |
Hi @ProfFan. I saw an example file called CustomFactorExample.py, and from here seems python custom factor has been supported? If so, how can I get to know about the details of defining custom factor, except this example? Thanks! |
No worries. I searched the library globally and found the source files (CustomFactor.h, CustomFactor.cpp) in "nonlinear" folder. Cheers! |
Hi @halajun , great to hear that you found the information you need! Please note though the current Python factor implementation will incur a performance cost, but is very versatile so you can use any Python package in the callback function. We have plans for a JIT-enabled fast Python CustomFactor (#875), so if you are interested, we can look into that together! |
Hi @ProfFan. Thanks for your warm invitating, but I just need it to test my dummy method, not requiring for high performance at the moment. Anyway, Wish you good luck with the progress! By the way, would it be easier to write custom factor in C++ library, and generate the python bindings without degrading performance? |
Hi there,
I have been playing with the Python API recently and I am really in awe of how neat it is! Coming from Ceres, everything seems so easy with GTSAM. Huge thanks to the team for pulling this :)
I want to optimize camera poses/calibration via reprojections while keeping the 3D points fixed (similar to #697). There is no factor for this and I want to avoid writing a custom C++ factor, mostly because dependencies could then not anymore be handled by Python.
1e-8
noise, but this is hacky and inefficient, so I am looking for better :) Is there a way to freeze some optimization variables? Ceres hasSetParameterBlockConstant
but I couldn't find anything similar in GTSAM.The text was updated successfully, but these errors were encountered: