Skip to content
Snippets Groups Projects
Commit 8ba0a274 authored by Joan Vallvé Navarro's avatar Joan Vallvé Navarro
Browse files

bug of eigen .asDiagonal() and gtest assert

parent 5b6c57ef
No related branches found
No related tags found
1 merge request!448Draft: Resolve "Implementation of new nodes creation"
Pipeline #14497 passed
...@@ -183,8 +183,8 @@ TEST(Problem, SetOrigin_PO_2d) ...@@ -183,8 +183,8 @@ TEST(Problem, SetOrigin_PO_2d)
ASSERT_FALSE(fac->getFeatureOther()); ASSERT_FALSE(fac->getFeatureOther());
} }
auto x0_vector = prior.getVectorComposite().vector("PO"); auto x0_vector = prior.getVectorComposite().vector("PO");
auto P0_p = prior.at('P').getNoiseStd().cwiseAbs2().asDiagonal(); MatrixXd P0_p = prior.at('P').getNoiseStd().cwiseAbs2().asDiagonal();
auto P0_o = prior.at('O').getNoiseStd().cwiseAbs2().asDiagonal(); MatrixXd P0_o = prior.at('O').getNoiseStd().cwiseAbs2().asDiagonal();
// check that the Feature measurement and covariance are the ones provided // check that the Feature measurement and covariance are the ones provided
ASSERT_MATRIX_APPROX(x0_vector.head<2>(), fp->getMeasurement(), Constants::EPS_SMALL ); ASSERT_MATRIX_APPROX(x0_vector.head<2>(), fp->getMeasurement(), Constants::EPS_SMALL );
...@@ -247,8 +247,8 @@ TEST(Problem, SetOrigin_PO_3d) ...@@ -247,8 +247,8 @@ TEST(Problem, SetOrigin_PO_3d)
} }
auto x0_vector = prior.getVectorComposite().vector("PO"); auto x0_vector = prior.getVectorComposite().vector("PO");
auto P0_p = prior.at('P').getNoiseStd().cwiseAbs2().asDiagonal(); MatrixXd P0_p = prior.at('P').getNoiseStd().cwiseAbs2().asDiagonal();
auto P0_o = prior.at('O').getNoiseStd().cwiseAbs2().asDiagonal(); MatrixXd P0_o = prior.at('O').getNoiseStd().cwiseAbs2().asDiagonal();
// check that the Feature measurement and covariance are the ones provided // check that the Feature measurement and covariance are the ones provided
ASSERT_MATRIX_APPROX(x0_vector.head<3>(), fp->getMeasurement(), Constants::EPS_SMALL ); ASSERT_MATRIX_APPROX(x0_vector.head<3>(), fp->getMeasurement(), Constants::EPS_SMALL );
......
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