RESLAM/ REVO 编译 实时RGBD基于边缘的slam系统

首先了解到了RESLAM:  https://github.com/fabianschenk/RESLAM

RESLAM在make过程中出现:

/RESLAM/Relocaliser/ceresloopcloser.cpp: In member function ‘void RESLAM::CeresLoopCloser::BuildOptimizationProblem(RESLAM::CeresPoseVector&, const RelPoseConstraints&, ceres::Problem*)’:
/home/lincent/slam_sota/RESLAM/Relocaliser/ceresloopcloser.cpp:54:82: error: ‘EigenQuaternionParameterization’ in namespace ‘ceres’ does not name a type
 terization* quaternion_local_parameterization = new ceres::EigenQuater
                                                            ^
CMakeFiles/RESLAM.dir/build.make:302: recipe for target 'CMakeFiles/RESLAM.dir/Relocaliser/ceresloopcloser.cpp.o' failed
make[2]: *** [CMakeFiles/RESLAM.dir/Relocaliser/ceresloopcloser.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/RESLAM.dir/all' failed
make[1]: *** [CMakeFiles/RESLAM.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

查看readme的要求:

### Requirements
* [Ubuntu 16.04, 15.10, 17.04](https://www.ubuntu.com/)
* [OpenCV > 3](http://opencv.org/)
* [Eigen > 3.3](http://eigen.tuxfamily.org/index.php?title=Main_Page)
* [Ceres >= 1.13](http://ceres-solver.org/installation.html

发现自己之前装的eigen版本和ceres版本如下:

Found Ceres version: 1.12.0 installed in: /usr/local with components:
-- Found required Ceres dependency: Eigen version 3.2.92 in /usr/include/eigen3


唉于是放弃,

转向readme提到的REVO: https://github.com/fabianschenk/REVO

是一个re的视觉里程计版本。

下载revo

按照readme make 准备ceres、eigen、pangolin即可, 我不需要用 一些实时模块,于是在cmakelist中:

OPTION(WITH_REALSENSE "Build with RealSense Sensor?" OFF)

OPTION(WITH_ORBBEC_ASTRA_PRO "Build with Orbbec support?" OFF)
OPTION(WITH_ORBBEC_FFMPEG "Use FFMPEG for ORBBEC Astra Pro (recommended)" OFF)
OPTION(WITH_ORBBEC_UVC "Use LibUVC for ORBBEC Astra Pro (not recommended)" OFF)
OPTION(WITH_ORBBEC_OPENNI "Use OpenNI for ORBBEC Astra (NOTE: This is for the non-pro version!!)" OFF)
 

出现问题:

make[2]: *** No rule to make target '/usr/local/lib/libtiff.so', needed by 'REVO'。 停止。
参考:

make[2]: No rule to make target 'xxx/xx.so'解决思路:

https://stackoverflow.com/questions/14347334/no-rule-to-make-target-usr-lib-somelib-so

https://blog.csdn.net/AmbitiousRuralDog/article/details/81537280

首先 locate libtiff.so 

得到在/usr/lib/x86_64-linux-gnu/libtiff.so

执行 cp  /usr/lib/x86_64-linux-gnu/libtiff.so  /usr/local/lib/

问题:

CMakeFiles/REVO.dir/gui/MapDrawer.cc.o:在函数‘cv::Mat::Mat(int, int, int, void*, unsigned long)’中:
/usr/local/include/opencv2/core/mat.inl.hpp:599:对‘cv::Mat::updateContinuityFlag()’未定义的引用
按照:https://blog.csdn.net/lgh0824/article/details/81531692

cmakelists选择opencv3.4.4进行编译

find_package(OpenCV 3.4.4 REQUIRED opencv_core opencv_videoio opencv_imgcodecs opencv_imgproc opencv_calib3d opencv_highgui)

最后make成功

修改config/dataset_tum1.yaml中的数据集位置:

#dataset
MainFolder:"/data2/CSI/CSI_SVN/KirasCSISmartCam3D/CSISmartScan3D_Daten/Daten_Testszenen/TUM/freiburg1/"
Datasets: "rgbd_dataset_freiburg2_pioneer_360"
ASSOCIATE: "associate.txt"

然后运行

./REVO ../config/revo_settings.yaml ../config/dataset_tum1.yaml