diff --git a/hello_plugin/params.yaml b/hello_plugin/params.yaml index baeb49c7acc2c1177cc2ac2ec0c75ea94ab36280..14c4a1fa4753080997625511d5aa092611ce0101 100644 --- a/hello_plugin/params.yaml +++ b/hello_plugin/params.yaml @@ -15,16 +15,16 @@ config: - type: "ODOM 2D" name: "processor1" - sensorname: "odom" + sensor name: "odom" - type: "RANGE BEARING" name: "rb_processor" - sensorname: "rb" + sensor name: "rb" - type: "ODOM 2D" name: "my_proc_test" - sensorname: "odom" - follow: "../hello_plugin/params_conf.yaml" + sensor name: "odom" + follow: "../hello_plugin/params_conf.yaml" #Config continues in this file files: - "/home/jcasals/workspace/wip/wolf/lib/libsensor_odom.so" - "/home/jcasals/workspace/wip/wolf/lib/librange_bearing.so" \ No newline at end of file diff --git a/include/base/yaml/parser_yaml.hpp b/include/base/yaml/parser_yaml.hpp index febdb105e67b957a973683ba9dac29e8af167bb6..f93d882cb54837e1755e0bc0f127f01ce8d12ca7 100644 --- a/include/base/yaml/parser_yaml.hpp +++ b/include/base/yaml/parser_yaml.hpp @@ -171,12 +171,12 @@ void parserYAML::walkTreeR(YAML::Node n, vector<string>& tags, string hdr){ case YAML::NodeType::Map : { for(const auto& kv : n){ //If the key's value starts with a $ (i.e. $key) then its value is parsed as a literal map, - //otherwise the parser recursively parses the map + //otherwise the parser recursively parses the map. regex r("^\\$.*"); if(not regex_match(kv.first.as<string>(), r)){ /* If key=="follow" then the parser will assume that the value is a path and will parse - the (expected) yaml file at the specified path. Note that this does not increase the header depth + the (expected) yaml file at the specified path. Note that this does not increase the header depth. The following example shows how the header remains unafected: @my_main_config | @some_path - cov_det: 1 | - my_value : 23 @@ -235,7 +235,7 @@ void parserYAML::parseFirstLevel(string file){ _paramsSens.push_back(pSensor); } for(const auto& kv : n_config["processors"]){ - ParamsInitProcessor pProc = {kv["type"].Scalar(), kv["name"].Scalar(), kv["sensorname"].Scalar(), kv}; + ParamsInitProcessor pProc = {kv["type"].Scalar(), kv["name"].Scalar(), kv["sensor name"].Scalar(), kv}; _paramsProc.push_back(pProc); } for(const auto& kv : n_config["callbacks"]){