Skip to content
Snippets Groups Projects
Commit 8791d3b5 authored by marvin's avatar marvin
Browse files

ModelSetup tolerates non-.gazebo.xacro files in in_gmPath

parent ba3caf53
No related merge requests found
......@@ -50,9 +50,18 @@ public class ModelSetup extends XMLHelper{
String out_mName = getConfigVal(ModelSetupConfig, "output/model", "name");
Document model = readXml(in_mPath+in_mName);
//Get sensorconfig- and gazebomodel file names.
//All files in in_scPath will be treated as sensorconfigs, while in_gmPath may
//contain other files that will be filtered out!
List<String> scList = getFileNames(in_scPath);
List<String> gmList = getFileNames(in_gmPath);
List<String> tmpList = getFileNames(in_gmPath);
List<String> gmList = new ArrayList<String>();
for(String s : tmpList) {
if(s.endsWith(GM_ENDING)) {
gmList.add(s);
}
}
//Check whether feature input was empty.
//It is possible to have no sensors (so you can build a custom bot with no sensors),
......@@ -72,12 +81,6 @@ public class ModelSetup extends XMLHelper{
System.exit(-1);
}
}
for(String gm : gmList) {
if(!gm.endsWith(GM_ENDING)) {
System.err.println("Error: gazebo model file \'"+gm+"\' does not have an \'"+GM_ENDING+"\' ending.");
System.exit(-1);
}
}
//Sort features alphabetically (ascending order; upper case first; then lower case).
Collections.sort(scList);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment