Fix bug that could disconnect graph

release/4.3a0
Frank Dellaert 2015-06-11 13:22:26 -07:00
parent 75818c620d
commit 635a2a0792
1 changed files with 3 additions and 1 deletions

View File

@ -196,8 +196,10 @@ namespace gtsam {
Point2 reprojError(camera.project2(point, H1, H2) - measured());
b = -reprojError.vector();
} catch (CheiralityException& e) {
H1.setZero();
H2.setZero();
b.setZero();
// TODO warn if verbose output asked for
return boost::make_shared<JacobianFactor>();
}
// Whiten the system if needed