Problems with Marginals and ISAM2

315 views
Skip to first unread message

Felix Esser

unread,
Sep 23, 2020, 12:08:18 PM9/23/20
to gtsam...@googlegroups.com
Hello GTsam Users,

During the last weeks I have been working on the topic of factor graphs for my master thesis.
I use the Python wrapper from GTSAM and want to optimize IMU and GPS data using a factor graph. Later I will add pictures and landmarks into the graph.

For this I currently use ISAM2 (as in the example file ImuFactorExample2.py).

My graph is based on this example and was extended by the GPS observations.

Now my problem:

For the calculation of the statistically best trajectory I need the covariance matrices of the estimated navigation states and BIAS estimates. I would like to calculate these using the following line:

marginals = gtsam.marginals(newgraph, result)

But with ISAM2 the error message appears: IndeterminantLinearSystemException after the first incremental step.
This also occurs, if I add the line: marginals = gtsam.Marginals(newgraph, result) in the example ImuFactorExample2.py. 

A corresponding screenshot of the error message and the inserted line in the ImuFactorExample2.py is added to the Appendix.

Best regards,

Felix
ISAM_Problem.png

Felix Esser

unread,
Sep 23, 2020, 12:23:05 PM9/23/20
to gtsam...@googlegroups.com
Update. correct screenshot 
ISAM_Problem_new.png

Varun Agrawal

unread,
Sep 23, 2020, 11:20:47 PM9/23/20
to gtsam users
A couple of things:

1. I highly recommend using the latest version of GTSAM (the develop branch on github). It has a bunch of fixes and updates to the IMUFactor code and examples. The ImuFactorExample2.py file has been renamed to ImuFactorISAM2Example.py.
2. I cannot reproduce the Indeterminate Linear System (ILS) error in the basic example. However, you will encounter the ILS error if you try to compute marginals because this example is inherently underconstrained. Ideally, you would also have some external measurements (such as landmarks or GPS) to further constrain the problem. Take a look at ImuFactorsExample.cpp for information on adding GPSFactors. If you need help understanding that example, you can respond to this message. :)

Reply all
Reply to author
Forward
0 new messages