diff --git a/test/gtest_map_yaml.cpp b/test/gtest_map_yaml.cpp index 6fd406f31e5a0439921238b99a1f046dfc6ae906..1b13a761875f932faf75663274324f7b91d259ae 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);