Skip to content
Snippets Groups Projects
Commit 26ba2e2d authored by Joan Vallvé Navarro's avatar Joan Vallvé Navarro
Browse files

WIP

parent b3dfbd9b
No related branches found
No related tags found
1 merge request!278Resolve "Revisit demos (formerly called examples) and update them"
Pipeline #3550 failed
...@@ -22,7 +22,7 @@ void print(MapBase& _map) ...@@ -22,7 +22,7 @@ void print(MapBase& _map)
{ {
std::cout << "Lmk ID: " << lmk_ptr->id() << std::endl; std::cout << "Lmk ID: " << lmk_ptr->id() << std::endl;
std::cout << "\tLmk type: " << lmk_ptr->getType() << 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"); std::cout << "\tpos: " << lmk_ptr->getP()->getState().transpose() << (lmk_ptr->getP()->isFixed() ? " -- fixed" : " -- estimated\n");
if (lmk_ptr->getO()) if (lmk_ptr->getO())
...@@ -52,17 +52,17 @@ TEST(MapYaml, save_2D) ...@@ -52,17 +52,17 @@ TEST(MapYaml, save_2D)
StateBlockPtr p3_sb = std::make_shared<StateBlock>(p3, true); StateBlockPtr p3_sb = std::make_shared<StateBlock>(p3, true);
StateBlockPtr o3_sb = std::make_shared<StateBlock>(o3, true); StateBlockPtr o3_sb = std::make_shared<StateBlock>(o3, true);
LandmarkBase::emplace<LandmarkBase>(problem->getMap(), p1_sb, o1_sb); LandmarkBase::emplace<LandmarkBase>(problem->getMap(), "BASE", p1_sb, o1_sb);
LandmarkBase::emplace<LandmarkBase>(problem->getMap(), p2_sb, o2_sb); LandmarkBase::emplace<LandmarkBase>(problem->getMap(), "BASE", p2_sb, o2_sb);
LandmarkBase::emplace<LandmarkBase>(problem->getMap(), p3_sb, o3_sb); LandmarkBase::emplace<LandmarkBase>(problem->getMap(), "BASE", p3_sb, o3_sb);
std::string wolf_root = _WOLF_ROOT_DIR; std::string wolf_root = _WOLF_ROOT_DIR;
std::string map_path = wolf_root + "/test/yaml"; std::string map_path = wolf_root + "/test/yaml";
std::string filename = wolf_config + "/map_2D_problem.yaml"; std::string filename = map_path + "/map_2D_problem.yaml";
std::cout << "Saving map to file: " << filename << std::endl; std::cout << "Saving map to file: " << filename << std::endl;
problem->saveMap(filename, "2D map saved from Problem::saveMap()"); 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; std::cout << "Saving map to file: " << filename << std::endl;
problem->getMap()->save(filename, "2D map saved from Map::save()"); problem->getMap()->save(filename, "2D map saved from Map::save()");
} }
...@@ -71,9 +71,9 @@ TEST(MapYaml, load_2D) ...@@ -71,9 +71,9 @@ TEST(MapYaml, load_2D)
{ {
ProblemPtr problem = Problem::create("PO", 2); ProblemPtr problem = Problem::create("PO", 2);
std::string wolf_root = _WOLF_ROOT_DIR; std::string wolf_root = _WOLF_ROOT_DIR;
std::string map_path = wolf_root + "/test/yaml"; std::string map_path = wolf_root + "/test/yaml";
std::string filename = wolf_config + "/map_2D_problem.yaml"; std::string filename = map_path + "/map_2D_problem.yaml";
std::cout << "Loading map to file: " << filename << std::endl; std::cout << "Loading map to file: " << filename << std::endl;
problem->loadMap(filename); problem->loadMap(filename);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment