Un-initialized Eigen matrix (frame covariance)
When calling the function Eigen::MatrixXs Problem::getFrameCovariance(FrameBasePtr _frame_ptr)
(problem.cpp l.506), the returned Eigen matrix may not be initialized if the function ceres::Solver::Summary CeresManager::solve()
has not been called before.
Not sure if it is an intended behavior but it implies synchronization issues between the calls of the two aforementioned functions that is not easily/clearly 'checkable'.
Propositions:
- Initialize the frame covariance matrix w.r.t the main odometer integrated covariance.
- A clear statement that the frame has been optimized hence its covariance matrix is initialized. E.g.
frame_ptr->hasBeenOptimizedOnce()
returns a bool, and/orframe_ptr->optimizationCounter()
returns anint
incremented every times the frame goes through the solver.