Don't attempt any damping if no key found in diagonal

release/4.3a0
dellaert 2014-03-05 23:25:15 -05:00
parent 0897e04c37
commit bb3820780d
1 changed files with 2 additions and 1 deletions

View File

@ -145,7 +145,8 @@ GaussianFactorGraph LevenbergMarquardtOptimizer::buildDampedSystem(
try {
A.diagonal() = state_.hessianDiagonal.at(key_value.key);
} catch (std::exception e) {
// Don't attempt diagonal damping if no key given
// Don't attempt any damping if no key found in diagonal
continue;
}
Vector b = Vector::Zero(dim);
SharedDiagonal model = noiseModel::Isotropic::Sigma(dim, sigma);