koide3 / hdl_localization

Real-time 3D localization using a (velodyne) 3D LIDAR
BSD 2-Clause "Simplified" License
775 stars 310 forks source link

Some prombles with catkin_make #113

Closed DAR-fly closed 1 year ago

DAR-fly commented 1 year ago

I want to run this code with ubuntu20.04,it run with following errors: /usr/bin/ld: CMakeFiles/gicp_align.dir/src/align.cpp.o:(.rodata._ZTVN3pcl6search6SearchINS_8PointXYZEEE[_ZTVN3pcl6search6SearchINS_8PointXYZEEE]+0x20): undefined reference topcl::search::Search::getName() const' /usr/bin/ld: CMakeFiles/gicp_align.dir/src/align.cpp.o:(.rodata._ZTVN3pcl6search6KdTreeINS_8PointXYZENS_11KdTreeFLANNIS2_N5flann9L2_SimpleIfEEEEEE[_ZTVN3pcl6search6KdTreeINS_8PointXYZENS_11KdTreeFLANNIS2_N5flann9L2_SimpleIfEEEEEE]+0x20): undefined reference to pcl::search::Search<pcl::PointXYZ>::getName() const' /usr/bin/ld: /home/clf/hdl_global_localization/devel/lib/libfast_gicp.so: undefined reference topcl::search::Search::getName() const' /usr/bin/ld: /home/clf/hdl_global_localization/devel/lib/libfast_gicp.so: undefined reference to pcl::search::Search<pcl::PointXYZI>::getName() const' collect2: error: ld returned 1 exit status make[2]: *** [fast_gicp/CMakeFiles/gicp_align.dir/build.make:190:/home/clf/hdl_global_localization/devel/lib/fast_gicp/gicp_align] make[1]: *** [CMakeFiles/Makefile2:612:fast_gicp/CMakeFiles/gicp_align.dir/all] /usr/bin/ld: /home/clf/hdl_global_localization/devel/lib/libfast_gicp.so: undefined reference topcl::search::Search::getName() const' /usr/bin/ld: /home/clf/hdl_global_localization/devel/lib/libfast_gicp.so: undefined reference to pcl::search::Search<pcl::PointNormal>::getName() const' /usr/bin/ld: /home/clf/hdl_global_localization/devel/lib/libfast_gicp.so: undefined reference topcl::search::Search::getName() const' collect2: error: ld returned 1 exit status ` What problem is causing this?From my point of view,my version of pcl is 1.10,but code requires 1.7,is it? Thanks a lot!

qimao7213 commented 1 year ago

hi, i meet the same problem. Have you fixed it ?

qimao7213 commented 1 year ago

hi, i just fixed this problem. You can have a try.
find_package(catkin REQUIRED COMPONENTS roscpp pcl_ros ) comment "pcl_ros".