Skip to content

Commit d155a72

Browse files
committed
formatting
1 parent 11138ce commit d155a72

1 file changed

Lines changed: 11 additions & 17 deletions

File tree

src/test/java/mujoco/java/XMLtest.java

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ public class XMLtest {
3232
public void marshal() throws JAXBException, IOException, InterruptedException {
3333

3434

35-
Builder<Void> builder = Mujoco.builder();
35+
Mujoco.Builder<Void> builder = Mujoco.builder()
36+
.withModel("Test Robot")
37+
;
38+
3639
builder.addOption()
3740
.withTimestep(new BigDecimal(0.005));
3841
builder.addVisual()
@@ -105,17 +108,14 @@ public void marshal() throws JAXBException, IOException, InterruptedException {
105108
addActuator.addMotor()
106109
.withName("neck")
107110
.withGear("100")
108-
.withJoint("neck")
109-
110-
;
111+
.withJoint("neck");
111112
Mujoco.Worldbody.Builder<?> addWorldbody = builder.addWorldbody();
112113
addWorldbody.addGeom()
113114
.withName("floor")
114115
.withType(GeomtypeType.PLANE)
115116
.withCondim(3)
116117
.withSize("0 0 .05")
117-
.withMaterial("grid")
118-
;
118+
.withMaterial("grid");
119119
addWorldbody.addCamera();
120120

121121
addWorldbody.addLight()
@@ -125,24 +125,20 @@ public void marshal() throws JAXBException, IOException, InterruptedException {
125125
.withPos("0 -6 4")
126126
.withCutoff(BigDecimal.valueOf(30))
127127
.withDiffuse(".8 .8 .8")
128-
.withSpecular(null)
129-
;
128+
.withSpecular(null);
130129
BodyarchType.Builder<?> topbody = addWorldbody.addBody();
131130
topbody .withName("torso")
132131
.withChildclass("body")
133132
.withPos("0 0 1.282")
134133
.addGeom()
135134
.withName("torso")
136135
.withSize("0.07")
137-
.withFromto("0 -.07 0 0 .07 0")
138-
139-
;
136+
.withFromto("0 -.07 0 0 .07 0");
140137

141138
topbody.addLight()
142139
.withName("top")
143140
.withMode(CameramodeType.TRACKCOM)
144-
.withPos("0 0 2")
145-
;
141+
.withPos("0 0 2");
146142
topbody.addCamera();
147143
topbody.addFreejoint().withName("root");
148144
// topbody.addInertial()
@@ -155,16 +151,14 @@ public void marshal() throws JAXBException, IOException, InterruptedException {
155151
BodyarchType.Builder<?> head = topbody.addBody();
156152
head
157153
.withName("head")
158-
.withPos("0 0 2.2")
159-
;
154+
.withPos("0 0 2.2");
160155
// head.addInertial()
161156
// .withMass(BigDecimal.valueOf(0.01))
162157
// .withPos(".1 .1 .1")
163158
// ;
164159
head.addJoint()
165160
.withName("neck")
166-
.withAxis("2 1 1")
167-
;
161+
.withAxis("2 1 1");
168162
head.addGeom()
169163
.withName("head")
170164
.withSize("0.07")

0 commit comments

Comments
 (0)