Skip to content
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

block solver fails for BaseFixedSizeEdge with 3 vertices #584

Closed
atuldivekar opened this issue Apr 12, 2022 · 2 comments
Closed

block solver fails for BaseFixedSizeEdge with 3 vertices #584

atuldivekar opened this issue Apr 12, 2022 · 2 comments

Comments

@atuldivekar
Copy link

I implemented a BaseTernaryEdge derived from BaseFixedSizeEdge with 3 vertices instead of 2.
(Similar to BaseBinaryEdge implementation, just 3 vertices)

I tried to solve it with block_solver.hpp, get an error in buildStructure():

schurMatrixLookup->addBlock(i1, i2);
assert(c < (int)_blockCols.size() &&
"accessing column which is not available");

The error is because the 2nd and 3rd kinds of vertices are all treated as landmarks.
but the loop that calls schurMatrixLookup->addBlock(i1, i2) does not recognize this.

For each marginalized v
consider attached vertex pairs v1,v2 (could be on same or different edges attached to v)
with binary edge, v1,v2 will be non-marginalized i.e. hessianIndex will be < numPoses
with ternary edge, v1,v2 could be marginalized i.e. hessianIndex could be >= numPoses
-- this causes the error..

Or is the block_solver not the correct way to use the Ternary Edge?

I see the example sclam_odom_laser.cpp which uses BaseFixedSizeEdge but I am not sure how that optimizer works.

@RainerKuemmerle
Copy link
Owner

Did you try with a variable sized solver instead?
Which vertices of your edge are landmarks?

@RainerKuemmerle
Copy link
Owner

RainerKuemmerle commented Aug 28, 2022

Duplicates #597

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

No branches or pull requests

2 participants