Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
JastAdd
RagConnect
Commits
c6a971a9
Commit
c6a971a9
authored
Aug 27, 2020
by
René Schöne
Browse files
Update mustache.
parent
087daac8
Pipeline
#7701
passed with stage
in 1 minute and 7 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
mustache
@
130a96ef
Compare
2bf86903
...
130a96ef
Subproject commit
2bf869031ffc69bdb88dafd2cb4464a26502ae2b
Subproject commit
130a96efa74f90c9d2f8634e2ddc6d6c705f146d
ragconnect.base/src/main/java/org/jastadd/ragconnect/compiler/SimpleMain.java
View file @
c6a971a9
...
...
@@ -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
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment