From bf0f7487afacf3f896c3ab0d87a2af2ac1049752 Mon Sep 17 00:00:00 2001
From: jcasals <jcasals@iri.upc.edu>
Date: Tue, 10 Mar 2020 08:51:40 +0100
Subject: [PATCH] Remove "managers" keyword from YAML

---
 include/core/yaml/parser_yaml.hpp | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/core/yaml/parser_yaml.hpp b/include/core/yaml/parser_yaml.hpp
index 2a145aa57..22f584d76 100644
--- a/include/core/yaml/parser_yaml.hpp
+++ b/include/core/yaml/parser_yaml.hpp
@@ -419,7 +419,7 @@ void ParserYAML::parseFirstLevel(std::string file){
       throw std::runtime_error("Error parsing processors @" + generatePath(file) + ". Please make sure that each processor has 'type', 'name', 'plugin' and 'sensor_name' entries.");
     }
     try {
-      for (const auto &kv : n_config["ROS subscriber managers"]) {
+      for (const auto &kv : n_config["ROS subscriber"]) {
           SubscriberManager pSubscriberManager = {kv["package"].Scalar(), kv["type"].Scalar(), kv["topic"].Scalar(), kv["sensor_name"].Scalar(), kv};
           _subscriber_managers.push_back(pSubscriberManager);
           map_container.push_back(std::map<std::string, std::string>({
@@ -428,14 +428,14 @@ void ParserYAML::parseFirstLevel(std::string file){
                                                                       {"topic", kv["topic"].Scalar()},
                                                                       {"sensor_name", kv["sensor_name"].Scalar()}}));
       }
-      insert_register("ROS subscriber managers", wolf::converter<std::string>::convert(map_container));
+      insert_register("ROS subscriber", wolf::converter<std::string>::convert(map_container));
       map_container.clear();
     } catch (YAML::InvalidNode &e) {
-        throw std::runtime_error("Error parsing subscriber managers @" + generatePath(file) + ". Please make sure that each manager has 'package', 'type', 'topic' and 'sensor_name' entries.");
+        throw std::runtime_error("Error parsing subscriber @" + generatePath(file) + ". Please make sure that each manager has 'package', 'type', 'topic' and 'sensor_name' entries.");
     }
 
     try {
-      for (const auto &kv : n_config["ROS publisher managers"]) {
+      for (const auto &kv : n_config["ROS publisher"]) {
         WOLF_DEBUG("WHAT");
           PublisherManager pPublisherManager = {kv["type"].Scalar(), kv["topic"].Scalar(), kv["period"].Scalar(), kv};
           _publisher_managers.push_back(pPublisherManager);
@@ -444,10 +444,10 @@ void ParserYAML::parseFirstLevel(std::string file){
                                                                       {"topic", kv["topic"].Scalar()},
                                                                       {"period", kv["period"].Scalar()}}));
       }
-      insert_register("ROS publisher managers", wolf::converter<std::string>::convert(map_container));
+      insert_register("ROS publisher", wolf::converter<std::string>::convert(map_container));
       map_container.clear();
     } catch (YAML::InvalidNode &e) {
-        throw std::runtime_error("Error parsing publisher managers @" + generatePath(file) + ". Please make sure that each manager has 'type', 'topic' and 'period' entries.");
+        throw std::runtime_error("Error parsing publisher @" + generatePath(file) + ". Please make sure that each manager has 'type', 'topic' and 'period' entries.");
     }
 }
 std::map<std::string,std::string> ParserYAML::getParams(){
@@ -504,7 +504,7 @@ void ParserYAML::parse(){
                                 {
                                     std::string node_key = itt.first.as<std::string>();
                                     if (node_key != "problem" and node_key != "sensors" and node_key != "processors" and
-                                        node_key != "ROS subscriber managers" and node_key != "ROS publisher managers")
+                                        node_key != "ROS subscriber" and node_key != "ROS publisher")
                                         {
                                             this->walkTreeR(itt.second, tags, node_key);
                                         }
-- 
GitLab