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.
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
[WIP] Add LM Pose3Example and G2O 3D Reader #85
[WIP] Add LM Pose3Example and G2O 3D Reader #85
Changes from 7 commits
1611150
5088991
21bc5fa
755806b
1dd5e2e
db37d8f
eb94c3f
e5696af
dd3236d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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'm pretty confused by the signs.
I see that we need to calculate
b - Ax
, but I'm not sure iferrorVector
should be the method that does this.Changing
errorVector
tob - Ax
changes the meaning of linearization (the comment onNewFactorGraph.linearized
implies thaterrorVector
should beAx + b
).Also, changing
errorVector
tob - Ax
makes it so thaterrorVector_linearComponent
isn't actually the linear component oferrorVector
and more.Maybe we should make a new method called
residual
that calculatesb - Ax
?Or we could negate the implementations of
errorVector_linearComponent
anderrorVector_linearComponent_adjoint
, and leaveerrorVector(at: x) = errorVector_linearComponent(x) + error
. Then we'd also have to update the comment onNewFactorGraph.linearized
to say: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.
Yea I feel a bit confused too :( IMHO, in CGLS the objective is to reach the solution where
Ax=b
, thus by moving Ax to the right we have0 = b - Ax
(the "error"). In GN we approximate the L2 error function (which should be >=0)f(x)
by its linearization atx0
, wheref(dx+x_0)=Ax+b
(JacobianA
, biasb
), and we arrived at the same equation as in CGLS.I think
error
here is confusing as it is actually the "error of error", as what we linearized to the JacobianFactor IS the error. However, I am not sure if changing this is actually a good idea, as if we want linear factors to be nonlinear compatible we need the protocol conformances.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.
nonlinear error: |h(x)-z|
linear error |Ax-b|