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

optimizer.optimize works - Mariginals does not. Matlab #1611

Closed
etamarlu opened this issue Aug 28, 2023 · 2 comments
Closed

optimizer.optimize works - Mariginals does not. Matlab #1611

etamarlu opened this issue Aug 28, 2023 · 2 comments
Labels
matlab Related to MATLAB wrapper

Comments

@etamarlu
Copy link
Contributor

etamarlu commented Aug 28, 2023

Description

The attached Matlab code is a snapshot from trying to convert matlab's Factor Graph example, to work with GTSAM functions.
VioGTSAM_V2.zip

The error arises after the first map initialization is done using epipolar geometry.
All factors and initial estimations are created, optimizations is done using either LM solver or isam.calculateEstimate.

Marginals fail to run with 'Indeterminant linear system' error

Steps to reproduce

add debug point at line 391, and then execute the line to reproduce the error.

Expected behavior

Environment

Additional information

I saw similar cases in tracking issue #121, I couldn't understand the solution

@etamarlu etamarlu changed the title optimizer.optimize works - Mariginals does not optimizer.optimize works - Mariginals does not. Matlab Aug 28, 2023
@varunagrawal varunagrawal added the matlab Related to MATLAB wrapper label Sep 4, 2023
@etamarlu
Copy link
Contributor Author

etamarlu commented Sep 5, 2023

following #1179 I managed to get it to work, the results however don't look right (uncertainties are too big).

I adjusted the code to work with ISAM, it runs 100 iterations with ISAM, but at some point isam.update returns the same 'Indeterminant' error. The error is about a point that was seen many iterations before, but for only 2 frames.

I leave this post open for now, I dig into the papers, maybe it will help me to better rephrase my initial question.

Would appreciate any suggestions on relevant reading material

@etamarlu
Copy link
Contributor Author

etamarlu commented Nov 8, 2023

managed to solve it by adding priors and removing nonlinear constraint factors before calling marginals

@etamarlu etamarlu closed this as completed Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
matlab Related to MATLAB wrapper
Projects
None yet
Development

No branches or pull requests

2 participants