I try the tutorial in
https://github.com/introlab/rtabmap/wiki/Cplusplus-RGBD-Mapping.
cmake and make gives no error.
However, I got error when I run
./rgbd_mapping 7
[ERROR] (2018-11-12 11:30:11.359) main.cpp:113::main() Not built with RealSense support...
I am not sure my installation of everything is correct. I can sure I can run realsense2_camera and receive img and cloud point when I run :
roslaunch realsense2_camera rs_camera.launch align_depth:=true
roslaunch rtabmap_ros rtabmap.launch rtabmap_args:="--delete_db_on_start" depth_topic:=/camera/aligned_depth_to_color/image_raw rgb_topic:=/camera/color/image_raw camera_info_topic:=/camera/color/camera_info rviz:=true
I am using D415 but I don't think this is the problem. I followed
https://github.com/intel-ros/realsense/#installation-instructions to install the wrapper using catkin. I think the problem is there is something wrong in cmakelist.txt which I don't know how to edit.
CMakeLists.txt:
cmake_minimum_required(VERSION 2.8)
PROJECT( MyProject )
FIND_PACKAGE(RTABMap REQUIRED)
FIND_PACKAGE(OpenCV REQUIRED)
FIND_PACKAGE(PCL 1.7 REQUIRED)
# Find Qt5 first
FIND_PACKAGE(Qt5 COMPONENTS Widgets Core Gui Svg QUIET)
IF(NOT Qt5_FOUND)
FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui QtSvg)
ENDIF(NOT Qt5_FOUND)
# fix libproj.so not found on Xenial
if(NOT "${PCL_LIBRARIES}" STREQUAL "")
list(REMOVE_ITEM PCL_LIBRARIES "vtkproj4")
endif()
if(POLICY CMP0020)
cmake_policy(SET CMP0020 OLD)
endif()
# include directories
SET(INCLUDE_DIRS
${catkin_INCLUDE_DIRS}
${RTABMap_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
${PCL_INCLUDE_DIRS}
)
#IF(QT4_FOUND)
# INCLUDE(${QT_USE_FILE})
#ENDIF(QT4_FOUND)
INCLUDE_DIRECTORIES(${INCLUDE_DIRS} )
# libraries
SET(LIBRARIES
${catkin_LIBRARIES}
${RTABMap_LIBRARIES}
${OpenCV_LIBRARIES}
${QT_LIBRARIES}
${PCL_LIBRARIES}
)
#IF(QT4_FOUND)
# QT4_WRAP_CPP(moc_srcs MapBuilder.h)
#ELSE()
QT5_WRAP_CPP(moc_srcs MapBuilder.h)
#ENDIF()
ADD_EXECUTABLE(rgbd_mapping main.cpp ${moc_srcs})
TARGET_LINK_LIBRARIES(rgbd_mapping ${LIBRARIES})
Any help, please?
Thx for reading my problem.