From ce329c960f2ae4bead0d5a452bb98c1d5b17bb84 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?M=C3=A9d=C3=A9ric=20Fourmy?= <mfourmy@laas.fr>
Date: Mon, 22 Feb 2021 12:12:22 +0100
Subject: [PATCH] small refactoring

---
 ...cessor_and_factor_pose_3d_with_extrinsics.cpp | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/test/gtest_processor_and_factor_pose_3d_with_extrinsics.cpp b/test/gtest_processor_and_factor_pose_3d_with_extrinsics.cpp
index a9146cc7e..a81b36918 100644
--- a/test/gtest_processor_and_factor_pose_3d_with_extrinsics.cpp
+++ b/test/gtest_processor_and_factor_pose_3d_with_extrinsics.cpp
@@ -117,6 +117,8 @@ class FactorPose3dWithExtrinsicsBase_Test : public testing::Test
         sensor_pose_ = problem_->installSensor("SensorPose", "pose", extr, intr_sp);
         auto params_proc = std::make_shared<ParamsProcessorPose>();
         auto proc_pose = problem_->installProcessor("ProcessorPose", "pose", sensor_pose_, params_proc);
+        // somehow by default the sensor extrinsics is fixed
+        sensor_pose_->unfixExtrinsics();
     }
 
     void TearDown() override{};
@@ -258,15 +260,9 @@ TEST_F(FactorPose3dWithExtrinsicsMANUAL_Test, check_tree)
 
 TEST_F(FactorPose3dWithExtrinsicsMANUAL_Test, solve)
 {
-    // somehow by default the sensor extrinsics is fixed
-    // sensor_pose_->unfixExtrinsics();
-
     problem_->perturb();
-
     std::string report = solver_->solve(SolverManager::ReportVerbosity::FULL);
 
-    problem_->print(4,1,1,1);
-
     SensorPosePtr sp = std::static_pointer_cast<SensorPose>(sensor_pose_);
     ASSERT_MATRIX_APPROX(KF1_->getStateVector(), pose1_, 1e-6);
     ASSERT_MATRIX_APPROX(KF2_->getStateVector(), pose2_, 1e-6);
@@ -283,11 +279,7 @@ TEST_F(FactorPose3dWithExtrinsics_ProcessorWithKeyFrameCallbackFirst_Test, check
 
 TEST_F(FactorPose3dWithExtrinsics_ProcessorWithKeyFrameCallbackFirst_Test, solve)
 {
-    // somehow by default the sensor extrinsics is fixed
-    sensor_pose_->unfixExtrinsics();
-
     problem_->perturb();
-
     std::string report = solver_->solve(SolverManager::ReportVerbosity::FULL);
 
     SensorPosePtr sp = std::static_pointer_cast<SensorPose>(sensor_pose_);
@@ -306,11 +298,7 @@ TEST_F(FactorPose3dWithExtrinsics_ProcessorWithProcessFirst_Test, check_tree)
 
 TEST_F(FactorPose3dWithExtrinsics_ProcessorWithProcessFirst_Test, solve)
 {
-    // somehow by default the sensor extrinsics is fixed
-    sensor_pose_->unfixExtrinsics();
-
     problem_->perturb();
-
     std::string report = solver_->solve(SolverManager::ReportVerbosity::FULL);
 
     SensorPosePtr sp = std::static_pointer_cast<SensorPose>(sensor_pose_);
-- 
GitLab