cannot find libfovis when compiling

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

cannot find libfovis when compiling

alexr
Hi,

I am doing a clean install for ROS kinetic and installing by source. I downloaded and compiled most of the external libraries before building rtabmap.
Here is how my
cmake
 looks like:
~/rtabmap/build$ cmake ..
-- 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 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.

-- 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 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/include/eigen3;/usr/include;/usr/include/ni;/usr/include/openni2;/usr/include/vtk-6.2;/usr/include/freetype2;/usr/include/x86_64-linux-gnu/freetype2;/usr/include/x86_64-linux-gnu;/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/python2.7;/usr/include/hdf5/openmpi;/usr/include/libxml2;/usr/include/tcl
-- Found ZLIB: /usr/include
-- VTK_RENDERING_BACKEND=OpenGL
-- Found Freenect: /opt/ros/kinetic/include/libfreenect
-- Found OpenNI2: /usr/include/openni2
-- Found DC1394: /usr/include/dc1394
CMake Warning at cmake_modules/FindG2O.cmake:122 (MESSAGE):
  Latest g2o version detected with c++11 interface (config file:
  /usr/local/include/g2o/config.h).  Make sure g2o is built with
  "-DBUILD_WITH_MARCH_NATIVE=OFF" to avoid segmentation faults caused by
  Eigen.
Call Stack (most recent call first):
  CMakeLists.txt:307 (FIND_PACKAGE)


-- Found g2o: /usr/local/include;/usr/include/suitesparse;/usr/include/suitesparse
-- GTSAM include directory:  /usr/local/lib/cmake/GTSAM/../../../include;/usr/include;/usr/local/include/gtsam/3rdparty/Eigen/
-- Found cvsba: /usr/local/include
-- Found libpointmatcher: /usr/local/include;/usr/include;/usr/include;/usr/local/include;/home/arav/software_lib/libpointmatcher/pointmatcher;/home/arav/software_lib/libpointmatcher/pointmatcher/DataPointsFilters;/home/arav/software_lib/libpointmatcher/pointmatcher/DataPointsFilters/utils
-- Found RealSense2: 
-- Found octomap 1.8.1: /opt/ros/kinetic/include
-- Found libfovis: /usr/local/include
-- Found libviso2: /home/arav/catkin_ws/src/viso2/libviso2/libviso2/src
-- Found Pthreads
-- --------------------------------------------
-- 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++11
--   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              = YES (License: Apache v2)
--   With Freenect2            = NO (libfreenect2 not found)
--   With Kinect for Windows 2 = NO (Kinect for Windows 2 SDK not found)
--   With dc1394               = YES (License: LGPL)
--   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                = YES (License: BSD)
--   With VERTIGO              = YES (License: GPLv3)
--   With cvsba                = YES (License: GPLv2)
--   With libpointmatcher      = YES (License: BSD)
--   With loam_velodyne        = NO (loam_velodyne not found)
--   With ZED                  = NO (ZED sdk not found)
--   With RealSense            = NO (librealsense not found)
--   With RealSense2           = YES (License: Apache-2)
--   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             = YES (License: GPLv3)
--   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)
-- --------------------------------------------
-- Configuring done
-- Generating done
-- Build files have been written to: /home/arav/rtabmap/build

when running the
make 
command inside build, it is not able to find libfovis although installed using instructions shown below

  $ mkdir build
  $ cd build
  $ cmake ..
  $ make
  $ sudo make install
  $ sudo ldconfig

Error:
~/rtabmap/build$ make
[  4%] Built target rtabmap_utilite
[  4%] Built target res_tool
[  4%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/OdometryFovis.cpp.o
/home/arav/rtabmap/corelib/src/OdometryFovis.cpp:36:21: fatal error: fovis.hpp: No such file or directory
compilation terminated.
corelib/src/CMakeFiles/rtabmap_core.dir/build.make:1291: recipe for target 'corelib/src/CMakeFiles/rtabmap_core.dir/OdometryFovis.cpp.o' failed
make[2]: *** [corelib/src/CMakeFiles/rtabmap_core.dir/OdometryFovis.cpp.o] Error 1
CMakeFiles/Makefile2:267: recipe for target 'corelib/src/CMakeFiles/rtabmap_core.dir/all' failed
make[1]: *** [corelib/src/CMakeFiles/rtabmap_core.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

Another thing, I have loam_velodyne in my catkin folder, however rtabmap is not able to find it. Can you suggest something.

Thanks

------ Alex
Reply | Threaded
Open this post in threaded view
|

Re: cannot find libfovis when compiling

matlabbe
Administrator
Hi Alex,

On my system I've built libfovis directly with catkin (in catkin workspace). For loam_velodyne, cmake should find it in your catkin_ws if you sourced ~/catkin_ws/devel/setup.bash:
$ cd rtabmap/build
$ cmake ..
...
-- Found libfovis: /home/mathieu/catkin_ws/src/libfovis/libfovis
-- Found loam_velodyne: /home/mathieu/catkin_ws/src/loam_velodyne/include;/usr/include/eigen3;/usr/local/include/pcl-1.8;/usr/include;/usr/include/ni;/usr/include/openni2;/usr/include/vtk-6.2;/usr/include/jsoncpp;/usr/include/freetype2;/usr/include/x86_64-linux-gnu/freetype2;/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/hdf5/openmpi;/usr/include/x86_64-linux-gnu;/usr/include/libxml2;/usr/include/python2.7;/usr/include/tcl;/opt/ros/kinetic/include;/opt/ros/kinetic/share/xmlrpcpp/cmake/../../../include/xmlrpcpp;/home/mathieu/catkin_ws/src/perception_pcl/pcl_conversions/include
...

$ ls ~/catkin_ws/src/libfovis/libfovis | grep fovis.hpp
fovis.hpp

 
With the PATH set like this (by ~/catkin_ws/devel/setup.bash):
$ env | grep PATH
PATH=/home/mathieu/catkin_ws/devel/bin:/opt/ros/kinetic/bin:...
cmake should be able to find those config files:
$ ls ~/catkin_ws/devel/share/libfovis/cmake
libfovisConfig.cmake  libfovisConfig-version.cmake

$ ls ~/catkin_ws/devel/share/loam_velodyne/cmake
loam_velodyneConfig.cmake  loam_velodyneConfig-version.cmake

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: cannot find libfovis when compiling

alexr
This post was updated on .
Hi,

This did not solved my problem. I tried to build it with catkin inside ~/catkin_ws/src as well.

cmake can find both the libraries (libfovus and loam_velodyne )inside the catkin_ws however, the error is still the same. cmake .. inside rtabmap cannot still find loam_velodyne.

Is it because I have also catkin_isolated packages inside my catkin_ws folder which is affecting rtabmap to find fovis.hpp?
I have to run ls ~/catkin_ws/src/libfovis/libfovis/libfovis | grep fovis.hpp   (Notice another libfovis folder at the end)
fovis.hpp

Thanks

------ Alex
Reply | Threaded
Open this post in threaded view
|

Re: cannot find libfovis when compiling

matlabbe
Administrator
Where are installed libfovisConfig.cmake and loam_velodyneConfig.cmake? Those are the files that cmake should find to say that the libraries are found.

What is the PATH?
$ env | grep PATH
Reply | Threaded
Open this post in threaded view
|

Re: cannot find libfovis when compiling

alexr
My grep path shows as follows

$ env | grep PATH
ROS_PACKAGE_PATH=/home/arav/catkin_ws/src/viso2/viso2_ros:/home/arav/catkin_ws/src/viso2/viso2:/home/arav/catkin_ws/src/velodyne/velodyne_pointcloud:/home/arav/catkin_ws/src/velodyne/velodyne_driver:/home/arav/catkin_ws/src/velodyne/velodyne_msgs:/home/arav/catkin_ws/src/velodyne/velodyne_laserscan:/home/arav/catkin_ws/src/velodyne/velodyne:/home/arav/catkin_ws/src/loam_velodyne:/home/arav/catkin_ws/src/viso2/libviso2:/home/arav/catkin_ws/src/ethzasl_icp_mapping/ethzasl_point_cloud_vtk_tools:/home/arav/catkin_ws/src/ethzasl_icp_mapping/ethzasl_icp_mapper_experiments:/home/arav/catkin_ws/src/ethzasl_icp_mapping/ethzasl_icp_mapper:/home/arav/catkin_ws/src/ethzasl_icp_mapping/libpointmatcher_ros:/home/arav/catkin_ws/src/ethzasl_icp_mapping/ethzasl_icp_mapping:/home/arav/catkin_ws/src/ethzasl_icp_mapping/ethzasl_gridmap_2d:/home/arav/catkin_ws/src/ethzasl_icp_mapping/ethzasl_extrinsic_calibration:/home/arav/catkin_ws/src:/opt/ros/kinetic/share
LD_LIBRARY_PATH=/home/arav/catkin_ws/devel_isolated/viso2_ros/lib:/home/arav/catkin_ws/devel_isolated/velodyne_pointcloud/lib:/home/arav/catkin_ws/devel_isolated/velodyne_driver/lib:/home/arav/catkin_ws/devel_isolated/velodyne_msgs/lib:/home/arav/catkin_ws/devel_isolated/velodyne_laserscan/lib:/home/arav/catkin_ws/devel_isolated/loam_velodyne/lib:/home/arav/catkin_ws/devel_isolated/libviso2/lib:/home/arav/catkin_ws/devel_isolated/ethzasl_point_cloud_vtk_tools/lib:/home/arav/catkin_ws/devel_isolated/ethzasl_icp_mapper_experiments/lib:/home/arav/catkin_ws/devel_isolated/ethzasl_icp_mapper/lib:/home/arav/catkin_ws/devel_isolated/libpointmatcher_ros/lib:/home/arav/catkin_ws/devel_isolated/ethzasl_gridmap_2d/lib:/home/arav/catkin_ws/devel_isolated/ethzasl_extrinsic_calibration/lib:/home/arav/catkin_ws/devel/lib:/opt/ros/kinetic/lib:/opt/ros/kinetic/lib/x86_64-linux-gnu
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path
PATH=/opt/ros/kinetic/bin:/home/arav/bin:/home/arav/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path
PYTHONPATH=/home/arav/catkin_ws/devel_isolated/viso2_ros/lib/python2.7/dist-packages:/home/arav/catkin_ws/devel_isolated/velodyne_pointcloud/lib/python2.7/dist-packages:/home/arav/catkin_ws/devel_isolated/velodyne_driver/lib/python2.7/dist-packages:/home/arav/catkin_ws/devel_isolated/velodyne_msgs/lib/python2.7/dist-packages:/home/arav/catkin_ws/devel_isolated/velodyne_laserscan/lib/python2.7/dist-packages:/home/arav/catkin_ws/devel_isolated/ethzasl_icp_mapper/lib/python2.7/dist-packages:/home/arav/catkin_ws/devel/lib/python2.7/dist-packages:/opt/ros/kinetic/lib/python2.7/dist-packages
PKG_CONFIG_PATH=/home/arav/catkin_ws/devel_isolated/viso2_ros/lib/pkgconfig:/home/arav/catkin_ws/devel_isolated/velodyne_pointcloud/lib/pkgconfig:/home/arav/catkin_ws/devel_isolated/velodyne_driver/lib/pkgconfig:/home/arav/catkin_ws/devel_isolated/velodyne_msgs/lib/pkgconfig:/home/arav/catkin_ws/devel_isolated/velodyne_laserscan/lib/pkgconfig:/home/arav/catkin_ws/devel_isolated/loam_velodyne/lib/pkgconfig:/home/arav/catkin_ws/devel_isolated/libviso2/lib/pkgconfig:/home/arav/catkin_ws/devel_isolated/ethzasl_point_cloud_vtk_tools/lib/pkgconfig:/home/arav/catkin_ws/devel_isolated/ethzasl_icp_mapper_experiments/lib/pkgconfig:/home/arav/catkin_ws/devel_isolated/ethzasl_icp_mapper/lib/pkgconfig:/home/arav/catkin_ws/devel_isolated/libpointmatcher_ros/lib/pkgconfig:/home/arav/catkin_ws/devel_isolated/ethzasl_gridmap_2d/lib/pkgconfig:/home/arav/catkin_ws/devel_isolated/ethzasl_extrinsic_calibration/lib/pkgconfig:/home/arav/catkin_ws/devel/lib/pkgconfig:/opt/ros/kinetic/lib/pkgconfig:/opt/ros/kinetic/lib/x86_64-linux-gnu/pkgconfig
CMAKE_PREFIX_PATH=/home/arav/catkin_ws/devel_isolated/viso2_ros:/home/arav/catkin_ws/devel_isolated/viso2:/home/arav/catkin_ws/devel_isolated/velodyne_pointcloud:/home/arav/catkin_ws/devel_isolated/velodyne_driver:/home/arav/catkin_ws/devel_isolated/velodyne_msgs:/home/arav/catkin_ws/devel_isolated/velodyne_laserscan:/home/arav/catkin_ws/devel_isolated/velodyne:/home/arav/catkin_ws/devel_isolated/loam_velodyne:/home/arav/catkin_ws/devel_isolated/libviso2:/home/arav/catkin_ws/devel_isolated/ethzasl_point_cloud_vtk_tools:/home/arav/catkin_ws/devel_isolated/ethzasl_icp_mapper_experiments:/home/arav/catkin_ws/devel_isolated/ethzasl_icp_mapper:/home/arav/catkin_ws/devel_isolated/libpointmatcher_ros:/home/arav/catkin_ws/devel_isolated/ethzasl_icp_mapping:/home/arav/catkin_ws/devel_isolated/ethzasl_gridmap_2d:/home/arav/catkin_ws/devel_isolated/ethzasl_extrinsic_calibration:/home/arav/catkin_ws/devel:/opt/ros/kinetic
------ Alex
Reply | Threaded
Open this post in threaded view
|

Re: cannot find libfovis when compiling

matlabbe
Administrator
Hi Alex,

The PATH seems wrong. After sourcing setup.bash in catkin_ws/devel (see ros instructions), the PATH should look more like this (on my system):
$ env | grep PATH
PATH=/home/mathieu/catkin_ws/devel/bin:/opt/ros/kinetic/bin...
The "catkin_ws/devel/bin" is before "/opt/ros/kinetic/bin", which is used by cmake to find the libraries built in your catkin workspace.

Maybe the isolated build doesn't create "catkin_ws/devel/bin". I don't use isolated builds so I am not sure how libraries can be linked from outside the workspace.

Another option is to set the path of libfovis and loam_velodyne config files:
$ cd rtabmap/build
$ cmake -Dloam_velodyne_DIR=~/catkin_ws/devel/share/loam_velodyne/cmake -Dlibfovis_DIR=~/catkin_ws/devel/share/libfovis/cmake

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: cannot find libfovis when compiling

alexr
Hi,

Still the same problem of not finding fovis.hpp.
I tried to uninstall everything and started from scratch and yet the same problem.
I am now thinking of installing the OS again and install everything fresh. Can you tell me whether the extra libraries
are actually helpful when building rtabmap (libfovis, viso2, etc).

Another thing, for opencv, do you recommend to install by source for ROS kinetic or the standalone opencv3 supplied by kinetic is enough to do good mapping. Same for g2o, should I go for the source install or libg2o is good enough.

Thanks
------ Alex
Reply | Threaded
Open this post in threaded view
|

Re: cannot find libfovis when compiling

matlabbe
Administrator
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
Reply | Threaded
Open this post in threaded view
|

Re: cannot find libfovis when compiling

alexr
Hi Mathieu,

Thanks for checking that out. I will report back soon with my testss.

Thanks for your time.

Regards
------ Alex
Reply | Threaded
Open this post in threaded view
|

Re: cannot find libfovis when compiling

alexr
Hi Mathieu

Just to report back, with the update libfovis could be found now. However, the loam_velodyne is still not found when invoking cmake ..

FYI, I patched it with your patch when install loam_velodyne in catkin_ws/src.

Thanks
------ Alex
Reply | Threaded
Open this post in threaded view
|

Re: cannot find libfovis when compiling

matlabbe
Administrator
This post was updated on .
I retried the docker instructions in the post above with latest code and loam_velodyne is still found:
$ 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/laboshinl/loam_velodyne.git
# cd loam_velodyne
# git fetch origin pull/89/head:matlabbe
# git checkout matlabbe
# cd ../..
# catkin_make -DCMAKE_BUILD_TYPE=Release
# cd
# source catkin_ws/devel/setup.bash
# git clone https://github.com/introlab/rtabmap.git
# cd rtabmap/build
# cmake ..
-- --------------------------------------------
-- Info :
--   Version : 0.17.7
--   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
-- Optional dependencies ('*' affects some default parameters) :
--  *With OpenCV 3 xfeatures2d module (SIFT/SURF/BRIEF/FREAK) = YES (License: Non commercial)
--   With external SQLite3     = YES (License: Public Domain)
--   With Freenect             = NO (libfreenect not found)
--   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                  = NO (g2o not found)
--  *With GTSAM                = NO (GTSAM not found)
--   With VERTIGO              = NO (GTSAM or g2o required)
--   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              = NO (octomap not found)
--   With CPUTSDF              = NO (CPUTSDF not found)
--   With OpenChisel           = NO (open_chisel 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 ORB_SLAM2            = NO (ORB_SLAM2 not found, make sure environment variable ORB_SLAM2_ROOT_DIR is set)
--   With Qt5                  = YES (License: Open Source or Commercial)
-- --------------------------------------------

Not sure why cmake cannot find it on your system...