Need advice on singular matrix problems.

Issue #200 new
Paul Furgale created an issue

Hi all, We are using a custom edit of the BatchFixedLagSmoother to do some optimization. In our unit tests, we are running into some singular matrix issues.

Issue 1: We initialize a synthetic bundle adjustment problem at ground truth except for one landmark that is put in a very bad place. Every factor has a Cauchy mEstimator. The optimizer reduces the error significantly, but eventually hits a local minima, and starts upping the LM lambda parameter. When lambda = 10000, the linear system solution fails at this check:

https://bitbucket.org/gtborg/gtsam/src/b6a7dc05307dd4eff68feba6353b0d3f48d403c5/gtsam/base/cholesky.cpp?at=develop#cl-174

Why would the solution fail as lambda increases? My intuition is that a higher lambda will always make a better conditioned system.

Issue 2: sometimes marginalization fails for us when using eliminatePartialMultifrontal().

https://bitbucket.org/gtborg/gtsam/src/b6a7dc05307dd4eff68feba6353b0d3f48d403c5/gtsam_unstable/nonlinear/BatchFixedLagSmoother.cpp?at=develop#cl-500

This fails at the same place as above. Here I note that the smoother is not using QR and also not using a special ordering for the marginalization.

--

Can you give us some general tips on how to think about and handle issues like this when they come up?

Thanks!

Comments (7)

  1. Frank Dellaert

    We have run into this problem when both very large and very small uncertainties are present in the same system. E.g., start with a tight constraint in GPS denied scenario: after a while the uncertainty on the most recent pose is so large it causes this error. We have not found a good solution (other than to switch to QR). Preconditioning might be one answer.

    I also don't know whether we completely and fully understand the issue yet. Any insight this issue brings will be most welcome.

  2. Paul Furgale reporter

    @tschneith, what was the outcome. As far as I remember, we did two things: A. Switched to QR (addressing (1) above), and B. Rigorously filtered outliers before marginalization (addressing (2) above).

    Right?

  3. Thomas Schneider

    Yes, the outlier filtering and the switch to QR seemed to improve the situation. I have a unit test in our framework that reproduces the error and will investigate the cause. If you are interested I can try to isolate a minimal test that reproduces the problem.

  4. Log in to comment