Open Levi568 opened 5 years ago
Is it the PCL binaries or built from source? Has rtabmap been built with another PCL version previously? If so, clean the build directory, relaunch cmake and build again.
@matlabbe my pcl-1.7 is built from source. May I ask that since ROS has default pcl-1.7, can I just uninstall my pcl-1.7 and use the default one? I think there may be some confliction issue.
Yes, it is even recommended to use PCL binaries installed with ROS. This is the default build. We don't test against all PCL versions built from source with all different options.
Output using cmake -DWITH_VINS=OFF ..
-- The C compiler identification is GNU 6.5.0 -- The CXX compiler identification is GNU 6.5.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Checking for module 'eigen3' -- Found eigen3, version 3.2.10 -- Found eigen: /usr/local/include/eigen3
-- Checking for module 'libopenni' -- Found libopenni, version 1.5.4.0 -- Found openni: /usr/lib/libOpenNI.so
-- Checking for module 'libopenni2' -- Found libopenni2, version 2.2.0.3 -- Found OpenNI2: /usr/lib/libOpenNI2.so
-- The imported target "vtkRenderingPythonTkWidgets" references the file "/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so" but this file does not exist. Possible reasons include:
-- The imported target "vtk" references the file "/usr/bin/vtk" but this file does not exist. Possible reasons include:
-- Found libusb-1.0: /usr/include
-- Checking for module 'flann' -- Found flann, version 1.8.4 -- Found Flann: /usr/lib/x86_64-linux-gnu/libflann_cpp_s.a
-- Found qhull: /usr/lib/x86_64-linux-gnu/libqhull.so
-- Found PCL_COMMON: /usr/lib/x86_64-linux-gnu/libpcl_common.so
-- Found PCL_OCTREE: /usr/lib/x86_64-linux-gnu/libpcl_octree.so
-- Found PCL_IO: /usr/lib/x86_64-linux-gnu/libpcl_io.so
-- Found PCL_KDTREE: /usr/lib/x86_64-linux-gnu/libpcl_kdtree.so
-- Found PCL_SEARCH: /usr/lib/x86_64-linux-gnu/libpcl_search.so
-- Found PCL_SURFACE: /usr/lib/x86_64-linux-gnu/libpcl_surface.so
-- Found PCL_FILTERS: /usr/lib/x86_64-linux-gnu/libpcl_filters.so
-- Found PCL_FEATURES: /usr/lib/x86_64-linux-gnu/libpcl_features.so
-- Found PCL_REGISTRATION: /usr/lib/x86_64-linux-gnu/libpcl_registration.so
-- Found PCL_SAMPLE_CONSENSUS: /usr/lib/x86_64-linux-gnu/libpcl_sample_consensus.so
-- Found PCL_GEOMETRY: /usr/include/pcl-1.7
-- Found PCL_SEGMENTATION: /usr/lib/x86_64-linux-gnu/libpcl_segmentation.so
-- Found PCL_VISUALIZATION: /usr/lib/x86_64-linux-gnu/libpcl_visualization.so
-- PCL definitions don't contain "-march=native", make sure all libraries using Eigen are also compiled without that flag to avoid some segmentation faults (with gdb referring to some Eigen functions). -- Found Sqlite3: /usr/include /usr/lib/x86_64-linux-gnu/libsqlite3.so -- Try OpenMP C flag = [-fopenmp] -- Performing Test OpenMP_FLAG_DETECTED -- Performing Test OpenMP_FLAG_DETECTED - Success -- Try OpenMP CXX flag = [-fopenmp] -- Performing Test OpenMP_FLAG_DETECTED -- Performing Test OpenMP_FLAG_DETECTED - Success -- Found OpenMP: -fopenmp
-- Found OpenMP -- Found OpenCV: /opt/ros/kinetic/include/opencv-3.3.1-dev;/opt/ros/kinetic/include/opencv-3.3.1-dev/opencv -- Found PCL: /usr/include/pcl-1.7;/usr/local/include/eigen3;/usr/include;/usr/include/ni;/usr/include/openni2;/usr/include/vtk-6.2;/usr/include/x86_64-linux-gnu;/usr/include/hdf5/openmpi;/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent;/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent/include;/usr/lib/openmpi/include;/usr/lib/openmpi/include/openmpi;/usr/include/jsoncpp;/usr/include/freetype2;/usr/include/x86_64-linux-gnu/freetype2;/usr/include/python2.7;/usr/include/libxml2;/usr/include/tcl -- Found ZLIB: /usr/include -- VTK_RENDERING_BACKEND=OpenGL -- Found Freenect: /usr/include -- Found OpenNI2: /usr/include/openni2 -- Found DC1394: /usr/include/dc1394 -- Found CSPARSE: /usr/include/suitesparse
-- Old g2o version detected with c++03 interface (config file: /opt/ros/kinetic/include/g2o/config.h). -- Found g2o: /opt/ros/kinetic/include;/usr/include/suitesparse;/usr/include/suitesparse -- GTSAM include directory: /usr/local/lib/cmake/GTSAM/../../../include -- FlyCapture2_INCLUDE_DIR=FlyCapture2_INCLUDE_DIR-NOTFOUND -- FlyCapture2_LIBRARY=FlyCapture2_LIBRARY-NOTFOUND -- Triclops_INCLUDE_DIR=Triclops_INCLUDE_DIR-NOTFOUND -- Triclops_LIBRARY=Triclops_LIBRARY-NOTFOUND -- FlyCaptureBridge_LIBRARY=FlyCaptureBridge_LIBRARY-NOTFOUND -- Found RealSense2: -- Found octomap 1.8.1: /opt/ros/kinetic/include -- Found required Ceres dependency: Eigen version 3.2.10 in /usr/local/include/eigen3 -- Found required Ceres dependency: glog -- Performing Test GFLAGS_IN_GOOGLE_NAMESPACE -- Performing Test GFLAGS_IN_GOOGLE_NAMESPACE - Success -- Found required Ceres dependency: gflags -- Found Ceres version: 2.0.0 installed in: /usr/local with components: [EigenSparse, SparseLinearAlgebraLibrary, LAPACK, SuiteSparse, CXSparse, SchurSpecializations] -- Architecture: x86_64 -- Performing Test COMPILER_SUPPORTS_CXX11 -- Performing Test COMPILER_SUPPORTS_CXX11 - Success -- Performing Test COMPILER_SUPPORTS_CXX0X -- Performing Test COMPILER_SUPPORTS_CXX0X - Success -- Found Pthreads
-- Info : -- Version : 0.19.5 -- CMAKE_INSTALL_PREFIX = /usr/local -- CMAKE_BUILD_TYPE = Release -- CMAKE_INSTALL_LIBDIR = lib -- BUILD_APP = ON -- BUILD_TOOLS = ON -- BUILD_EXAMPLES = ON -- BUILD_SHARED_LIBS = ON -- CMAKE_CXX_FLAGS = -fmessage-length=0 -fopenmp -std=c++11 -- FLANN_KDTREE_MEM_OPT = OFF -- PCL_DEFINITIONS = -DEIGEN_USE_NEW_STDVECTOR;-DEIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET;-DFLANN_STATIC;-Dqh_QHpointer -- PCL_VERSION = 1.7.2 -- -- Optional dependencies ('' affects some default parameters) : -- With OpenCV 3 xfeatures2d module (SIFT/SURF/BRIEF/FREAK) = YES (License: Non commercial) -- With Qt5 = YES (License: Open Source or Commercial) -- With VTK 6.2 = YES (License: BSD) -- With external SQLite3 = YES (License: Public Domain) -- With ORB OcTree = YES (License: GPLv3) -- With Madgwick = YES (License: GPL) -- With FastCV = NO (FastCV not found) -- -- Solvers: -- With TORO = YES (License: Creative Commons [Attribution-NonCommercial-ShareAlike]) -- With g2o = YES (License: BSD) -- With GTSAM = YES (License: BSD) -- With Ceres = YES (License: BSD) -- With VERTIGO = YES (License: GPLv3) -- With cvsba = NO (cvsba not found) -- With libpointmatcher = NO (libpointmatcher not found) -- -- Reconstruction Approaches: -- With OCTOMAP = YES (License: BSD) -- With CPUTSDF = NO (CPUTSDF not found) -- With OpenChisel = NO (open_chisel not found) -- -- Camera Drivers: -- With Freenect = YES (License: Apache v2 and/or GPLv2) -- With OpenNI2 = YES (License: Apache v2) -- With Freenect2 = NO (libfreenect2 not found) -- With Kinect for Windows 2 = NO (Kinect for Windows 2 SDK not found) -- With Kinect for Azure = NO (Kinect for Azure SDK not found) -- With dc1394 = YES (License: LGPL) -- With FlyCapture2/Triclops = NO (Point Grey SDK not found) -- With ZED = NO (ZED sdk not found) -- With RealSense = NO (librealsense not found) -- With RealSense2 = YES (License: Apache-2) -- -- Odometry Approaches: -- With loam_velodyne = NO (loam_velodyne not found) -- With libfovis = NO (libfovis not found) -- With libviso2 = NO (libviso2 not found) -- With dvo_core = NO (dvo_core not found) -- With okvis = NO (okvis not found) -- With msckf_vio = NO (WITH_MSCKF_VIO=OFF) -- With VINS-Fusion = NO (WITH_VINS=OFF) -- With ORB_SLAM2 = NO (WITH_G2O should be OFF as ORB_SLAM2 uses its own g2o version)
-- Configuring done -- Generating done -- Build files have been written to: /home/wei/rtabmap/build
Error message
[ 4%] Built target rtabmap_utilite [ 5%] Built target res_tool [ 43%] Built target rtabmap_core [ 81%] Built target rtabmap_gui [ 82%] Linking CXX executable ../../../bin/rtabmap ../../../bin/librtabmap_core.so.0.19.5: undefined reference to::getName[abi:cxx11]() const'
../../../bin/librtabmap_core.so.0.19.5: undefined reference to ::getName[abi:cxx11]() const'
../../../bin/librtabmap_core.so.0.19.5: undefined reference to `pcl::search::Search::getName[abi:cxx11]() const'
collect2: error: ld returned 1 exit status
app/src/CMakeFiles/rtabmap.dir/build.make:529: recipe for target '../bin/rtabmap' failed
make[2]: [../bin/rtabmap] Error 1
CMakeFiles/Makefile2:416: recipe for target 'app/src/CMakeFiles/rtabmap.dir/all' failed
make[1]: [app/src/CMakeFiles/rtabmap.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
pcl::search::Search<pcl::PointNormal>::getName[abi:cxx11]() const' ../../../bin/librtabmap_gui.so.0.19.5: undefined reference to
pcl::search::Searchpcl::search::Search<pcl::PointXYZI>::getName[abi:cxx11]() const' ../../../bin/librtabmap_core.so.0.19.5: undefined reference to
pcl::search::SearchSame as issue #380, I installed VINS-Mono and VINS-Fusion on Ubuntu 16.04, ROS Kinetic successfully. I also installed the PCL 1.7 and test it with c++ code, but not sure why there is an issue when building on rabmap