mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-08 02:57:46 +08:00
GTSAM: return empty optimized poses in case of exception or error. g2o: don't assert on marginal not computed, log error and reutn empty optimized poses.
This commit is contained in:
@@ -714,16 +714,19 @@ std::map<int, Transform> OptimizerGTSAM::optimize(
|
||||
}
|
||||
else
|
||||
{
|
||||
UWARN("GTSAM: Could not compute marginal covariance!");
|
||||
UERROR("GTSAM: Could not compute marginal covariance!");
|
||||
optimizedPoses.clear(); // Failed optimization
|
||||
}
|
||||
}
|
||||
catch(gtsam::IndeterminantLinearSystemException & e)
|
||||
{
|
||||
UWARN("GTSAM exception caught: %s", e.what());
|
||||
UERROR("GTSAM exception caught: %s", e.what());
|
||||
optimizedPoses.clear(); // Failed optimization
|
||||
}
|
||||
catch(std::exception& e)
|
||||
{
|
||||
UWARN("GTSAM exception caught: %s", e.what());
|
||||
UERROR("GTSAM exception caught: %s", e.what());
|
||||
optimizedPoses.clear(); // Failed optimization
|
||||
}
|
||||
|
||||
delete optimizer;
|
||||
|
||||
Reference in New Issue
Block a user