DS-SLAM

一、

/usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h:745:3: error: static assertion failed:YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY
  EIGEN_CHECK_BINARY_COMPATIBILIY(Func,typename ActualDstTypeCleaned::Scalar,typename Src::Scalar);

问题原因:Eigen3的bug

解决方法:打开Thirdparty/g2o/g2o/solvers/linear_solver_eigen.h,将以下代码

template 
class LinearSolverEigen: public LinearSolver
{
  public:
    typedef Eigen::SparseMatrix SparseMatrix;
    typedef Eigen::Triplet Triplet;
    typedef Eigen::PermutationMatrix PermutationMatrix;

改为

template 
class LinearSolverEigen: public LinearSolver
{
  public:
    typedef Eigen::SparseMatrix SparseMatrix;
    typedef Eigen::Triplet Triplet;
    typedef Eigen::PermutationMatrix PermutationMatrix;
    /**

 

二、

找不到catkin的包,catkin_make和catkin_init_workspace 等命令都使用不了,

sudo aptitude install catkin

 

解决方案,重新安装catkin

三、caffe/blob.hpp:9:34: fatal error: caffe/proto/caffe.pb.h: 没有那个文件或目录

# In the directory you installed Caffe to
protoc src/caffe/proto/caffe.proto --cpp_out=.
mkdir include/caffe/proto
mv src/caffe/proto/caffe.pb.h include/caffe/proto

四、

caffe/util/io.hpp:8:18: fatal error: hdf5.h: No such file or directory

Makefile.config文件的第85行,添加/usr/include/hdf5/serial/INCLUDE_DIRS,也就是把下面第一行代码改为第二行代码。

INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial/ and
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu/hdf5/serial/

 如果都不行,则

#include "hdf5.h" 修改为 #include "hdf5/serial/hdf5.h"

5. 

/home/xh/dev/catkin_ws/src/DS-SLAM/Examples/ROS/ORB_SLAM2_PointMap_SegNetM/libsegmentation/libsegmentation.cpp:68:19: error: no matching function for call to ‘caffe::Net::Forward()’
     net_->Forward();
                   ^
In file included from /home/xh/dev/catkin_ws/src/DS-SLAM/Examples/ROS/ORB_SLAM2_PointMap_SegNetM/libsegmentation/../caffe-segnet/include/caffe/caffe.hpp:12:0,
                 from /home/xh/dev/catkin_ws/src/DS-SLAM/Examples/ROS/ORB_SLAM2_PointMap_SegNetM/libsegmentation/libsegmentation.hpp:37,
                 from /home/xh/dev/catkin_ws/src/DS-SLAM/Examples/ROS/ORB_SLAM2_PointMap_SegNetM/libsegmentation/libsegmentation.cpp:34:
/home/xh/dev/catkin_ws/src/DS-SLAM/Examples/ROS/ORB_SLAM2_PointMap_SegNetM/libsegmentation/../caffe-segnet/include/caffe/net.hpp:52:31: note: candidate: const std::vector*>& caffe::Net::Forward(const std::vector*>&, Dtype*) [with Dtype = float]
   const vector*>& Forward(const vector* > & bottom,
                               ^
/home/xh/dev/catkin_ws/src/DS-SLAM/Examples/ROS/ORB_SLAM2_PointMap_SegNetM/libsegmentation/../caffe-segnet/include/caffe/net.hpp:52:31: note:   candidate expects 2 arguments, 0 provided
/home/xh/dev/catkin_ws/src/DS-SLAM/Examples/ROS/ORB_SLAM2_PointMap_SegNetM/libsegmentation/../caffe-segnet/include/caffe/net.hpp:58:10: note: candidate: std::__cxx11::string caffe::Net::Forward(const string&, Dtype*) [with Dtype = float; std::__cxx11::string = std::__cxx11::basic_string]
   string Forward(const string& input_blob_protos, Dtype* loss = NULL);
          ^
/home/xh/dev/catkin_ws/src/DS-SLAM/Examples/ROS/ORB_SLAM2_PointMap_SegNetM/libsegmentation/../caffe-segnet/include/caffe/net.hpp:58:10: note:   candidate expects 2 arguments, 0 provided
In file included from /home/xh/dev/catkin_ws/src/DS-SLAM/Examples/ROS/ORB_SLAM2_PointMap_SegNetM/libsegmentation/../caffe-segnet/include/caffe/caffe.hpp:7:0,
                 from /home/xh/dev/catkin_ws/src/DS-SLAM/Examples/ROS/ORB_SLAM2_PointMap_SegNetM/libsegmentation/libsegmentation.hpp:37,
                 from /home/xh/dev/catkin_ws/src/DS-SLAM/Examples/ROS/ORB_SLAM2_PointMap_SegNetM/libsegmentation/libsegmentation.cpp:34:
/home/xh/dev/catkin_ws/src/DS-SLAM/Examples/ROS/ORB_SLAM2_PointMap_SegNetM/libsegmentation/../caffe-segnet/include/caffe/blob.hpp: In instantiation of ‘std::__cxx11::string caffe::Blob::shape_string() const [with Dtype = float; std::__cxx11::string = std::__cxx11::basic_string]’:
/home/xh/dev/catkin_ws/src/DS-SLAM/Examples/ROS/ORB_SLAM2_PointMap_SegNetM/libsegmentation/../caffe-segnet/include/caffe/blob.hpp:122:49:   required from ‘int caffe::Blob::CanonicalAxisIndex(int) const [with Dtype = float]’
/home/xh/dev/catkin_ws/src/DS-SLAM/Examples/ROS/ORB_SLAM2_PointMap_SegNetM/libsegmentation/../caffe-segnet/include/caffe/blob.hpp:73:37:   required from ‘int caffe::Blob::shape(int) const [with Dtype = float]’
/home/xh/dev/catkin_ws/src/DS-SLAM/Examples/ROS/ORB_SLAM2_PointMap_SegNetM/libsegmentation/../caffe-segnet/include/caffe/blob.hpp:151:17:   required from ‘int caffe::Blob::LegacyShape(int) const [with Dtype = float]’
/home/xh/dev/catkin_ws/src/DS-SLAM/Examples/ROS/ORB_SLAM2_PointMap_SegNetM/libsegmentation/../caffe-segnet/include/caffe/blob.hpp:135:51:   required from ‘int caffe::Blob::channels() const [with Dtype = float]’
/home/xh/dev/catkin_ws/src/DS-SLAM/Examples/ROS/ORB_SLAM2_PointMap_SegNetM/libsegmentation/libsegmentation.cpp:48:43:   required from here
/home/xh/dev/catkin_ws/src/DS-SLAM/Examples/ROS/ORB_SLAM2_PointMap_SegNetM/libsegmentation/../caffe-segnet/include/caffe/blob.hpp:57:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int i = 0; i < shape_.size(); ++i) {
                       ^
CMakeFiles/segmentation.dir/build.make:62: recipe for target 'CMakeFiles/segmentation.dir/libsegmentation.cpp.o' failed
make[2]: *** [CMakeFiles/segmentation.dir/libsegmentation.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/segmentation.dir/all' failed
make[1]: *** [CMakeFiles/segmentation.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

 add ("void Forward(); ") to caffe-segnet/include/caffe/net.hpp   inline 59;(错误,因为自己用的caffe-segnet,而作者使用caffe-segnet-cudnn5,文件里面涉及的语句,定义不同)

 

/usr/bin/ld: warning: libopencv_imgproc.so.3.4, needed by /usr/lib/libopencv_imgcodecs.so, may conflict with libopencv_imgproc.so.2.4
/usr/bin/ld: warning: libopencv_core.so.3.4, needed by /usr/lib/libopencv_imgcodecs.so, may conflict with libopencv_core.so.2.4

 

你可能感兴趣的:(DS-SLAM)