From 26ba2e2d9b5c568531db78504f5e5c7eb141cf47 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joan=20Vallv=C3=A9=20Navarro?= <jvallve@iri.upc.edu>
Date: Mon, 27 May 2019 17:17:22 +0200
Subject: [PATCH] WIP

---
 test/gtest_map_yaml.cpp | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/test/gtest_map_yaml.cpp b/test/gtest_map_yaml.cpp
index 6fd406f31..1b13a7618 100644
--- a/test/gtest_map_yaml.cpp
+++ b/test/gtest_map_yaml.cpp
@@ -22,7 +22,7 @@ void print(MapBase& _map)
     {
         std::cout << "Lmk ID:    " << lmk_ptr->id() << std::endl;
         std::cout << "\tLmk type:  " << lmk_ptr->getType() << std::endl;
-        if (lmk_ptr->getType() == "LANDMARK BASE")
+        if (lmk_ptr->getType() == "BASE")
         {
             std::cout << "\tpos:       " << lmk_ptr->getP()->getState().transpose() << (lmk_ptr->getP()->isFixed() ? " -- fixed" : " -- estimated\n");
             if (lmk_ptr->getO())
@@ -52,17 +52,17 @@ TEST(MapYaml, save_2D)
     StateBlockPtr p3_sb = std::make_shared<StateBlock>(p3, true);
     StateBlockPtr o3_sb = std::make_shared<StateBlock>(o3, true);
 
-    LandmarkBase::emplace<LandmarkBase>(problem->getMap(), p1_sb, o1_sb);
-    LandmarkBase::emplace<LandmarkBase>(problem->getMap(), p2_sb, o2_sb);
-    LandmarkBase::emplace<LandmarkBase>(problem->getMap(), p3_sb, o3_sb);
+    LandmarkBase::emplace<LandmarkBase>(problem->getMap(), "BASE", p1_sb, o1_sb);
+    LandmarkBase::emplace<LandmarkBase>(problem->getMap(), "BASE", p2_sb, o2_sb);
+    LandmarkBase::emplace<LandmarkBase>(problem->getMap(), "BASE", p3_sb, o3_sb);
 
-    std::string wolf_root       = _WOLF_ROOT_DIR;
-    std::string map_path     = wolf_root + "/test/yaml";
-    std::string filename = wolf_config + "/map_2D_problem.yaml";
+    std::string wolf_root = _WOLF_ROOT_DIR;
+    std::string map_path  = wolf_root + "/test/yaml";
+    std::string filename  = map_path + "/map_2D_problem.yaml";
     std::cout << "Saving map to file: " << filename << std::endl;
     problem->saveMap(filename, "2D map saved from Problem::saveMap()");
 
-    std::string filename = wolf_config + "/map_2D_map.yaml";
+    filename = map_path + "/map_2D_map.yaml";
     std::cout << "Saving map to file: " << filename << std::endl;
     problem->getMap()->save(filename, "2D map saved from Map::save()");
 }
@@ -71,9 +71,9 @@ TEST(MapYaml, load_2D)
 {
     ProblemPtr problem = Problem::create("PO", 2);
 
-    std::string wolf_root       = _WOLF_ROOT_DIR;
-    std::string map_path     = wolf_root + "/test/yaml";
-    std::string filename = wolf_config + "/map_2D_problem.yaml";
+    std::string wolf_root = _WOLF_ROOT_DIR;
+    std::string map_path  = wolf_root + "/test/yaml";
+    std::string filename  = map_path + "/map_2D_problem.yaml";
     std::cout << "Loading map to file: " << filename << std::endl;
     problem->loadMap(filename);
 
-- 
GitLab