Re: cannot find libfovis when compiling
Posted by
matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/cannot-find-libfovis-when-compiling-tp4932p4960.html
Hi Alex,
I took some time to try the installation from scratch too, using
ros docker for convenience:
$ docker pull ros:kinetic-perception
$ docker run -it ros:kinetic-perception
# cd
# mkdir catkin_ws
# cd catkin_ws
# mkdir src
# cd src
# catkin_init_workspace
# git clone https://github.com/srv/libfovis.git
# git clone https://github.com/laboshinl/loam_velodyne.git
# cd loam_velodyne
// patching loam_velodyne (see below)
# git fetch origin pull/89/head:matlabbe
# git checkout matlabbe
# cd ../..
# catkin_make -DCMAKE_BUILD_TYPE=Release
// install all rtabmap default dependencies, for convenience, just install/remove the binary package from ros
# apt-get update
# apt-get install ros-kinetic-rtabmap-ros
# apt-get remove ros-kinetic-rtabmap
# cd
# source catkin_ws/devel/setup.bash
# git clone https://github.com/introlab/rtabmap.git
# cd rtabmap/build
# cmake ..
-- --------------------------------------------
-- Info :
-- Version : 0.17.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++14
-- PCL_DEFINITIONS = -DEIGEN_USE_NEW_STDVECTOR;-DEIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET;-DFLANN_STATIC;-Dqh_QHpointer
-- With OpenCV 3 xfeatures2d module (SIFT/SURF/BRIEF/FREAK) = YES (License: Non commercial)
-- 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 dc1394 = NO (dc1394 not found)
-- With FlyCapture2/Triclops = NO (Point Grey SDK not found)
-- With TORO = YES (License: Creative Commons [Attribution-NonCommercial-ShareAlike])
-- With g2o = YES (License: BSD)
-- With GTSAM = NO (GTSAM not found)
-- With VERTIGO = YES (License: GPLv3)
-- With cvsba = NO (cvsba not found)
-- With libpointmatcher = NO (libpointmatcher not found)
-- With loam_velodyne = YES (License: BSD)
-- With ZED = NO (ZED sdk not found)
-- With RealSense = NO (librealsense not found)
-- With RealSense2 = NO (librealsense2 not found)
-- With OCTOMAP = YES (License: BSD)
-- With CPUTSDF = NO (CPUTSDF not found)
-- With OpenChisel = NO (open_chisel not found)
-- With libfovis = YES (License: GPLv2)
-- 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 ORB_SLAM2 = NO (WITH_G2O should be OFF as ORB_SLAM2 uses its own g2o version)
-- With Qt5 = YES (License: Open Source or Commercial)
-- --------------------------------------------
From latest version of
loam_velodyne, you need this
patch to build it and to avoid linker errors with rtabmap.
For libfovis, I fixed the error of include not found in this
commit. The error was that the kinetic branch on libfovis has been
updated (putting all headers in a libfovis subdirectory) after I cloned the repository last year.
With OpenCV3 and g2o installed by ros kinetic, you should have the same performance. Libraries that are helpful for rtabmap is GTSAM (though g2o gives similar results for graph optimization) and libpointmatcher (useful if you are using laser scans).
cheers,
Mathieu