2019-10-07

1

修改g2o/types/slam2d/edge_se2_pointxy_bearing.cpp

t.setRotation(t.rotation().angle()+_measurement);

改为:

t.setRotation((Eigen::Rotation2Dd)(t.rotation().angle()+_measurement));

2忘了截图了,错误提示:

static assertion failed: YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY
修改g2o/solvers/eigen/linear_solver_eigen.h

typedef Eigen::PermutationMatrix<Eigen::Dynamic, Eigen::Dynamic, SparseMatrix::Index> PermutationMatrix;

改为:

typedef Eigen::PermutationMatrix<Eigen::Dynamic, Eigen::Dynamic, SparseMatrix::StorageIndex> PermutationMatrix;

3.

处理方法:
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

g2o/g2o/examples/tutorial_slam2d/simulator.cpp:78的代码

    for (int i = 0; i < probLimits.size(); ++i)          
      probLimits[i] = (i + 1) / (double) MO_NUM_ELEMS;

修改成:

      VectorXd probLimits;
        probLimits.resize(MO_NUM_ELEMS);
        for (int i = 0; i < probLimits.size(); ++i)
          probLimits[i] = (i + 1) / (double) MO_NUM_ELEMS;
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • CeresDB学习(一)-----官网文库 一、为什么选择使用CeresDB? 1、Code Quality(代码...
    d1ef0d9c2cc8阅读 898评论 0 0
  • 国庆当天,在朋友圈发了录的古筝弹奏《我的祖国》小视频。录的当天已经是练习的第二天了,部分还是记得不清楚。录完反复听...
    Amy娴阅读 147评论 0 0
  • 莫愁前路无知己 几天的郑州之行匆匆结束,离开济南时天气晴朗,归来时已白雪皑皑。几日如隔世,天涯海角,与“心”相伴,...
    清心_033d阅读 321评论 1 3
  • 三年研究生的学习生活,让我明白一件事情,那就是,我不适合搞科研。 也是,花如此宝贵的三年,明白一件事情,也是挺好的...
    e066874a225c阅读 193评论 0 1
  • 摘一枝阔大的荷叶 顶在头上 遮挡假疫苗的毒太阳 装一瓶清冽的山泉 灌下喉咙 润湿干嚎的呐喊 捧半边甘寒的西瓜 搁在...
    比秋乡阅读 614评论 8 16