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

Add (loose) asserts to pass tests

parent fb4d8183
No related branches found
No related tags found
2 merge requests!31devel->main,!30Complete UAV identification setup
......@@ -453,6 +453,11 @@ TEST_F(Test_SimulationProblemForceTorqueInertialDynamics_yaml, simulation_online
WOLF_INFO("Guess mass : ", mass_guess, " Kg.");
WOLF_INFO("Estimated mass : ", S->getStateBlock('m')->getState()(0), " Kg.");
WOLF_INFO("-----------------------------");
ASSERT_MATRIX_APPROX(bias_true , S->getStateBlock('I')->getState(), 0.11);
ASSERT_MATRIX_APPROX(cdm_true , S->getStateBlock('C')->getState(), 1e-3);
ASSERT_MATRIX_APPROX(inertia_true, S->getStateBlock('i')->getState(), 1e-2);
ASSERT_NEAR (mass_true , S->getStateBlock('m')->getState()(0), 2e-2);
}
TEST_F(Test_SimulationProblemForceTorqueInertialDynamics_yaml, simulation_batch)
......@@ -556,6 +561,11 @@ TEST_F(Test_SimulationProblemForceTorqueInertialDynamics_yaml, simulation_batch)
WOLF_INFO("Guess mass : ", mass_guess, " Kg.");
WOLF_INFO("Estimated mass : ", S->getStateBlock('m')->getState()(0), " Kg.");
WOLF_INFO("-----------------------------");
ASSERT_MATRIX_APPROX(bias_true , S->getStateBlock('I')->getState(), 0.21);
ASSERT_MATRIX_APPROX(cdm_true , S->getStateBlock('C')->getState(), 2e-3);
ASSERT_MATRIX_APPROX(inertia_true, S->getStateBlock('i')->getState(), 1e-2);
ASSERT_NEAR (mass_true , S->getStateBlock('m')->getState()(0), 3e-2);
}
int main(int argc, char** argv)
......
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