File size: 9,593 Bytes
2c55b92
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<mujoco model="Cube 3x3x3">
  <compiler autolimits="true" texturedir="assets"/>

  <option timestep="0.01" integrator="implicitfast"/>

  <size memory="600K"/>

  <visual>
    <global azimuth="180" elevation="-20"/>
    <headlight ambient="0.3 0.3 0.3" diffuse="0.6 0.6 0.6" specular="0 0 0"/>
  </visual>

  <statistic meansize="0.0087" extent="0.1"/>

  <default>
    <geom mass="0.00253704"/>
    <motor ctrlrange="-0.05 0.05"/>
    <default class="cubelet">
      <joint type="ball" armature="0.0001" damping="0.0005" frictionloss="0.001"/>
      <geom type="mesh" condim="1" mesh="cubelet" euler="0 0 90"/>
    </default>
    <default class="core">
      <geom type="sphere" contype="0" conaffinity="0" group="4" size="0.01"/>
    </default>
  </default>

  <asset>
    <texture type="skybox" builtin="gradient" width="512" height="512"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....F......" file="white.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....B......" file="yellow.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....D......" file="red.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....U......" file="orange.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....R......" file="blue.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....L......" file="green.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....DF....." file="red_white.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....UF....." file="orange_white.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....RF....." file="blue_white.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....LF....." file="green_white.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....DB....." file="red_yellow.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....UB....." file="orange_yellow.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....RB....." file="blue_yellow.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....LB....." file="green_yellow.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....UD....." file="orange_red.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....RD....." file="blue_red.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....LD....." file="green_red.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....RU....." file="blue_orange.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....LU....." file="green_orange.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....RDF...." file="blue_red_white.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....LDF...." file="green_red_white.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....RUF...." file="blue_orange_white.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....LUF...." file="green_orange_white.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....RDB...." file="blue_red_yellow.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....LDB...." file="green_red_yellow.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....RUB...." file="blue_orange_yellow.png"/>
    <texture rgb1="0 0 0" gridsize="3 4" gridlayout=".....LUB...." file="green_orange_yellow.png"/>
    <material name="white" texture="white"/>
    <material name="yellow" texture="yellow"/>
    <material name="red" texture="red"/>
    <material name="orange" texture="orange"/>
    <material name="blue" texture="blue"/>
    <material name="green" texture="green"/>
    <material name="red_white" texture="red_white"/>
    <material name="orange_white" texture="orange_white"/>
    <material name="blue_white" texture="blue_white"/>
    <material name="green_white" texture="green_white"/>
    <material name="red_yellow" texture="red_yellow"/>
    <material name="orange_yellow" texture="orange_yellow"/>
    <material name="blue_yellow" texture="blue_yellow"/>
    <material name="green_yellow" texture="green_yellow"/>
    <material name="orange_red" texture="orange_red"/>
    <material name="blue_red" texture="blue_red"/>
    <material name="green_red" texture="green_red"/>
    <material name="blue_orange" texture="blue_orange"/>
    <material name="green_orange" texture="green_orange"/>
    <material name="blue_red_white" texture="blue_red_white"/>
    <material name="green_red_white" texture="green_red_white"/>
    <material name="blue_orange_white" texture="blue_orange_white"/>
    <material name="green_orange_white" texture="green_orange_white"/>
    <material name="blue_red_yellow" texture="blue_red_yellow"/>
    <material name="green_red_yellow" texture="green_red_yellow"/>
    <material name="blue_orange_yellow" texture="blue_orange_yellow"/>
    <material name="green_orange_yellow" texture="green_orange_yellow"/>
    <mesh name="cubelet" scale="1e-3 1e-3 1e-3"
          vertex="8.075   9.5    -8.075  -8.075   9.5    -8.075   8.075   9.5     8.075
                 -8.075   9.5     8.075  -9.5     8.075  -8.075  -9.5    -8.075  -8.075
                 -9.5     8.075   8.075  -9.5    -8.075   8.075   8.075  -9.5    -8.075
                  8.075  -9.5     8.075  -8.075  -9.5    -8.075  -8.075  -9.5     8.075
                  9.5     8.075   8.075   9.5    -8.075   8.075   9.5     8.075  -8.075
                  9.5    -8.075  -8.075   8.075   8.075   9.5    -8.075   8.075   9.5
                  8.075  -8.075   9.5    -8.075  -8.075   9.5     8.075  -8.075  -9.5
                 -8.075  -8.075  -9.5     8.075   8.075  -9.5    -8.075   8.075  -9.5"/>
  </asset>

  <worldbody>
    <light pos="0 0 1"/>
    <body name="core" childclass="cubelet">
      <geom class="core"/>
      <body name="pX">
        <joint name="pX" type="hinge" axis="1 0 0"/>
        <geom material="red" pos="0.019 0 0"/>
      </body>
      <body name="nX">
        <joint name="nX" type="hinge" axis="-1 0 0"/>
        <geom material="orange" pos="-0.019 0 0"/>
      </body>
      <body name="pY">
        <joint name="pY" type="hinge" axis="0 1 0"/>
        <geom material="blue" pos="0 0.019 0"/>
      </body>
      <body name="nY">
        <joint name="nY" type="hinge" axis="0 -1 0"/>
        <geom material="green" pos="0 -0.019 0"/>
      </body>
      <body name="pZ">
        <joint name="pZ" type="hinge" axis="0 0 1"/>
        <geom material="white" pos="0 0 0.019"/>
      </body>
      <body name="nZ">
        <joint name="nZ" type="hinge" axis="0 0 -1"/>
        <geom material="yellow" pos="0 0 -0.019"/>
      </body>
      <body name="pX_pY">
        <joint name="pX_pY"/>
        <geom material="blue_red" pos="0.019 0.019 0"/>
      </body>
      <body name="nY_pX">
        <joint name="nY_pX"/>
        <geom material="green_red" pos="0.019 -0.019 0"/>
      </body>
      <body name="pX_pZ">
        <joint name="pX_pZ"/>
        <geom material="red_white" pos="0.019 0 0.019"/>
      </body>
      <body name="nZ_pX">
        <joint name="nZ_pX"/>
        <geom material="red_yellow" pos="0.019 0 -0.019"/>
      </body>
      <body name="nX_pY">
        <joint name="nX_pY"/>
        <geom material="blue_orange" pos="-0.019 0.019 0"/>
      </body>
      <body name="nX_nY">
        <joint name="nX_nY"/>
        <geom material="green_orange" pos="-0.019 -0.019 0"/>
      </body>
      <body name="nX_pZ">
        <joint name="nX_pZ"/>
        <geom material="orange_white" pos="-0.019 0 0.019"/>
      </body>
      <body name="nX_nZ">
        <joint name="nX_nZ"/>
        <geom material="orange_yellow" pos="-0.019 0 -0.019"/>
      </body>
      <body name="pY_pZ">
        <joint name="pY_pZ"/>
        <geom material="blue_white" pos="0 0.019 0.019"/>
      </body>
      <body name="nZ_pY">
        <joint name="nZ_pY"/>
        <geom material="blue_yellow" pos="0 0.019 -0.019"/>
      </body>
      <body name="nY_pZ">
        <joint name="nY_pZ"/>
        <geom material="green_white" pos="0 -0.019 0.019"/>
      </body>
      <body name="nY_nZ">
        <joint name="nY_nZ"/>
        <geom material="green_yellow" pos="0 -0.019 -0.019"/>
      </body>
      <body name="pX_pY_pZ">
        <joint name="pX_pY_pZ"/>
        <geom material="blue_red_white" pos="0.019 0.019 0.019"/>
      </body>
      <body name="nZ_pX_pY">
        <joint name="nZ_pX_pY"/>
        <geom material="blue_red_yellow" pos="0.019 0.019 -0.019"/>
      </body>
      <body name="nY_pX_pZ">
        <joint name="nY_pX_pZ"/>
        <geom material="green_red_white" pos="0.019 -0.019 0.019"/>
      </body>
      <body name="nY_nZ_pX">
        <joint name="nY_nZ_pX"/>
        <geom material="green_red_yellow" pos="0.019 -0.019 -0.019"/>
      </body>
      <body name="nX_pY_pZ">
        <joint name="nX_pY_pZ"/>
        <geom material="blue_orange_white" pos="-0.019 0.019 0.019"/>
      </body>
      <body name="nX_nZ_pY">
        <joint name="nX_nZ_pY"/>
        <geom material="blue_orange_yellow" pos="-0.019 0.019 -0.019"/>
      </body>
      <body name="nX_nY_pZ">
        <joint name="nX_nY_pZ"/>
        <geom material="green_orange_white" pos="-0.019 -0.019 0.019"/>
      </body>
      <body name="nX_nY_nZ">
        <joint name="nX_nY_nZ"/>
        <geom material="green_orange_yellow" pos="-0.019 -0.019 -0.019"/>
      </body>
    </body>
  </worldbody>

  <actuator>
    <motor name="red" joint="pX"/>
    <motor name="orange" joint="nX"/>
    <motor name="blue" joint="pY"/>
    <motor name="green" joint="nY"/>
    <motor name="white" joint="pZ"/>
    <motor name="yellow" joint="nZ"/>
  </actuator>
</mujoco>