Skip to content
Snippets Groups Projects
Commit c6a971a9 authored by René Schöne's avatar René Schöne
Browse files

Update mustache.

parent 087daac8
No related branches found
No related tags found
No related merge requests found
Pipeline #7701 passed
Subproject commit 2bf869031ffc69bdb88dafd2cb4464a26502ae2b
Subproject commit 130a96efa74f90c9d2f8634e2ddc6d6c705f146d
......@@ -17,8 +17,7 @@ public class SimpleMain {
private static void printManualYAML() {
Document doc = new Document();
KeyValuePair root = new KeyValuePair();
root.setKey("panda_mqtt_connector");
MappingElement root = new MappingElement();
MappingElement firstLevel = new MappingElement();
firstLevel.addKeyValuePair(new KeyValuePair("server", new StringElement("tcp://localhost:1883")));
firstLevel.addKeyValuePair(new KeyValuePair("robot_speed_factor", new ValueElement(".7")));
......@@ -34,19 +33,13 @@ public class SimpleMain {
firstLevel.addKeyValuePair(new KeyValuePair("zone_size", new ValueElement("0.5")));
KeyValuePair zones = new KeyValuePair();
zones.setKey("zones");
ListElement theZones = new ListElement();
theZones.addElement(new StringElement("1 1"));
theZones.addElement(new StringElement("0 1"));
theZones.addElement(new StringElement("-1 1"));
zones.setValue(theZones);
firstLevel.addKeyValuePair(zones);
firstLevel.addKeyValuePair("zones", theZones);
KeyValuePair parts = new KeyValuePair();
parts.setKey("end_effectors");
KeyValuePair pandaParts = new KeyValuePair();
pandaParts.setKey("panda");
MappingElement pandaParts = new MappingElement();
MappingElement thePanda = new MappingElement();
thePanda.addKeyValuePair(new KeyValuePair("Link0", new StringElement("panda_link0")));
thePanda.addKeyValuePair(new KeyValuePair("Link1", new StringElement("panda_link1")));
......@@ -57,17 +50,14 @@ public class SimpleMain {
thePanda.addKeyValuePair(new KeyValuePair("Link6", new StringElement("panda_link6")));
thePanda.addKeyValuePair(new KeyValuePair("RightFinger", new StringElement("panda_rightfinger")));
thePanda.addKeyValuePair(new KeyValuePair("LeftFinger", new StringElement("panda_leftfinger")));
pandaParts.setValue(thePanda);
parts.setValue(pandaParts);
firstLevel.addKeyValuePair(parts);
pandaParts.addKeyValuePair("panda", thePanda);
firstLevel.addKeyValuePair("parts", pandaParts);
KeyValuePair end_effectors = new KeyValuePair();
end_effectors.setKey("end_effectors");
KeyValuePair endEffectorParts = new KeyValuePair();
endEffectorParts.setKey("panda");
endEffectorParts.setValue(new KeyValuePair("EndEffector", new StringElement("panda_hand")));
end_effectors.setValue(endEffectorParts);
firstLevel.addKeyValuePair(end_effectors);
MappingElement endEffectorParts = new MappingElement();
MappingElement endEffector = new MappingElement();
endEffector.addKeyValuePair("EndEffector", new StringElement("panda_hand"));
endEffectorParts.addKeyValuePair("panda", endEffector);
firstLevel.addKeyValuePair("end_effectors", endEffectorParts);
KeyValuePair goalPoses = new KeyValuePair();
goalPoses.setKey("goal_poses");
......@@ -81,7 +71,7 @@ public class SimpleMain {
goalPoses.setValue(theGoalPoses);
firstLevel.addKeyValuePair(goalPoses);
root.setValue(firstLevel);
root.addKeyValuePair("panda_mqtt_connector", firstLevel);
doc.setRootElement(root);
System.out.println(doc.prettyPrint());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment