compile error:
/usr/bin/ld: cannot find -lBoost::timer
collect2: error: ld returned 1 exit status
LIO-SAM-master/CMakeFiles/lio_sam_imuPreintegration.dir/build.make:759: recipe for target '/home/kyle/ros/kyle_ws/devel/lib/lio_sam/lio_sam_imuPreintegration' failed
make[2]: *** [/home/kyle/ros/kyle_ws/devel/lib/lio_sam/lio_sam_imuPreintegration] Error 1
CMakeFiles/Makefile2:10000: recipe for target 'LIO-SAM-master/CMakeFiles/lio_sam_imuPreintegration.dir/all' failed
make[1]: *** [LIO-SAM-master/CMakeFiles/lio_sam_imuPreintegration.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
solution
change the CMakeLists.txt
find_package(OpenMP REQUIRED)
find_package(PCL REQUIRED QUIET)
find_package(OpenCV REQUIRED QUIET)
find_package(GTSAM REQUIRED QUIET)
as:
find_package(OpenMP REQUIRED)
find_package(GTSAM REQUIRED QUIET)
find_package(PCL REQUIRED)
find_package(OpenCV REQUIRED)
编译通过,但是启动时mapOptmization
节点会发生崩溃,一般时GTSAM库的问题,解决方法是按照他的README.md重新编译一次,尤其注意编译GTSAM的编译要求:
cmake -DGTSAM_BUILD_WITH_MARCH_NATIVE=OFF ..