-
Notifications
You must be signed in to change notification settings - Fork 28
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
FactorGraph: noise handling and priors #152
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
leokoppel
changed the base branch from
feature_44_factor_graph_graph
to
leo_backlog_1
June 18, 2017 19:53
leokoppel
force-pushed
the
feature_149_factor_noise
branch
from
June 20, 2017 13:15
22bf024
to
6ae4714
Compare
Because FactorVariable handles pointers (to its own member!) in its constructor, it needs a custom copy constructor and copy assignment operator. To round out the rule of five (http://en.cppreference.com/w/cpp/language/rule_of_three) also define move constructor, move assignment, and destructor. Add tests which would fail previously.
- Handle special case of size-1 variables Variables of size 1 are a special case, allowing values to be given as doubles instead of Eigen::Matrix<double, 1, 1>. - Add `inline` to FactorGraph method definitions It is needed for ODR since the class is not a template - Add tests
(Squashed commit) - Add addPerfectPrior - Simplify constructors When we have to copy a value, accept a value. The alternative is to have two overloads: (T&&) and (T const&) but this adds repeated code. See https://stackoverflow.com/questions/7592630/is-pass-by-value-a-reasonable-default-in-c11 - Refactor perfect priors - Setting variables constant is handled in graph_wrapper, not by factors - Remove ZeroNoise type, instead, use "void" NoiseType - evaluateRaw calls a different templated helper function if the Factor has zero noise - Add PerfectPrior class Remove the evaluateSpecialized helper, too complicated. Have addPerfectPrior add a special PerfectPrior class. This class does nothing on evaluateRaw. Set the variable value, as well setting it constant. This is the key!
Also: - Fix immediate assignment of variable values
Also: - Noise: pre-calculate inverse covariance, add docs
leokoppel
force-pushed
the
feature_149_factor_noise
branch
from
June 20, 2017 13:27
6ae4714
to
72d672a
Compare
The solver relies on the reported jacobian being the actual Jacobian of what it's given, not something scaled, so we have to multiply it as well.
Closing for now, we will get to factor graphs later |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #149
Depends on #137 (do not merge; the base of this PR is not master)
addPrior
andaddPerfectPrior
(see their use ingraph_test.cpp
)Pre-Merge Checklist:
clang-format