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 <typename MatrixType>
class LinearSolverEigen: public LinearSolver<MatrixType>
{
  public:
    typedef Eigen::SparseMatrix<double, Eigen::ColMajor> SparseMatrix;
    typedef Eigen::Triplet<double> Triplet;
    typedef Eigen::PermutationMatrix<Eigen::Dynamic, Eigen::Dynamic, SparseMatrix::Index> PermutationMatrix;

改为

template <typename MatrixType>
class LinearSolverEigen: public LinearSolver<MatrixType>
{
  public:
    typedef Eigen::SparseMatrix<double, Eigen::ColMajor> SparseMatrix;
    typedef Eigen::Triplet<double> Triplet;
    typedef Eigen::PermutationMatrix<Eigen::Dynamic, Eigen::Dynamic, int> 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<float>::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::Blob<Dtype>*>& caffe::Net<Dtype>::Forward(const std::vector<caffe::Blob<Dtype>*>&, Dtype*) [with Dtype = float]
   const vector<Blob<Dtype>*>& Forward(const vector<Blob<Dtype>* > & 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<Dtype>::Forward(const string&, Dtype*) [with Dtype = float; std::__cxx11::string = std::__cxx11::basic_string<char>]
   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<Dtype>::shape_string() const [with Dtype = float; std::__cxx11::string = std::__cxx11::basic_string<char>]’:
/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<Dtype>::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<Dtype>::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<Dtype>::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<Dtype>::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

 

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值