From 5ae9ba2997d2a53066629ec677afa129e293d241 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joan=20Vallv=C3=A9=20Navarro?= <jvallve@iri.upc.edu>
Date: Wed, 17 Jun 2020 12:09:43 +0200
Subject: [PATCH] hotfix: gtest fixed!

---
 test/gtest_feature_imu.cpp | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/test/gtest_feature_imu.cpp b/test/gtest_feature_imu.cpp
index a1e4a6efb..5cf83d7d0 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
-- 
GitLab