美文网首页
2019-10-07

2019-10-07

作者: liampayne_66d0 | 来源:发表于2019-10-12 21:45 被阅读0次

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;

相关文章

  • 2019-10-07

    2019-10-07 20:18:34.331543+0800 KaBuKaBu[3237:2535020] <_...

  • 有阳光的被子才有灵魂

    2019-10-07 星期一 天气晴 有阳光的被子才...

  • 2019-10-08

    2019-10-08 宗明3 字数 254 · 阅读 0 2019-10-07 21:55 2019-10-08 ...

  • 2019-10-07

    2019-10-06 宗明3 字数 940 · 阅读 5 2019-10-06 18:38 2019-10-07 ...

  • 第二天

    2019-10-07:了解下梯度下降法(原本想着一天搞定一点内容)、如何学习、学习方法

  • 和风计较

    2019-10-07 阴 北京·西城 鼓楼大街 我不是很懂生命的意义,但是最起码自己看得起自己,自己尊重自己。可能...

  • 感恩的力量

    2019-10-07 清晨睡意朦胧中,只听见窗外急急的雨声敲打着玻璃!我今天休息,可以很好的享受“懒床”“胡思乱想...

  • 2019-10-07

    2019-10-07 姓名:乐美清 公司:宁波华光 《六项精进》第340期 反省二组学员;515期, 反省二组志工...

  • 培训课记录---世界艺术史(一)

    2019-10-07 下午 世界艺术史(宋津津) 老师上课先以游戏引入艺术 游戏就是拍手,每四拍为一节,一...

  • 各自孤独

    白:2019-10-07 01:30 "涛,我今天碰上一件怪事。快烦死我了。" 那天是2019年10月7日,饼摊...

网友评论

      本文标题:2019-10-07

      本文链接:https://www.haomeiwen.com/subject/tpnmpctx.html