use RTABMAP with c++

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

use RTABMAP with c++

Engle
hello, im a new user of RTABMAP and Ubuntu
im trying use rtabmap code with a new "myproject" like the link
"https://github.com/introlab/rtabmap/wiki/Cplusplus-RGBD-Mapping"
but when i make , something wrong with util3d_filtering.h : no such file or directory
i check rtabmap/core it exist  util3d_filtering.h , so i didnt know what happened?
and i make rtabmap/examples/RGBDMapping , has the same problem.
can something help me , thx
Reply | Threaded
Open this post in threaded view
|

Re: use RTABMAP with c++

matlabbe
Administrator
Hi,

You should put your project outside the rtabmap source tree. Rtabmap should be also installed ($ make install) so that your project can find it with CMake.

Example:
$ cd rtabmap/build
$ cmake ..
$ make
$ sudo make install
(by default rtabmap is installed in "/usr/local")

$ cd 
~$ mkdir test
~$ cd test
~/test$ wget https://raw.githubusercontent.com/wiki/introlab/rtabmap/doc/Tutorials/CplusplusExampleRGBD/CMakeLists.txt
~/test$ wget https://raw.githubusercontent.com/introlab/rtabmap/master/examples/RGBDMapping/main.cpp
~/test$ wget https://raw.githubusercontent.com/introlab/rtabmap/master/examples/RGBDMapping/MapBuilder.h

~/test$ cmake .
-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- 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
-- 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
-- checking for module 'eigen3'
--   found eigen3, version 3.2.0
-- Found eigen: /usr/include/eigen3  
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   system
--   filesystem
--   thread
--   date_time
--   iostreams
--   serialization
-- checking for module 'openni-dev'
--   package 'openni-dev' not found
-- Found openni: /usr/lib/libOpenNI.so  
-- 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  
-- checking for module 'openni-dev'
--   package 'openni-dev' not found
-- Found qhull: /usr/lib/x86_64-linux-gnu/libqhull.so  
-- checking for module 'openni-dev'
--   package 'openni-dev' not found
-- looking for PCL_COMMON
-- Found PCL_COMMON: /usr/lib/libpcl_common.so  
-- looking for PCL_OCTREE
-- Found PCL_OCTREE: /usr/lib/libpcl_octree.so  
-- looking for PCL_IO
-- Found PCL_IO: /usr/lib/libpcl_io.so  
-- looking for PCL_KDTREE
-- Found PCL_KDTREE: /usr/lib/libpcl_kdtree.so  
-- looking for PCL_SEARCH
-- Found PCL_SEARCH: /usr/lib/libpcl_search.so  
-- looking for PCL_SAMPLE_CONSENSUS
-- Found PCL_SAMPLE_CONSENSUS: /usr/lib/libpcl_sample_consensus.so  
-- looking for PCL_FILTERS
-- Found PCL_FILTERS: /usr/lib/libpcl_filters.so  
-- looking for PCL_FEATURES
-- Found PCL_FEATURES: /usr/lib/libpcl_features.so  
-- looking for PCL_KEYPOINTS
-- Found PCL_KEYPOINTS: /usr/lib/libpcl_keypoints.so  
-- looking for PCL_GEOMETRY
-- Found PCL_GEOMETRY: /usr/include/pcl-1.7  
-- looking for PCL_SEGMENTATION
-- Found PCL_SEGMENTATION: /usr/lib/libpcl_segmentation.so  
-- looking for PCL_VISUALIZATION
-- Found PCL_VISUALIZATION: /usr/lib/libpcl_visualization.so  
-- looking for PCL_OUTOFCORE
-- Found PCL_OUTOFCORE: /usr/lib/libpcl_outofcore.so  
-- looking for PCL_REGISTRATION
-- Found PCL_REGISTRATION: /usr/lib/libpcl_registration.so  
-- looking for PCL_RECOGNITION
-- Found PCL_RECOGNITION: /usr/lib/libpcl_recognition.so  
-- looking for PCL_SURFACE
-- Found PCL_SURFACE: /usr/lib/libpcl_surface.so  
-- looking for PCL_PEOPLE
-- Found PCL_PEOPLE: /usr/lib/libpcl_people.so  
-- looking for PCL_TRACKING
-- Found PCL_TRACKING: /usr/lib/libpcl_tracking.so  
-- looking for PCL_APPS
-- Found PCL_APPS: /usr/lib/libpcl_apps.so  
-- Found PCL: ....
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found
-- Found Qt4: /usr/bin/qmake (found version "4.8.6") 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mathieu/test

~/test$ make
[ 33%] Generating moc_MapBuilder.cxx
Scanning dependencies of target rgbd_example
[ 66%] Building CXX object CMakeFiles/rgbd_example.dir/main.cpp.o
[100%] Building CXX object CMakeFiles/rgbd_example.dir/moc_MapBuilder.cxx.o
Linking CXX executable rgbd_example
[100%] Built target rgbd_example

~/test$ ./rgbd_example 

Usage:
rtabmap-rgbd_mapping driver
  driver       Driver number to use: 0=OpenNI-PCL, 1=OpenNI2, 2=Freenect, 3=OpenNI-CV, 4=OpenNI-CV-ASUS

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

Re: use RTABMAP with c++

Engle
In reply to this post by Engle
thx a lot , i'll try that again ^^