-
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
Fixing the EKF example and change linearization point initialization #848
base: develop
Are you sure you want to change the base?
Conversation
@@ -58,6 +59,8 @@ class ExtendedKalmanFilter { | |||
protected: | |||
T x_; // linearization point | |||
JacobianFactor::shared_ptr priorFactor_; // Gaussian density on x_ | |||
GaussianFactorGraph::shared_ptr lastLinearization; |
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.
docs: what are these things?
linearizationPoint.insert(keys[1], x_); // TODO should this really be x_ ? | ||
linearFactorGraph.push_back(motionFactor.linearize(linearizationPoint)); | ||
|
||
if (lastLinearization != nullptr) { |
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.
document! What's happening?
@@ -82,20 +83,38 @@ namespace gtsam { | |||
const auto keys = motionFactor.keys(); | |||
|
|||
// Create a Gaussian Factor Graph | |||
GaussianFactorGraph linearFactorGraph; | |||
GaussianFactorGraph::shared_ptr linearFactorGraph = boost::make_shared<GaussianFactorGraph>(); |
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 did you change this to a pointer?
@ProfFan address comments so we can merge |
This PR tries to change the linearization point to a linear expolation of the current estimate using the previous linearization.
However I found this to be not as useful as it would be in the intended usage in GTSAM:
In making this change I also found out that the
easyPoint2KalmanFilter
example has a typo, which I also fixed.If we decide that this is unnecessary, I can keep only the typo fix.