qcr/gtsam-quadrics

`realsense.py` produces a `gtsam::IndeterminantLinearSystemException` with more than one landmark

Closed this issue · 2 comments

I intend to use gtsam-quadrics for pose detection of landmarks from a RealSense D435i camera, and I've been attempting to run examples/python/realsense.py to better understand how to properly integrate the library. However, every time I move the camera to see more than one landmark, the script terminates with a gtsam::IndeterminantLinearSystemException a few frames later:

Traceback (most recent call last):
  File "gtsam-quadrics/examples/python/realsense.py", line 387, in <module>
    isam.update(local_graph, local_estimate)
  File "gtsam/gtsam.pyx", line 9529, in gtsam.gtsam.ISAM2.update
RuntimeError: 
Indeterminant linear system detected while working near variable
8142508126285856849 (Symbol: q81).

Thrown when a linear system is ill-posed.  The most common cause for this
error is having underconstrained variables.  Mathematically, the system is
underdetermined.  See the GTSAM Doxygen documentation at
http://borg.cc.gatech.edu/ on gtsam::IndeterminantLinearSystemException for
more information.

closing camera

The named symbol is usually one of the most recent pose estimates. This error occurs with commit e6128dc (with GTSAM 4.0.3), when realsense.py was last updated. It also occurs with the gtsam-quadrics PyPI package, if I patch the script to support GTSAM 4.1.

What could be causing the error? It always occurs, whether the camera is moved to view the additional landmarks or the additional landmarks are moved into the view of the stationary camera. I've checked the incoming local_estimates, but they doesn't show anything clearly unusual like NaNs.

btalb commented

Thanks for the report @LegionMammal978 .

I am currently looking into re-hashing the examples, including the realsense.py example.

I will get back to you here when I believe this resolved.

btalb commented

I encountered these when working with the new QuadricSLAM examples in our QuadricSLAM repository.

Solution was to catch the exception and let the system continue, but probably needs a better solution in the future.