From 17051ffe8022f9887673a61fb3f51fd24838fb44 Mon Sep 17 00:00:00 2001
From: jcasals <jcasals@iri.upc.edu>
Date: Thu, 11 Jun 2020 14:28:31 +0200
Subject: [PATCH] Fix emplaceKeyFrame

---
 demos/mcapi_povcdl_estimation.cpp              | 2 +-
 test/gtest_factor_force_torque.cpp             | 2 +-
 test/gtest_feature_force_torque_preint_WIP.cpp | 2 +-
 test/gtest_processor_force_torque_preint.cpp   | 2 +-
 test/gtest_processor_inertial_kinematics.cpp   | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/demos/mcapi_povcdl_estimation.cpp b/demos/mcapi_povcdl_estimation.cpp
index c00c835..aea20d6 100644
--- a/demos/mcapi_povcdl_estimation.cpp
+++ b/demos/mcapi_povcdl_estimation.cpp
@@ -433,7 +433,7 @@ int main (int argc, char **argv) {
     P_origin.block<3,3>(0,0)   = pow(std_prior_p, 2) * Matrix3d::Identity();
     P_origin.block<3,3>(3,3)   = pow(std_prior_o, 2) * Matrix3d::Identity();
     P_origin.block<3,3>(6,6)   = pow(std_prior_v, 2) * Matrix3d::Identity();
-    FrameBasePtr KF1 = problem->emplaceFrame(KEY, x_origin, t0);
+    FrameBasePtr KF1 = problem->emplaceKeyFrame( x_origin, t0);
     // Prior pose factor
     CapturePosePtr pose_prior_capture = CaptureBase::emplace<CapturePose>(KF1, t0, nullptr, x_origin.head(7), P_origin.topLeftCorner(6, 6));
     pose_prior_capture->emplaceFeatureAndFactor();
diff --git a/test/gtest_factor_force_torque.cpp b/test/gtest_factor_force_torque.cpp
index 5442ce9..47e95dd 100644
--- a/test/gtest_factor_force_torque.cpp
+++ b/test/gtest_factor_force_torque.cpp
@@ -151,7 +151,7 @@ void perturbateAllIfUnFixed(const FrameBasePtr& KF)
 FrameBasePtr createKFWithCDLI(const ProblemPtr& problem, const TimeStamp& t, VectorComposite x_origin,
                               Vector3d c, Vector3d cd, Vector3d Lc, Vector6d bias_imu)
 {
-    FrameBasePtr KF = FrameBase::emplace<FrameBase>(problem->getTrajectory(), wolf::KEY, t, "POV", x_origin);
+    FrameBasePtr KF = FrameBase::emplaceKeyFrame<FrameBase>(problem->getTrajectory(), t, "POV", x_origin);
     StateBlockPtr sbc = make_shared<StateBlock>(c);  KF->addStateBlock("C", sbc, problem);
     StateBlockPtr sbd = make_shared<StateBlock>(cd); KF->addStateBlock("D", sbd, problem);
     StateBlockPtr sbL = make_shared<StateBlock>(Lc); KF->addStateBlock("L", sbL, problem);
diff --git a/test/gtest_feature_force_torque_preint_WIP.cpp b/test/gtest_feature_force_torque_preint_WIP.cpp
index e196ee0..0b7c24a 100644
--- a/test/gtest_feature_force_torque_preint_WIP.cpp
+++ b/test/gtest_feature_force_torque_preint_WIP.cpp
@@ -111,7 +111,7 @@ class FeatureForceTorquePreint_test : public testing::Test
     //emplace Frame
         ts_ = problem_->getProcessorIsMotion()->getBuffer().back().ts_;
         state_vec_ = problem_->getProcessorIsMotion()->getCurrentState();
-        last_frame_ = problem_->emplaceFrame(KEY, state_vec_, ts_);
+        last_frame_ = problem_->emplaceKeyFrame( state_vec_, ts_);
 
     //emplace a feature
         delta_preint_ = problem_->getProcessorIsMotion()->getMotion().delta_integr_;
diff --git a/test/gtest_processor_force_torque_preint.cpp b/test/gtest_processor_force_torque_preint.cpp
index dd72e9f..08fe750 100644
--- a/test/gtest_processor_force_torque_preint.cpp
+++ b/test/gtest_processor_force_torque_preint.cpp
@@ -204,7 +204,7 @@ public:
         // - call setOrigin on processors isMotion
         setOriginState();
         MatrixXd P_origin_ = pow(1e-3, 2) * MatrixXd::Identity(18,18);
-        KF1_ = problem_->emplaceFrame(KEY, t0_, x_origin_);
+        KF1_ = problem_->emplaceKeyFrame( t0_, x_origin_);
         // Prior pose factor
         CapturePosePtr pose_prior_capture = CaptureBase::emplace<CapturePose>(KF1_, t0_, nullptr, x_origin_.head(7), P_origin_.topLeftCorner(6, 6));
         pose_prior_capture->emplaceFeatureAndFactor();
diff --git a/test/gtest_processor_inertial_kinematics.cpp b/test/gtest_processor_inertial_kinematics.cpp
index 3696aba..c8a95d1 100644
--- a/test/gtest_processor_inertial_kinematics.cpp
+++ b/test/gtest_processor_inertial_kinematics.cpp
@@ -102,7 +102,7 @@ class FactorInertialKinematics_2KF : public testing::Test
 
         // Set origin of the problem
         // KF0_ = problem_->setPriorFactor(x_origin_, P_origin_, t_, 0.005);
-        KF0_ = problem_->emplaceFrame(KEY, t_, x_origin_);
+        KF0_ = problem_->emplaceKeyFrame( t_, x_origin_);
 
         ///////////////////////////////////////////////////
         // Prior pose factor
-- 
GitLab