Skip to content

How to use C++ Backend with Python Optimization API #368

Answered by nathan-skydio
tbretl asked this question in Q&A
Discussion options

You must be logged in to vote

I'm not sure if there's a full example of this unfortunately. Looking at our examples folder I see examples of using the python optimizer with python factors and examples of using the C++ optimizer with C++ factors, but I don't think we have an example of using C++ factors with they python optimizer (though this would be nice to have if you make one!).

If you wanted to do this, I believe you would have to pybind wrap the C++ factor yourself so that it's callable from python, then create a NumericFactor with the wrapped function, then pass the NumericFactor to the python optimizer.

Note that the "python optimizer" is just a wrapped version of the C++ optimizer though, so if you're trying t…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by nathan-skydio
Comment options

You must be logged in to vote
2 replies
@tbretl
Comment options

@aaron-skydio
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants