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

Add test emplace

parent 18bc9298
No related branches found
No related tags found
4 merge requests!31devel->main,!29Add functionality for UAV,!27Fix test with acc_x = 2 m/s2,!12Draft: Resolve "Add functionality for aerial vehicles"
......@@ -106,6 +106,21 @@ TEST_F(Test_FactorForceTorqueInertialPreint, constructor)
FactorForceTorqueInertial f(feature, capture_origin, processor, false);
WOLF_INFO("f id: ", f.id());
ASSERT_EQ(f.getCaptureOther(), capture_origin);
}
TEST_F(Test_FactorForceTorqueInertialPreint, emplace)
{
feature = FeatureMotion::emplace<FeatureMotion>(capture_last, "FeatureFTI", VectorXd(19),
MatrixXd::Identity(18, 18), VectorXd(6), MatrixXd(18, 6));
factor = FactorBase::emplace<FactorForceTorqueInertial>(feature, feature, capture_origin, processor, false);
// this ^^^ will create a warning "ADDING FACTOR id TO FEATURE id THAT IS NOT CONNECTED WITH PROBLEM."
problem->print(4, 1, 1, 1); // feature and factor not in the tree since they belong to last_ptr with no KF.
ASSERT_EQ(factor->getCaptureOther(), capture_origin);
ASSERT_EQ(factor->getCapture(), capture_last);
}
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