今天跑代码的时候发现之前能跑得代码忽然不能跑了。

github:https://github.com/daobilige-su/loam_velodyne

报错:

/home/syq/catkin_ws/src/loam_velodyne-master2/src/laserOdometry.cpp:838:41: error: ‘isnan’ was not declared in this scope
           if (isnan(matX.at<float>(0, 0)) || isnan(matX.at<float>(1, 0)) || isnan(matX.at<float>(2, 0)) || isnan(matX.at<float>(3, 0)) || isnan(matX.at<float>(4, 0)) || isnan(matX.at<float>(5, 0)))
                                         ^


loam_velodyne-master2/CMakeFiles/laserOdometry.dir/build.make:62: recipe for target 'loam_velodyne-master2/CMakeFiles/laserOdometry.dir/src/laserOdometry.cpp.o' failed
make[2]: *** [loam_velodyne-master2/CMakeFiles/laserOdometry.dir/src/laserOdometry.cpp.o] Error 1
CMakeFiles/Makefile2:835: recipe for target 'loam_velodyne-master2/CMakeFiles/laserOdometry.dir/all' failed
make[1]: *** [loam_velodyne-master2/CMakeFiles/laserOdometry.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j6 -l6" failed

才发现是isnan的错误,开始的时候搜索问题只看

make[1]: *** [loam_velodyne-master2/CMakeFiles/laserOdometry.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j6 -l6" failed
一直没有搜到有效的解决方法,所以看报错要看全啊

修改方法:isnan编成std::isnan

Logo

开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!

更多推荐