15 paramEntryAscii(std::string _nameVal, std::string _typeVal, std::string _valueVal)
20 setCheckStatus(999,
"untested");
26 this->nodePtr = paramEntryPtr;
31 return( this->nodePtr);
33 void setValues(std::string _nameVal, std::string _typeVal, std::string _valueVal)
49 valueMinVal = _valueMinVal;
50 valueMaxVal = _valueMaxVal;
114 kill(tokill, SIGTERM);
121 std::vector<paramEntryAscii> tmpList;
127 std::string nameVal =
"";
128 std::string typeVal =
"";
129 std::string valueVal =
"";
130 std::string minValueVal =
"";
131 std::string maxValueVal =
"";
133 bool minValFnd =
false;
134 bool maxValFnd =
false;
137 const char *entryVal = paramEntry->
Value();
138 bool searchAttributes =
true;
139 if (strcmp(entryVal,
"param") == 0)
145 searchAttributes =
false;
153 searchAttributes =
false;
155 if (searchAttributes)
159 const char *tag =
node->Name();
160 const char *val =
node->Value();
162 if (strcmp(tag,
"name") == 0)
166 if (strcmp(tag,
"type") == 0)
170 if (strcmp(tag,
"value") == 0)
174 if (strcmp(tag,
"valueMin") == 0)
180 if (strcmp(tag,
"valueMax") == 0)
193 if (maxValFnd && minValFnd)
199 tmpList.push_back(tmpEntry);
210 std::vector<std::string>& typeVec, std::vector<std::string>& valVec)
215 doc.
LoadFile(launchFileFullName.c_str());
217 if (doc.
Error() ==
true)
225 std::map<std::string, std::string> default_args;
232 const char* p_attr_name = arg_node->
Attribute(
"name");
233 const char* p_attr_default = arg_node->
Attribute(
"default");
234 if(p_attr_name && p_attr_default)
236 std::string attr_name(p_attr_name), attr_default(p_attr_default);
237 default_args[attr_name] = attr_default;
238 ROS_INFO_STREAM(
"LaunchParser::parseFile(" << launchFileFullName <<
"): default_args[\"" << attr_name <<
"\"]=\"" << default_args[attr_name] <<
"\"");
245 bool node_with_scanner_type_found =
false;
252 std::vector<paramEntryAscii> paramOrgList =
getParamList(group_node);
253 for (
size_t j = 0; j < paramOrgList.size(); j++)
255 if (paramOrgList[j].
getName() ==
"scanner_type")
257 node_with_scanner_type_found =
true;
258 ROS_INFO_STREAM(
"LaunchParser::parseFile(" << launchFileFullName <<
"): group node found with param scanner_type");
265 if (!node_with_scanner_type_found)
273 for (
size_t j = 0; j < paramOrgList.size(); j++)
275 nameVec.push_back(paramOrgList[j].
getName());
276 typeVec.push_back(paramOrgList[j].getType());
277 valVec.push_back(paramOrgList[j].getValue());
278 if(valVec.back().substr(0, 6) ==
"$(arg ")
280 std::string default_arg_name = valVec.back().substr(6, valVec.back().length() - 1 - 6);
281 if (default_args.find(default_arg_name) != default_args.end())
283 std::string default_arg_val = default_args[default_arg_name];
284 ROS_INFO_STREAM(
"LaunchParser::parseFile(" << launchFileFullName <<
"): name=\"" << nameVec.back() <<
"\", type=\"" << typeVec.back() <<
"\", value=\"" << valVec.back()
285 <<
"\" overwritten by default value \"" << default_arg_val <<
"\"");
286 valVec.back() = default_arg_val;
289 ROS_INFO_STREAM(
"LaunchParser::parseFile(" << launchFileFullName <<
"): name=\"" << nameVec.back() <<
"\", type=\"" << typeVec.back() <<
"\", value=\"" << valVec.back() <<
"\"");