RainerKuemmerle / g2o

g2o: A General Framework for Graph Optimization
3.04k stars 1.1k forks source link

CHOLMOD warning: not positive definite #293

Open shanmukhananda opened 6 years ago

shanmukhananda commented 6 years ago

Hi,

I am trying to calculate covariance of landmarks and camera pose using the graph saved from ORB_SLAM2.

I am facing below warning CHOLMOD warning: not positive definite.

# Using CHOLMOD poseDim -1 landMarkDim -1 blockordering 1
Read input from 1.g2o
Loaded 147 vertices
Loaded 290 edges
# graph is fixed by priors or already fixed vertex
Initial chi2 = 74121405.840581
CHOLMOD warning: not positive definite.

Command used

g2o -solver lm_var_cholmod -computeMarginals 1.g2o

G2O file optimizer.verifyInformationMatrices() did not throw any error

Note: I have done a slight modification toEdgeSE3ProjectXYZ , EdgeSE3ProjectXYZ::write and EdgeSE3ProjectXYZ::read writes and reads the camera parameters Refer.

EDGE_SE3_PROJECT_XYZ:EXPMAP 97 1 -43.4619 197.165  1 0 1 759.149 750.265 621.608 392.603

Last four numbers indicates camera parameters.

hridaybavle commented 2 years ago

@shanmukhananda did you manage to solve this issue? I am facing a similar issue when creating a new custom edge.