mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
Remove a CHECK failure from covariance_impl.cc
The CHECK was to see if SuiteSparseQR returns a non-null QR factorization. However this can cause problems in production, so its better to return false and let the user deal with the failure in factorization. Change-Id: I4e67f343e30547f4257d0315d507df9864c06dcc
This commit is contained in:
@@ -651,7 +651,12 @@ bool CovarianceImpl::ComputeCovarianceValuesUsingSuiteSparseQR() {
|
||||
&permutation,
|
||||
&cc);
|
||||
event_logger.AddEvent("Numeric Factorization");
|
||||
CHECK(R != nullptr);
|
||||
if (R == nullptr) {
|
||||
LOG(ERROR) << "Something is wrong. SuiteSparseQR returned R = nullptr.";
|
||||
free(permutation);
|
||||
cholmod_l_finish(&cc);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (rank < cholmod_jacobian.ncol) {
|
||||
LOG(ERROR) << "Jacobian matrix is rank deficient. "
|
||||
|
||||
Reference in New Issue
Block a user