mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 17:40:23 +08:00
Parameters: updated default of Icp/CorrespondenceRatio and Icp/PMOutlierRatio. Fixed OptimizerG2O build with ORB_SLAM2. Fixed seg fault after restarting ORB_SLAM2 odometry.
This commit is contained in:
@@ -296,7 +296,7 @@ protected:
|
||||
// FIXME: Memory leak: ORB_SLAM2 doesn't delete after removing from the map...
|
||||
// Not sure when it is safe to delete it, as if I delete just
|
||||
// after setting the bad flag, the app crashes.
|
||||
iter->second->SetBadFlag();
|
||||
iter->second->SetErase();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -790,7 +790,7 @@ std::map<int, Transform> OptimizerG2O::optimizeBA(
|
||||
{
|
||||
g2o::SparseOptimizer optimizer;
|
||||
optimizer.setVerbose(ULogger::level()==ULogger::kDebug);
|
||||
#ifdef RTABMAP_G2O_CPP11
|
||||
#if defined(RTABMAP_G2O_CPP11) and not defined(RTABMAP_ORB_SLAM2)
|
||||
std::unique_ptr<g2o::BlockSolver_6_3::LinearSolverType> linearSolver;
|
||||
#else
|
||||
g2o::BlockSolver_6_3::LinearSolverType * linearSolver = 0;
|
||||
@@ -854,7 +854,7 @@ std::map<int, Transform> OptimizerG2O::optimizeBA(
|
||||
else
|
||||
#endif
|
||||
{
|
||||
#ifdef RTABMAP_G2O_CPP11
|
||||
#if defined(RTABMAP_G2O_CPP11) and not defined(RTABMAP_ORB_SLAM2)
|
||||
optimizer.setAlgorithm(new g2o::OptimizationAlgorithmLevenberg(
|
||||
g2o::make_unique<g2o::BlockSolver_6_3>(std::move(linearSolver))));
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user