diff --git a/test/gtest_feature_imu.cpp b/test/gtest_feature_imu.cpp index a1e4a6efbbebdeae11d96f52683ac267a4e74072..5cf83d7d0356f27033e1d79fd3169798cc5f2883 100644 --- a/test/gtest_feature_imu.cpp +++ b/test/gtest_feature_imu.cpp @@ -50,21 +50,15 @@ class FeatureImu_test : public testing::Test // Time and data variables TimeStamp t; - Eigen::Vector6d data_; + Eigen::Vector6d data_=Eigen::Vector6d::Zero(); t.set(0); // Set the origin VectorComposite x0("POV", {Vector3d::Zero(), Quaterniond::Identity().coeffs(), Vector3d::Zero()}); VectorComposite s0("POV", {Vector3d(1,1,1), Vector3d(1,1,1), Vector3d(1,1,1)}); - problem->setPriorOptions("factor", 0.01, x0, s0); - // initial dummy capture process for seting prior at t=0 - std::make_shared<CaptureImu>(t, - sensor_ptr, - data_, - Eigen::Matrix6d::Identity()*0.01, - Eigen::Vector6d::Zero())->process(); - origin_frame = problem->getTrajectory()->getFrameList().front(); + origin_frame = problem->setPriorFactor(x0, s0, t, 0.01); + processor_motion_ptr_->setOrigin(origin_frame); // Emplace one capture to store the Imu data arriving from (sensor / callback / file / etc.) // give the capture a big covariance, otherwise it will be so small that it won't pass following assertions