-
Notifications
You must be signed in to change notification settings - Fork 804
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
Lots of Hybrid Improvements #1894
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one question
DiscreteFactorGraph dfg; | ||
for (auto &&f : factors_) { | ||
auto discreteFactor = std::dynamic_pointer_cast<DiscreteFactor>(f); | ||
assert(discreteFactor); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t understand how this can work. Not all factors are discrete, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, which is why we have the assert, but I guess the if(auto discreteFactor = ...)
check is better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, that makes more sense :-)
HybridGaussianFactorGraph::discreteFactors()
to retrieve all the discrete factors. More of a convenience method.prune
method forHybridNonlinearFactor
.reorderRelinearize
to improve nonlinear efficiency.