The Eigen3 library can not compute the eigenvectors together with the eigenvalues
Hi!, I'm using ubuntu 16.04 and ROS-Kinetic branches,
I have cloned elevation mapping package from https://github.com/ethz-asl/elevation... .
The problem is when I launching the elevation mapping packages at first I get some fused elevation mapping data then after sometimes I get an exception error from the Egien3 library which says:
elevation_mapping: /usr/include/eigen3/Eigen/src/Eigenvalues/EigenSolver.h:347: Eigen::EigenSolver<_MatrixType>::EigenvectorsType Eigen::EigenSolver<_MatrixType>::eigenvectors() const [with _MatrixType = Eigen::Matrix<double, 2,="" 2="">; Eigen::EigenSolver<_MatrixType>::EigenvectorsType = Eigen::Matrix<std::complex<double>, 2, 2>; typename Eigen::NumTraits<typename derived::scalar="">::Real = double]: Assertion `m_eigenvectorsOk && "The eigenvectors have not been computed together with the eigenvalues."' failed.
And It crashes.
Is there any way to fix this problem?
I'll appreciate any help.
Is there anything else in the error message? Do you know where in elevation_mapping the error is coming from?
No, actually I'm on it and when finding it out I'll let you know. But what I know is it refers to "347" lines of the EigenSolver header which relates to ComplexScalar() function.
I've found it! It comes from line 276 of the ElevationMap.cpp in elevation_mapping. I have tried it with try & catch but It doesn't work.
this is the line which causes the error and crash; const double ellipseRotation(atan2(solver.eigenvectors().col(maxEigenvalueIndex).real()(1), solver.eigenvectors().col(maxEigenvalueIndex).real()(0)));
I don't know the code but when I set the default parameters 1,0 permanent the error disappear.
I've also posted this Issue here https://github.com/ethz-asl/elevation... But got no answer.
are you sure you don't have any "false" flag set in your code? I'm not sure where but in mine code Eigen::EigenSolver<matrixxd> es(matrixname, false); <-- "false" was the reason