-
Notifications
You must be signed in to change notification settings - Fork 797
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
Python script for hybrid inference on City10000 dataset #2019
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.
Cool. I’d undo the std::move changes though. Just adding. Constructor should low you to wrap.
examples/Hybrid_City10000.cpp
Outdated
@@ -127,7 +127,7 @@ class Experiment { | |||
auto bayesNet = linearized->eliminateSequential(); | |||
HybridValues delta = bayesNet->optimize(); | |||
initial_ = initial_.retract(delta.continuous()); | |||
smoother_.reInitialize(std::move(*bayesNet)); | |||
smoother_.reInitialize(*bayesNet); |
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.
Why? Seems appropriate here
gtsam/hybrid/HybridSmoother.h
Outdated
@@ -49,8 +49,8 @@ class GTSAM_EXPORT HybridSmoother { | |||
/** | |||
* Re-initialize the smoother from a new hybrid Bayes Net. | |||
*/ | |||
void reInitialize(HybridBayesNet&& hybridBayesNet) { | |||
hybridBayesNet_ = std::move(hybridBayesNet); | |||
void reInitialize(HybridBayesNet& hybridBayesNet) { |
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 add another non && constructor rather than deleting this one?
Wrapped a bunch of methods and recreated the script
Hybrid_City10000.cpp
asHybridCity10000.py
.I get a similar final error:
Final error: 0.6931471805599453
and a similar total time:
Total time: 21.018189191818237 seconds
Please see the results of this new script below.
Update: I added a python script for plotting the results. It takes an arbitrary number of estimate files (.txt) but needs a corresponding number of labels and colors associated.