Skip to content

Conversation

ProfFan
Copy link
Collaborator

@ProfFan ProfFan commented Aug 15, 2021

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:

  1. All GTSAM examples and unit tests for the EKF uses a motion model that does not depend on the future state. i.e. they are all explicit models, thus this change is unnecessary.
  2. Adding this does not break anything, but it does add more runtime complexity (though not too much).

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.

@ProfFan ProfFan requested a review from dellaert August 15, 2021 18:53
protected:
T x_; // linearization point
JacobianFactor::shared_ptr priorFactor_; // Gaussian density on x_
GaussianFactorGraph::shared_ptr lastLinearization;
Copy link
Member

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) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

document! What's happening?


// Create a Gaussian Factor Graph
GaussianFactorGraph linearFactorGraph;
GaussianFactorGraph::shared_ptr linearFactorGraph = boost::make_shared<GaussianFactorGraph>();
Copy link
Member

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?

@dellaert
Copy link
Member

@ProfFan address comments so we can merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants