Re: Build project with example code but failed, Any help great appreciated!
Posted by
matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Build-project-with-example-code-but-failed-Any-help-great-appreciated-tp545p547.html
Look at the CMake on this page:
https://github.com/introlab/rtabmap/wiki/Cplusplus-Loop-Closure-Detection
cmake_minimum_required(VERSION 2.8)
PROJECT( MyProject )
FIND_PACKAGE(RTABMap REQUIRED)
FIND_PACKAGE(OpenCV REQUIRED)
SET(INCLUDE_DIRS
${RTABMap_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
)
SET(LIBRARIES
${RTABMap_LIBRARIES}
${OpenCV_LIBRARIES}
)
INCLUDE_DIRECTORIES(${INCLUDE_DIRS})
ADD_EXECUTABLE(example main.cpp)
TARGET_LINK_LIBRARIES(example ${LIBRARIES})
For RGB-D mapping, you may want to check on this page example instead:
https://github.com/introlab/rtabmap/wiki/Cplusplus-RGBD-Mappingcheers