Posted by
g.bartoli on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Fatal-Error-variance-is-not-finite-tp609p765.html
Hi Mathieu,
I have some more information about this fatal error.
It occurred many more times on RTABMAP standalone 0.10.4 (latest apt-get repository package), both during SLAM and post-processing (without ICP). I think it is related to the loop constraint procedure, in particular to the RANSAC iterations using util3d::transformFromXYZCorrespondence, this is the debug log happening just before it:
[DEBUG] (2015-10-15 11:23:28.648) Memory.cpp:778::addSignatureToStm() time = 0,000121s
[DEBUG] (2015-10-15 11:23:28.648) Memory.cpp:606::update() time rehearsal=0,181913 ms
[DEBUG] (2015-10-15 11:23:28.648) Memory.cpp:673::update() totalTimer = 0,038850s
[DEBUG] (2015-10-15 11:23:28.648) util3d_registration.cpp:70::transformFromXYZCorrespondences() iterations=200 inlierThreshold=0,020000
[DEBUG] (2015-10-15 11:23:28.648) util3d_registration.cpp:119::transformFromXYZCorrespondences() RANSAC refineModel: Number of inliers found (before/after): 197/199, with an error threshold of 0,020000.
[DEBUG] (2015-10-15 11:23:28.648) util3d_registration.cpp:136::transformFromXYZCorrespondences() RANSAC refineModel: New estimated error threshold: 0,014632 (variance=0,000024) on iteration 0 out of 10.
[DEBUG] (2015-10-15 11:23:28.648) util3d_registration.cpp:119::transformFromXYZCorrespondences() RANSAC refineModel: Number of inliers found (before/after): 199/191, with an error threshold of 0,014632.
[DEBUG] (2015-10-15 11:23:28.648) util3d_registration.cpp:136::transformFromXYZCorrespondences() RANSAC refineModel: New estimated error threshold: 0,009591 (variance=0,000010) on iteration 1 out of 10.
[DEBUG] (2015-10-15 11:23:28.648) util3d_registration.cpp:119::transformFromXYZCorrespondences() RANSAC refineModel: Number of inliers found (before/after): 191/176, with an error threshold of 0,009591.
[DEBUG] (2015-10-15 11:23:28.649) util3d_registration.cpp:136::transformFromXYZCorrespondences() RANSAC refineModel: New estimated error threshold: 0,005935 (variance=0,000004) on iteration 2 out of 10.
[DEBUG] (2015-10-15 11:23:28.649) util3d_registration.cpp:119::transformFromXYZCorrespondences() RANSAC refineModel: Number of inliers found (before/after): 176/152, with an error threshold of 0,005935.
[DEBUG] (2015-10-15 11:23:28.649) util3d_registration.cpp:136::transformFromXYZCorrespondences() RANSAC refineModel: New estimated error threshold: 0,001354 (variance=0,000000) on iteration 3 out of 10.
[DEBUG] (2015-10-15 11:23:28.649) util3d_registration.cpp:119::transformFromXYZCorrespondences() RANSAC refineModel: Number of inliers found (before/after): 152/94, with an error threshold of 0,001354.
[DEBUG] (2015-10-15 11:23:28.649) util3d_registration.cpp:136::transformFromXYZCorrespondences() RANSAC refineModel: New estimated error threshold: 0,000819 (variance=0,000000) on iteration 4 out of 10.
[DEBUG] (2015-10-15 11:23:28.649) util3d_registration.cpp:119::transformFromXYZCorrespondences() RANSAC refineModel: Number of inliers found (before/after): 94/86, with an error threshold of 0,000819.
[DEBUG] (2015-10-15 11:23:28.649) util3d_registration.cpp:136::transformFromXYZCorrespondences() RANSAC refineModel: New estimated error threshold: 0,000101 (variance=0,000000) on iteration 5 out of 10.
[DEBUG] (2015-10-15 11:23:28.649) util3d_registration.cpp:119::transformFromXYZCorrespondences() RANSAC refineModel: Number of inliers found (before/after): 86/78, with an error threshold of 0,000101.
[DEBUG] (2015-10-15 11:23:28.649) util3d_registration.cpp:136::transformFromXYZCorrespondences() RANSAC refineModel: New estimated error threshold: 0,000121 (variance=0,000000) on iteration 6 out of 10.
[DEBUG] (2015-10-15 11:23:28.649) util3d_registration.cpp:119::transformFromXYZCorrespondences() RANSAC refineModel: Number of inliers found (before/after): 78/79, with an error threshold of 0,000121.
[DEBUG] (2015-10-15 11:23:28.649) util3d_registration.cpp:136::transformFromXYZCorrespondences() RANSAC refineModel: New estimated error threshold: 0,000007 (variance=0,000000) on iteration 7 out of 10.
[DEBUG] (2015-10-15 11:23:28.649) util3d_registration.cpp:119::transformFromXYZCorrespondences() RANSAC refineModel: Number of inliers found (before/after): 79/76, with an error threshold of 0,000007.
[DEBUG] (2015-10-15 11:23:28.649) util3d_registration.cpp:136::transformFromXYZCorrespondences() RANSAC refineModel: New estimated error threshold: 0,000006 (variance=0,000000) on iteration 8 out of 10.
[DEBUG] (2015-10-15 11:23:28.649) util3d_registration.cpp:119::transformFromXYZCorrespondences() RANSAC refineModel: Number of inliers found (before/after): 76/78, with an error threshold of 0,000006.
[DEBUG] (2015-10-15 11:23:28.649) util3d_registration.cpp:136::transformFromXYZCorrespondences() RANSAC refineModel: New estimated error threshold: 0,000000 (variance=0,000000) on iteration 9 out of 10.
[DEBUG] (2015-10-15 11:23:28.649) util3d_registration.cpp:204::transformFromXYZCorrespondences() RANSAC inliers=76/315 tf=xyz=0,000000,0,000000,-0,000000 rpy=-0,000000,-0,000000,-0,000000
[DEBUG] (2015-10-15 11:23:28.649) Memory.cpp:2208::computeVisualTransform() transform=xyz=0,000000,0,000000,-0,000000 rpy=-0,000000,-0,000000,-0,000000
[ INFO] (2015-10-15 11:23:28.649) MainWindow.cpp:3455::postProcessing() Added new loop closure between 124 and 122.
[FATAL] (2015-10-15 11:23:28.649) Link.h:110::setVariance() Condition (uIsFinite(rotVariance) && rotVariance>0) not met!
As you can see, RANSAC reduces both error and variance almost to 0 obtaining a final null transform. Probably the following rotVariance value is 0 too or is computed via some division by zero invalidating the mandatory condition.
This is my current config file, apart from some parameters tweaking, I enabled "Force 2D transform" in Odometry and Loop Closure Constraint, maybe this can be an hint.
UPDATE: actually, this error occurs even when the forced 3-DoF constraints are disabled in "Graph Optimization", "Loop Closure Constraint" and "Odometry".
Let me know if you need more informations.
Have a nice day,
Guido
~Guido