Skip to content
Snippets Groups Projects
Commit 79fb6e44 authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

Add a getter for diagonal covariance block

parent 002cd55d
No related branches found
No related tags found
No related merge requests found
...@@ -468,6 +468,11 @@ bool Problem::getCovarianceBlock(StateBlockPtr _state1, StateBlockPtr _state2, E ...@@ -468,6 +468,11 @@ bool Problem::getCovarianceBlock(StateBlockPtr _state1, StateBlockPtr _state2, E
return true; return true;
} }
bool Problem::getCovarianceBlock(StateBlockPtr _state, Eigen::MatrixXs& _cov, const int _row_and_col)
{
return getCovarianceBlock(_state, _state, _cov, _row_and_col, _row_and_col);
}
bool Problem::getFrameCovariance(FrameBasePtr _frame_ptr, Eigen::MatrixXs& _covariance) bool Problem::getFrameCovariance(FrameBasePtr _frame_ptr, Eigen::MatrixXs& _covariance)
{ {
// return getCovarianceBlock(_frame_ptr->getPPtr(), _frame_ptr->getPPtr(), _covariance, 0, 0 ) && // return getCovarianceBlock(_frame_ptr->getPPtr(), _frame_ptr->getPPtr(), _covariance, 0, 0 ) &&
......
...@@ -247,6 +247,7 @@ class Problem : public std::enable_shared_from_this<Problem> ...@@ -247,6 +247,7 @@ class Problem : public std::enable_shared_from_this<Problem>
void addCovarianceBlock(StateBlockPtr _state1, StateBlockPtr _state2, const Eigen::MatrixXs& _cov); void addCovarianceBlock(StateBlockPtr _state1, StateBlockPtr _state2, const Eigen::MatrixXs& _cov);
bool getCovarianceBlock(StateBlockPtr _state1, StateBlockPtr _state2, Eigen::MatrixXs& _cov, const int _row = 0, bool getCovarianceBlock(StateBlockPtr _state1, StateBlockPtr _state2, Eigen::MatrixXs& _cov, const int _row = 0,
const int _col=0); const int _col=0);
bool getCovarianceBlock(StateBlockPtr _state, Eigen::MatrixXs& _cov, const int _row_and_col = 0);
bool getFrameCovariance(FrameBasePtr _frame_ptr, Eigen::MatrixXs& _covariance); bool getFrameCovariance(FrameBasePtr _frame_ptr, Eigen::MatrixXs& _covariance);
Eigen::MatrixXs getFrameCovariance(FrameBasePtr _frame_ptr); Eigen::MatrixXs getFrameCovariance(FrameBasePtr _frame_ptr);
Eigen::MatrixXs getLastKeyFrameCovariance(); Eigen::MatrixXs getLastKeyFrameCovariance();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment