ANYbotics / elevation_mapping

Robot-centric elevation mapping for rough terrain navigation
BSD 3-Clause "New" or "Revised" License
1.25k stars 435 forks source link

elevation_mapping process dies after Eigen Exception error #224

Closed bestavra closed 1 year ago

bestavra commented 1 year ago

Regarding issue #39

Hi, I've experienced the same Exception error of Eigen as follows: _elevation_mapping: /usr/include/eigen3/Eigen/src/Eigenvalues/EigenSolver.h:348: Eigen::EigenSolver<_MatrixType>::EigenvectorsType Eigen::EigenSolver<_MatrixType>::eigenvectors() const [with _MatrixType = Eigen::Matrix<double, 2, 2>; Eigen::EigenSolver::EigenvectorsType = Eigen::Matrix<std::complex, 2, 2>; typename Eigen::NumTraits::Real = double]: Assertion `m_eigenvectorsOk && "The eigenvectors have not been computed together with the eigenvalues."' failed.

Setup: Ubuntu 20.04, ROS-Noetic

It has to do something with the map initialization. Without map initialization, each of the following cases runs fine. The waffle demo example runs fine even with the map initialization though. The problem appears when with nearly the same .yaml file as in the waffle demo (except using lidar pcl data) the Husky robot with LIO-SAM is used for pose estimation. If using Husky with the default localization (robot_localization pkg), the problem disappears.

Back to the troubling case when LIO-SAM is used. When running a custom launch file including elevation_mapping, everything is fine, even the map initialization (checking by adding ROS_INFO on line 647 in ElevationMapping.cpp), the process dies after ticking the ElevationMap box in Rviz to show the elevation map or using elevation map in external postprocessing pipeline (gridmap_filters_demo) without displaying the map in Rviz.

@duyipai what version of eigen3 did you upgrade to? I'm using version 3.3.7 (default for Ubuntu 20.04) which was released a month after your post (so the newer version is not the exact solution): Resolved through using newer version of eigen3. Hope it helps others.

Thank you all for any help.

bestavra commented 1 year ago

Building a package with a Release flag somehow fixed the issue (: catkin build --pre-clean -DCMAKE_BUILD_TYPE=Release elevation_mapping

Closing this issue.