Skip to content
Snippets Groups Projects
Commit 9addeae4 authored by Mederic Fourmy's avatar Mederic Fourmy
Browse files

Missed getSize()

parent f7ad343a
No related branches found
No related tags found
1 merge request!269Feature/covariances
Pipeline #2847 failed
...@@ -562,7 +562,7 @@ bool Problem::getFrameCovariance(FrameBaseConstPtr _frame_ptr, Eigen::MatrixXs& ...@@ -562,7 +562,7 @@ bool Problem::getFrameCovariance(FrameBaseConstPtr _frame_ptr, Eigen::MatrixXs&
SizeEigen sz = 0; SizeEigen sz = 0;
for (const auto& sb : state_bloc_vec) for (const auto& sb : state_bloc_vec)
if (sb) if (sb)
sz += sb->getSize(); sz += sb->getLocalSize();
// resizing // resizing
_covariance = Eigen::MatrixXs(sz, sz); _covariance = Eigen::MatrixXs(sz, sz);
...@@ -578,10 +578,10 @@ bool Problem::getFrameCovariance(FrameBaseConstPtr _frame_ptr, Eigen::MatrixXs& ...@@ -578,10 +578,10 @@ bool Problem::getFrameCovariance(FrameBaseConstPtr _frame_ptr, Eigen::MatrixXs&
if (sb_j) if (sb_j)
{ {
success = success && getCovarianceBlock(sb_i, sb_j, _covariance, i, j); success = success && getCovarianceBlock(sb_i, sb_j, _covariance, i, j);
j += sb_j->getSize(); j += sb_j->getLocalSize();
} }
} }
i += sb_i->getSize(); i += sb_i->getLocalSize();
} }
} }
return success; return success;
...@@ -604,7 +604,7 @@ bool Problem::getLandmarkCovariance(LandmarkBaseConstPtr _landmark_ptr, Eigen::M ...@@ -604,7 +604,7 @@ bool Problem::getLandmarkCovariance(LandmarkBaseConstPtr _landmark_ptr, Eigen::M
SizeEigen sz = 0; SizeEigen sz = 0;
for (const auto& sb : state_bloc_vec) for (const auto& sb : state_bloc_vec)
if (sb) if (sb)
sz += sb->getSize(); sz += sb->getLocalSize();
// resizing // resizing
_covariance = Eigen::MatrixXs(sz, sz); _covariance = Eigen::MatrixXs(sz, sz);
...@@ -621,10 +621,10 @@ bool Problem::getLandmarkCovariance(LandmarkBaseConstPtr _landmark_ptr, Eigen::M ...@@ -621,10 +621,10 @@ bool Problem::getLandmarkCovariance(LandmarkBaseConstPtr _landmark_ptr, Eigen::M
if (sb_j) if (sb_j)
{ {
success = success && getCovarianceBlock(sb_i, sb_j, _covariance, i, j); success = success && getCovarianceBlock(sb_i, sb_j, _covariance, i, j);
j += sb_j->getSize(); j += sb_j->getLocalSize();
} }
} }
i += sb_i->getSize(); i += sb_i->getLocalSize();
} }
} }
return success; return success;
......
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