typedef g2o::BlockSolver< g2o::BlockSolverTraits<,> > Block; // pose 维度为 6, landmark 维度为 3
Block::LinearSolverType* linearSolver = new g2o::LinearSolverCSparse
Block* solver_ptr = new Block( std::unique_ptr
g2o::OptimizationAlgorithmLevenberg* solver = new g2o::OptimizationAlgorithmLevenberg(std::unique_ptr
g2o::SparseOptimizer optimizer;
optimizer.setAlgorithm ( solver );
optimizer.setVerbose( true );
typedef g2o::BlockSolver< g2o::BlockSolverTraits<,> > Block; // pose维度为 6, landmark 维度为 3
Block::LinearSolverType\* linearSolver = new g2o::LinearSolverEigen<Block::PoseMatrixType>(); // 线性方程求解器
Block\* solver\_ptr = new Block( **std::unique\_ptr<Block::LinearSolverType>(linearSolver)** ); // 矩阵块求解器
g2o::OptimizationAlgorithmGaussNewton\* solver = new g2o::OptimizationAlgorithmGaussNewton( **std::unique\_ptr<Block::LinearSolverType>****(linearSolver)** );
g2o::SparseOptimizer optimizer;
optimizer.setAlgorithm( solver );
手机扫一扫
移动阅读更方便
你可能感兴趣的文章