Commit c6a971a9 authored by René Schöne's avatar René Schöne
Browse files

Update mustache.

parent 087daac8
Pipeline #7701 passed with stage
in 1 minute and 7 seconds
Subproject commit 2bf869031ffc69bdb88dafd2cb4464a26502ae2b Subproject commit 130a96efa74f90c9d2f8634e2ddc6d6c705f146d
...@@ -17,8 +17,7 @@ public class SimpleMain { ...@@ -17,8 +17,7 @@ public class SimpleMain {
private static void printManualYAML() { private static void printManualYAML() {
Document doc = new Document(); Document doc = new Document();
KeyValuePair root = new KeyValuePair(); MappingElement root = new MappingElement();
root.setKey("panda_mqtt_connector");
MappingElement firstLevel = new MappingElement(); MappingElement firstLevel = new MappingElement();
firstLevel.addKeyValuePair(new KeyValuePair("server", new StringElement("tcp://localhost:1883"))); firstLevel.addKeyValuePair(new KeyValuePair("server", new StringElement("tcp://localhost:1883")));
firstLevel.addKeyValuePair(new KeyValuePair("robot_speed_factor", new ValueElement(".7"))); firstLevel.addKeyValuePair(new KeyValuePair("robot_speed_factor", new ValueElement(".7")));
...@@ -34,19 +33,13 @@ public class SimpleMain { ...@@ -34,19 +33,13 @@ public class SimpleMain {
firstLevel.addKeyValuePair(new KeyValuePair("zone_size", new ValueElement("0.5"))); firstLevel.addKeyValuePair(new KeyValuePair("zone_size", new ValueElement("0.5")));
KeyValuePair zones = new KeyValuePair();
zones.setKey("zones");
ListElement theZones = new ListElement(); ListElement theZones = new ListElement();
theZones.addElement(new StringElement("1 1")); theZones.addElement(new StringElement("1 1"));
theZones.addElement(new StringElement("0 1")); theZones.addElement(new StringElement("0 1"));
theZones.addElement(new StringElement("-1 1")); theZones.addElement(new StringElement("-1 1"));
zones.setValue(theZones); firstLevel.addKeyValuePair("zones", theZones);
firstLevel.addKeyValuePair(zones);
KeyValuePair parts = new KeyValuePair(); MappingElement pandaParts = new MappingElement();
parts.setKey("end_effectors");
KeyValuePair pandaParts = new KeyValuePair();
pandaParts.setKey("panda");
MappingElement thePanda = new MappingElement(); MappingElement thePanda = new MappingElement();
thePanda.addKeyValuePair(new KeyValuePair("Link0", new StringElement("panda_link0"))); thePanda.addKeyValuePair(new KeyValuePair("Link0", new StringElement("panda_link0")));
thePanda.addKeyValuePair(new KeyValuePair("Link1", new StringElement("panda_link1"))); thePanda.addKeyValuePair(new KeyValuePair("Link1", new StringElement("panda_link1")));
...@@ -57,17 +50,14 @@ public class SimpleMain { ...@@ -57,17 +50,14 @@ public class SimpleMain {
thePanda.addKeyValuePair(new KeyValuePair("Link6", new StringElement("panda_link6"))); thePanda.addKeyValuePair(new KeyValuePair("Link6", new StringElement("panda_link6")));
thePanda.addKeyValuePair(new KeyValuePair("RightFinger", new StringElement("panda_rightfinger"))); thePanda.addKeyValuePair(new KeyValuePair("RightFinger", new StringElement("panda_rightfinger")));
thePanda.addKeyValuePair(new KeyValuePair("LeftFinger", new StringElement("panda_leftfinger"))); thePanda.addKeyValuePair(new KeyValuePair("LeftFinger", new StringElement("panda_leftfinger")));
pandaParts.setValue(thePanda); pandaParts.addKeyValuePair("panda", thePanda);
parts.setValue(pandaParts); firstLevel.addKeyValuePair("parts", pandaParts);
firstLevel.addKeyValuePair(parts);
KeyValuePair end_effectors = new KeyValuePair(); MappingElement endEffectorParts = new MappingElement();
end_effectors.setKey("end_effectors"); MappingElement endEffector = new MappingElement();
KeyValuePair endEffectorParts = new KeyValuePair(); endEffector.addKeyValuePair("EndEffector", new StringElement("panda_hand"));
endEffectorParts.setKey("panda"); endEffectorParts.addKeyValuePair("panda", endEffector);
endEffectorParts.setValue(new KeyValuePair("EndEffector", new StringElement("panda_hand"))); firstLevel.addKeyValuePair("end_effectors", endEffectorParts);
end_effectors.setValue(endEffectorParts);
firstLevel.addKeyValuePair(end_effectors);
KeyValuePair goalPoses = new KeyValuePair(); KeyValuePair goalPoses = new KeyValuePair();
goalPoses.setKey("goal_poses"); goalPoses.setKey("goal_poses");
...@@ -81,7 +71,7 @@ public class SimpleMain { ...@@ -81,7 +71,7 @@ public class SimpleMain {
goalPoses.setValue(theGoalPoses); goalPoses.setValue(theGoalPoses);
firstLevel.addKeyValuePair(goalPoses); firstLevel.addKeyValuePair(goalPoses);
root.setValue(firstLevel); root.addKeyValuePair("panda_mqtt_connector", firstLevel);
doc.setRootElement(root); doc.setRootElement(root);
System.out.println(doc.prettyPrint()); System.out.println(doc.prettyPrint());
......
Supports Markdown
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