Open Qusai-Azzam opened 6 years ago
Could you find a solution to this? I am having the same issue and I can't get it to work.
maybe you are using too few points or too simple model and there may be something wrong in the filters. You can read in two actual obj files and try again.
I'm having the same problem!
Hi there, Still not resolved ? I'm facing the same problem. Thx
I am working on it right now,I'm testing the code with a random cloud generator, and it seems to work except when the cloud is 2D. It means if all points of a cloud have a constant cord (ex: Z = 0 for all points, OR Y = 10 for all points or whatever (it is reproductible)), it'll throw this exception. It seems to be related to the Cholesky computation (in the mathnet lib) which can be effectivly a problem if one term of the matrix is = 0. So, we maybe need to modify the code to distinguish 2D clouds from 3D clouds so the matrix computation is done with a 2x2 positive matrix instead of 3x3 ? i'll search if it is possible to make it.
Hello there,
I finally found a way to bypass this error. It seems to happend because of rounding or smthg. in ICP.CS, more precisely in computeWithTransformedReference(...).
Sometimes, T_iter turn to be NaN and it is returned so what is done after that just go wrong (matrix are note positive as they contains NaN !)
What i've done for now : I'm checking if T_iter is NaN after ErrorMinimizerHelper.Compute(...) and if it is, i do : T_iter = last_T_iter and then i break the while loop.
This bypass surely degrades result but at least i can go one with this.
Hello there,
I finally found a way to bypass this error. It seems to happend because of rounding or smthg. in ICP.CS, more precisely in computeWithTransformedReference(...).
Sometimes, T_iter turn to be NaN and it is returned so what is done after that just go wrong (matrix are note positive as they contains NaN !)
What i've done for now : I'm checking if T_iter is NaN after ErrorMinimizerHelper.Compute(...) and if it is, i do : T_iter = last_T_iter and then i break the while loop.
This bypass surely degrades result but at least i can go one with this.
It seems like T_iter is not a double type value, how did you check if it is NaN of not in C# ? Thank you.
You have to test the problematic value (which in my case is related to rotation as i'm matching 2D horizontal scans) I've done this :
if (Double.IsNaN(T_iter.rotation.W)) { Debug.WriteLine("Iteration stopped because T_iter was NaN."); T_iter = lastT_iter; break; }
You have to test the problematic value (which in my case is related to rotation as i'm matching 2D horizontal scans) I've done this :
if (Double.IsNaN(T_iter.rotation.W)) { Debug.WriteLine("Iteration stopped because T_iter was NaN."); T_iter = lastT_iter; break; }
I am working on 2D scan at the moment as well. My problem is on Chloesky.Solve that said "Matrix must be positive definite" Is it possible if I have a look in your code ?
Thank you very much
TO bypass this error ("Matrix must be positive definite") i added the checking code after line 128 in ICP.Cs :
T_iter = ErrorMinimizerHelper.Compute(stepReading, reference, outlierWeights, matches, this.ErrorMinimizer) * T_iter;
if (Double.IsNaN(T_iter.rotation.W))
{
Debug.WriteLine("Iteration stopped because T_iter was NaN.");
T_iter = lastT_iter;
break;
}
You need to find which component of "T_iter" is nan. for me it is "rotation.W" (im working on 2d scan with Z as rotation axes)
TO bypass this error ("Matrix must be positive definite") i added the checking code after line 128 in ICP.Cs :
T_iter = ErrorMinimizerHelper.Compute(stepReading, reference, outlierWeights, matches, this.ErrorMinimizer) * T_iter; if (Double.IsNaN(T_iter.rotation.W)) { Debug.WriteLine("Iteration stopped because T_iter was NaN."); T_iter = lastT_iter; break; }
You need to find which component of "T_iter" is nan. for me it is "rotation.W" (im working on 2d scan with Z as rotation axes)
Thank you very much for being so active. You are truly helpful.
I am going to try implement this one in my own code and will give you the result after this.
Thank you very much.
Hello Developers, i got this Exception when i Use this Code, "System.ArgumentOutOfRangeException: 'Specified argument was out of the range of valid values. Parameter name: The number of columns of a matrix must be positive.'" Here is My Code, and thanks in Advance for your help :