Re: How to use ORB_SLAM2 library in rtabmap?
Posted by user1245 on
URL: http://official-rtab-map-forum.206.s1.nabble.com/How-to-use-ORB-SLAM2-library-in-rtabmap-tp4230p6475.html
Hi,
I try to compile rtabmap with orbslam2 and realsense2.
-- Eigen found (include: /usr/local/include/eigen3, version: 3.3.5)
-- OpenNI found (include: /usr/include/ni, lib: /usr/lib/libOpenNI.so)
-- The imported target "vtkRenderingPythonTkWidgets" references the file
"/usr/lib/aarch64-linux-gnu/libvtkRenderingPythonTkWidgets.so"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"/usr/lib/cmake/vtk-6.2/VTKTargets.cmake"
but not all the files it references.
-- The imported target "vtk" references the file
"/usr/bin/vtk"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"/usr/lib/cmake/vtk-6.2/VTKTargets.cmake"
but not all the files it references.
-- QHULL found (include: /usr/include, lib: optimized;/usr/lib/aarch64-linux-gnu/libqhull.so;debug;/usr/lib/aarch64-linux-gnu/libqhull.so)
-- OpenNI found (include: /usr/include/ni, lib: /usr/lib/libOpenNI.so)
CMake Warning at CMakeLists.txt:212 (MESSAGE):
PCL compile options contain "-march=native", make sure all libraries using
Eigen are also compiled with that flag to avoid some segmentation faults
(with gdb referring to some Eigen functions).
-- Found Sqlite3: /usr/include /usr/lib/aarch64-linux-gnu/libsqlite3.so
-- 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/local/include/pcl-1.9;/usr/local/include/eigen3;/usr/include;/usr/include/ni;/usr/include/vtk-6.2;/usr/include/freetype2;/usr/include/aarch64-linux-gnu/freetype2;/usr/include/aarch64-linux-gnu;/usr/include/jsoncpp
-- Found ZLIB: /usr/include
-- VTK_RENDERING_BACKEND=OpenGL
-- Found Freenect: /usr/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
-- A library with BLAS API found.
-- Found CUDA: /usr/local/cuda-9.0 (found suitable version "9.0", minimum required is "9.0")
-- Found ZED sdk: /usr/local/zed/include
-- Found CUDA: /usr/local/cuda-9.0 (found version "9.0")
-- Found CUDA: /usr/local/cuda-9.0/include
-- Found RealSense2:
-- Found octomap 1.8.1: /opt/ros/kinetic/include
-- Architecture: aarch64
-- Found ORB_SLAM2: /home/nvidia/ORB_SLAM2/include;/home/nvidia/ORB_SLAM2/Thirdparty/g2o;/home/nvidia/ORB_SLAM2
-- Found Pangolin: /home/nvidia/Pangolin/include;/home/nvidia/Pangolin/build/src/include;/usr/include;/usr/include;/usr/include;/usr/local/include/eigen3
-- Found Pthreads
-- --------------------------------------------
-- Info :
-- Version : 0.19.6
-- 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 = -DDISABLE_PCAP;-DDISABLE_PNG;-DDISABLE_LIBUSB_1_0
-- PCL_VERSION = 1.9.1.99
-- PCL_COMPILE_OPTIONS = -march=native;-ffloat-store
--
-- 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 = NO (WITH_G2O=OFF)
-- *With GTSAM = NO (GTSAM not found)
-- *With Ceres = NO (Ceres not found)
-- With VERTIGO = NO (GTSAM or g2o required)
-- 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)
-- With AliceVision = NO (WITH_ALICE_VISION=OFF)
--
-- Camera Drivers:
-- With Freenect = YES (License: Apache v2 and/or GPLv2)
-- With OpenNI2 = NO (OpenNI2 not found)
-- 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 = NO (dc1394 not found)
-- With FlyCapture2/Triclops = NO (Point Grey SDK not found)
-- With ZED = YES (With CUDA)
-- 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 (VINS-Fusion not found)
-- With ORB_SLAM2 = YES (License: GPLv3)
-- --------------------------------------------
-- Configuring done
[ 4%] Built target rtabmap_utilite
[ 4%] Built target res_tool
[ 40%] Built target rtabmap_core
[ 80%] Built target rtabmap_gui
[ 80%] Linking CXX executable ../../../bin/rtabmap
../../../bin/librtabmap_gui.so.0.19.6: undefined reference to `pcl::visualization::Camera::Camera()'
collect2: error: ld returned 1 exit status
app/src/CMakeFiles/rtabmap.dir/build.make:300: 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
How to solve it? Thanks