Skip to content

Commit

Permalink
change GN threshold to 1e-3, use GN in LocalBA
Browse files Browse the repository at this point in the history
  • Loading branch information
jingpang committed May 28, 2017
1 parent 4e9e05d commit e32dcb9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ namespace g2o {
_optimizer->computeActiveErrors();
double afterChi2 = _optimizer->activeRobustChi2();

if(fabs(preChi2 - afterChi2)<1e-6)
if(fabs(preChi2 - afterChi2)<1e-3/*1e-6*/)
return Terminate;
// END ADD

Expand Down
4 changes: 2 additions & 2 deletions src/Optimizer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ void Optimizer::LocalBAPRVIDP(KeyFrame *pCurKF, const std::list<KeyFrame*> &lLoc

g2o::BlockSolverX * solver_ptr = new g2o::BlockSolverX(linearSolver);

//g2o::OptimizationAlgorithmGaussNewton* solver = new g2o::OptimizationAlgorithmGaussNewton(solver_ptr);
g2o::OptimizationAlgorithmLevenberg* solver = new g2o::OptimizationAlgorithmLevenberg(solver_ptr);
g2o::OptimizationAlgorithmGaussNewton* solver = new g2o::OptimizationAlgorithmGaussNewton(solver_ptr);
//g2o::OptimizationAlgorithmLevenberg* solver = new g2o::OptimizationAlgorithmLevenberg(solver_ptr);
optimizer.setAlgorithm(solver);
//optimizer.setVerbose(true);
if(pbStopFlag)
Expand Down

0 comments on commit e32dcb9

Please sign in to comment.