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 PermutationMatrix;

改为:

typedef Eigen::PermutationMatrix PermutationMatrix;

3.

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

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)