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

Remove "managers" keyword from YAML

parent 2e6fd18c
No related branches found
No related tags found
No related merge requests found
Pipeline #4908 passed
......@@ -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);
}
......
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