gisbi-kim / SC-A-LOAM

Robust LiDAR SLAM with a versatile plug-and-play loop closing and pose-graph optimization.
438 stars 95 forks source link

failed when catkin_make the project #20

Closed bairuofei closed 1 year ago

bairuofei commented 1 year ago

I got the following error message when run catkin_make to build the project. I am using Ubuntu 18.04, and it can run A-LOAM perfectly, and I have installed GTSAM4.0.0. Does anyone know how to fix the error? thank you very much.

[ 63%] Linking CXX executable /home/ruofei/code_project/cpp_project/catkin_scaloam_ws/devel/lib/aloam_velodyne/ascanRegistration [ 72%] Linking CXX executable /home/ruofei/code_project/cpp_project/catkin_scaloam_ws/devel/lib/aloam_velodyne/kittiHelper [ 72%] Built target kittiHelper [ 72%] Built target ascanRegistration In file included from /usr/include/pcl-1.8/pcl/sample_consensus/sac_model.h:52:0, from /usr/include/pcl-1.8/pcl/sample_consensus/sac.h:45, from /usr/include/pcl-1.8/pcl/sample_consensus/ransac.h:44, from /usr/include/pcl-1.8/pcl/registration/icp.h:45, from /home/ruofei/code_project/cpp_project/catkin_scaloam_ws/src/SC-A-LOAM/src/laserPosegraphOptimization.cpp:19: /usr/include/pcl-1.8/pcl/sample_consensus/model_types.h: In function ‘void __static_initialization_and_destruction_0(int, int)’: /usr/include/pcl-1.8/pcl/sample_consensus/model_types.h:99:3: warning: ‘pcl::SAC_SAMPLE_SIZE’ is deprecated: This map is deprecated and is kept only to prevent breaking existing user code. Starting from PCL 1.8.0 model sample size is a protected member of the SampleConsensusModel class [-Wdeprecated-declarations] SAC_SAMPLE_SIZE (sample_size_pairs, sample_size_pairs + sizeof (sample_size_pairs) / sizeof (SampleSizeModel)); ^~~~~~~ /usr/include/pcl-1.8/pcl/sample_consensus/model_types.h:99:3: note: declared here SC-A-LOAM/CMakeFiles/alaserPGO.dir/build.make:62: recipe for target 'SC-A-LOAM/CMakeFiles/alaserPGO.dir/src/laserPosegraphOptimization.cpp.o' failed make[2]: [SC-A-LOAM/CMakeFiles/alaserPGO.dir/src/laserPosegraphOptimization.cpp.o] Error 1 CMakeFiles/Makefile2:1436: recipe for target 'SC-A-LOAM/CMakeFiles/alaserPGO.dir/all' failed make[1]: [SC-A-LOAM/CMakeFiles/alaserPGO.dir/all] Error 2 Makefile:140: recipe for target 'all' failed make: *** [all] Error 2 Invoking "make -j20 -l20" failed

bairuofei commented 1 year ago

Solved. Because I installed the lasted version of ceres 2.1.0, which is incompatible with the version of eigen. After I deleted ceres 2.1.0 and installed ceres 1.14, the catkin_make goes successfully. Reference: https://blog.csdn.net/hanmoge/article/details/122810895