40template <
int p,
int l,
bool blockorder>
41std::unique_ptr<BlockSolverBase> AllocateSolver() {
42 G2O_DEBUG(
"Using 2dlinear poseDim {} landMarkDim {} blockordering {}", p, l,
44 auto linearSolver = std::make_unique<
45 LinearSolverEigen<typename BlockSolverPL<p, l>::PoseMatrixType>>();
46 linearSolver->setBlockOrdering(blockorder);
47 return std::make_unique<BlockSolverPL<p, l>>(std::move(linearSolver));
55 if (fullSolverName !=
"2dlinear")
return nullptr;
75 "Solve Orientation + Gauss-Newton: Works only on 2D pose graphs!!",
76 "Eigen",
false, 3, 3)));
base for allocating an optimization algorithm
const OptimizationAlgorithmProperty & property() const
return the properties of the solver
Generic interface for a non-linear solver operating on a graph.
SLAM2DLinearSolverCreator(const OptimizationAlgorithmProperty &p)
virtual OptimizationAlgorithm * construct()
allocate a solver operating on optimizer, re-implement for your creator
Implementation of a linear approximation for 2D pose graph SLAM.
static OptimizationAlgorithm * createSolver(const std::string &solverName)
#define G2O_REGISTER_OPTIMIZATION_LIBRARY(libraryname)
#define G2O_REGISTER_OPTIMIZATION_ALGORITHM(optimizername, instance)
describe the properties of a solver