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

[bug-fix] ParserYAML now correctly parses keyword "follow" under "config"

parent 8d8370d5
No related branches found
No related tags found
No related merge requests found
Pipeline #5634 passed
......@@ -497,13 +497,11 @@ void ParserYAML::parse()
YAML::Node n;
n = loadYAML(generatePath(file_));
if (n.Type() == YAML::NodeType::Map)
{
for (auto it : n)
{
auto node = it.second;
// WOLF_INFO("WUT ", it.first);
std::vector<std::string> tags = std::vector<std::string>();
if (it.first.as<std::string>() != "config")
walkTreeR(node, tags, it.first.as<std::string>());
......@@ -515,7 +513,15 @@ void ParserYAML::parse()
if (node_key != "problem" and node_key != "sensors" and node_key != "processors" and
node_key != "ROS subscriber" and node_key != "ROS publisher")
{
walkTreeR(itt.second, tags, node_key);
std::regex rr("follow");
if (not std::regex_match(node_key, rr))
{
walkTreeR(itt.second, tags, node_key);
}
else
{
walkTree(itt.second.as<std::string>(), tags, "");
}
}
}
}
......
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