Skip to content
Snippets Groups Projects
Commit bf7b8ba2 authored by Joaquim Casals Buñuel's avatar Joaquim Casals Buñuel
Browse files

Changes to Problem to actually close #219

parent 6f3d7905
No related branches found
No related tags found
1 merge request!281WIP: Resolve "autoconf: add state definition and dimension to yaml"
Pipeline #3575 passed
......@@ -61,7 +61,7 @@ class Problem : public std::enable_shared_from_this<Problem>
public:
static ProblemPtr create(const std::string& _frame_structure, SizeEigen _dim); // USE THIS AS A CONSTRUCTOR!
static ProblemPtr autoSetup(const std::string& _frame_structure, SizeEigen _dim, const std::string& _yaml_file);
static ProblemPtr autoSetup(const std::string& _yaml_file);
virtual ~Problem();
// Properties -----------------------------------------
......
......@@ -72,13 +72,15 @@ ProblemPtr Problem::create(const std::string& _frame_structure, SizeEigen _dim)
p->setup();
return p->shared_from_this();
}
ProblemPtr Problem::autoSetup(const std::string& _frame_structure, SizeEigen _dim, const std::string& _yaml_file)
ProblemPtr Problem::autoSetup(const std::string& _yaml_file)
{
auto p = Problem::create(_frame_structure, _dim);
// string file = "/home/jcasals/catkin_ws/src/wolf_ros_wrapper/src/params.yaml";
parserYAML parser = parserYAML(_yaml_file);
parser.parse();
paramsServer server = paramsServer(parser.getParams(), parser.sensorsSerialization(), parser.processorsSerialization());
std::string frame_structure = server.getParam<std::string>("problem/frame structure", "PO");
int dim = server.getParam<int>("problem/dimension", "2");
auto p = Problem::create(frame_structure, dim);
// cout << "PRINTING SERVER MAP" << endl;
// server.print();
// cout << "-----------------------------------" << endl;
......
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