Re: RTABmap compiled with OpenCV (CUDA compiled)

Posted by andreacelani on
URL: http://official-rtab-map-forum.206.s1.nabble.com/RTABmap-compiled-with-OpenCV-CUDA-compiled-tp3496p3498.html

ok, I installed again CUDA 8.0 and I compiled OpenCV 2.4.8 with CUDA and wituout OPENCL (WITH_OpenCL=OFF):

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON -D ENABLE_FAST_MATH=1 -D CUDA_FAST_MATH=1 -D WITH_CUBLAS=1 -D CUDA_GENERATION=Kepler -D WITH_OPENCL=OFF ..

I set rtabmap to work with GPU SIFT:

<param name="Kp/DetectorStrategy"          type="string" value="0"/>  <!--[0=SURF 1=SIFT 2=ORB 3=FAST/FREAK 4=FAST/BRIEF 5=GFTT/FREAK 6=GFTT/BRIEF 7=BRISK 8=GFTT/ORB.]-->
	  <param name="SURF/Extended"                type="bool" value="false"/>  <!--[Extended descriptor flag (true - use extended 128-element descriptors; false - use 64-element descriptors).]-->
	  <param name="SURF/GpuKeypointsRatio"       type="double" value="0.01"/>  <!--[Used with SURF GPU.]-->
	  <param name="SURF/GpuVersion"              type="bool" value="false"/>  <!--[GPU-SURF: Use GPU version of SURF. This option is enabled only if OpenCV is built with CUDA and GPUs are detected.]-->
	  <param name="SURF/HessianThreshold"        type="int" value="500"/>  <!--[Threshold for hessian keypoint detector used in SURF.]-->
	  <param name="SURF/OctaveLayers"            type="int" value="2"/>  <!--[Number of octave layers within each octave.]-->
	  <param name="SURF/Octaves"                 type="int" value="4"/>  <!--[Number of pyramid octaves the keypoint detector will use.]-->
	  <param name="SURF/Upright"                 type="bool" value="false"/>  <!--[Up-right or rotated features flag (true - do not compute orientation of features; false - compute orientation).]-->
	  <param name="Vis/FeatureType"              type="int" value="6"/>  <!--[0=SURF 1=SIFT 2=ORB 3=FAST/FREAK 4=FAST/BRIEF 5=GFTT/FREAK 6=GFTT/BRIEF 7=BRISK 8=GFTT/ORB.]-->

Now the R200 works fine and camera nodelet manager works fine as well.
But the PCL manager dies with the following error:
terminate called after throwing an instance of 'UException'
  what():  [FATAL] (2017-07-22 17:17:51.623) util3d_filtering.cpp:145::voxelize() Condition ((cloud->is_dense && cloud->size()) || (!cloud->is_dense && indices->size())) not met!

I'll try changing parameters compilation of OpenCV 2.4.8. I hope to find a setting (without OpenGL or something else) that fix the error as per camera nodelet manager happened.

Any suggestion is welcome