Skip to content

Commit 0dc9572

Browse files
author
Nagasai Vegur
authored
Soccer field and goals creation for Mujoco simulator (#2158)
* update: removed compiled-nn dependency from vision * feat: added base soccer field and goals * update: converted cylinders using replicate from mujoco xml and removed unused images from textures * format: formatted xml files based on editor config rules * fix: z-index of field surface * fix: made ground to intersect with field to avoid z-fighting
1 parent 7e6f3a0 commit 0dc9572

6 files changed

Lines changed: 233 additions & 65 deletions

File tree

tools/mujoco-simulator/mujoco-simulator/K1/K1.xml

Lines changed: 136 additions & 63 deletions
Large diffs are not rendered by default.

tools/mujoco-simulator/mujoco-simulator/K1/ball.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@
1717
<body pos="2 -1 2.0" name="ball">
1818
<joint name="ball_free_joint" type="free" limited="false" actuatorfrclimited="false" />
1919

20-
<geom name="ball" type="sphere" size="0.095" mass="0.450" solref="0.08 0.25" priority="1" rgba="1 1 1 0" />
20+
<geom name="ball" type="sphere" size="0.095" mass="0.450" solref="0.08 0.25" priority="1"
21+
rgba="1 1 1 0" />
2122

22-
<geom name="ball_visual" type="mesh" size="0.095" mesh="ball" mass="0" contype="0" conaffinity="0" material="ball" />
23+
<geom name="ball_visual" type="mesh" size="0.095" mesh="ball" mass="0" contype="0"
24+
conaffinity="0" material="ball" />
2325
</body>
2426
</worldbody>
2527
</mujoco>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<mujoco model="field">
2+
<asset>
3+
<texture
4+
name="field_full_normal"
5+
type="2d"
6+
file="field_full_normal.png"
7+
/>
8+
<texture
9+
name="field_full_base_color"
10+
type="2d"
11+
file="field_full_base_color.png"
12+
/>
13+
<material name="field">
14+
<layer texture="field_full_normal" role="rgb" />
15+
<layer texture="field_full_base_color" role="rgb" />
16+
</material>
17+
</asset>
18+
<worldbody>
19+
<body name="field" pos="0 0 -0.01">
20+
<geom name="field_ground" type="box" size="5.2 3.7 0.01" material="field" />
21+
</body>
22+
<body name="left_goal" pos="-4.5 0 0">
23+
<include file="goal.xml" />
24+
</body>
25+
<body name="right_goal" pos="4.5 0 0" euler="0 0 3.14159">
26+
<include file="goal.xml" />
27+
</body>
28+
</worldbody>
29+
</mujoco>
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<body name="goal">
2+
<!-- Frame -->
3+
<!-- Back -->
4+
<geom type="cylinder" size="0.01 0.4" pos="-0.4 -0.8 0.4" rgba="1 1 1 1" />
5+
<geom type="cylinder" size="0.01 0.4" pos="-0.4 0.8 0.4" rgba="1 1 1 1" />
6+
<geom type="capsule" size="0.01 0.8" pos="-0.4 0 0.01" rgba="1 1 1 1" euler="1.57079 0 0" />
7+
<geom type="capsule" size="0.01 0.8" pos="-0.4 0 0.8" rgba="1 1 1 1" euler="1.57079 0 0" />
8+
<!-- Connectors -->
9+
<geom type="cylinder" size="0.01 0.2" pos="-0.2 -0.8 0.01" rgba="1 1 1 1"
10+
euler="1.57079 1.57079 0" />
11+
<geom type="cylinder" size="0.01 0.2" pos="-0.2 0.8 0.01" rgba="1 1 1 1" euler="1.57079 1.57079 0" />
12+
<geom type="cylinder" size="0.01 0.2" pos="-0.2 -0.8 0.8" rgba="1 1 1 1" euler="1.57079 1.57079 0" />
13+
<geom type="cylinder" size="0.01 0.2" pos="-0.2 0.8 0.8" rgba="1 1 1 1" euler="1.57079 1.57079 0" />
14+
<!-- Front -->
15+
<geom type="cylinder" size="0.05 0.4" pos="0 -0.8 0.4" rgba="1 1 1 1" />
16+
<geom type="cylinder" size="0.05 0.4" pos="0 0.8 0.4" rgba="1 1 1 1" />
17+
<geom type="capsule" size="0.05 0.8" pos="0 0 0.8" rgba="1 1 1 1" euler="1.57079 0 0" />
18+
<!-- Net -->
19+
<!-- Back -->
20+
<!-- Vertical -->
21+
<replicate count="15" offset="0 0.1 0">
22+
<geom type="cylinder" size="0.001 0.4" pos="-0.4 -0.7 0.4" rgba="1 1 1 1" />
23+
</replicate>
24+
<!-- Horizontal -->
25+
<replicate count="6" offset="0 0 0.1">
26+
<geom type="cylinder" size="0.001 0.8" pos="-0.4 0 0.2" rgba="1 1 1 1" euler="1.57079 0 0" />
27+
</replicate>
28+
<!-- Left -->
29+
<!-- Vertical -->
30+
<replicate count="4" offset="0.1 0 0">
31+
<geom type="cylinder" size="0.001 0.4" pos="-0.3 0.8 0.4" rgba="1 1 1 1" />
32+
</replicate>
33+
<!-- Horizontal -->
34+
<replicate count="6" offset="0 0 0.1">
35+
<geom type="cylinder" size="0.001 0.2" pos="-0.2 0.8 0.2" rgba="1 1 1 1"
36+
euler="1.57079 1.57079 0" />
37+
</replicate>
38+
<!-- Right -->
39+
<!-- Vertical -->
40+
<replicate count="4" offset="0.1 0 0">
41+
<geom type="cylinder" size="0.001 0.4" pos="-0.3 -0.8 0.4" rgba="1 1 1 1" />
42+
</replicate>
43+
<!-- Horizontal -->
44+
<replicate count="6" offset="0 0 0.1">
45+
<geom type="cylinder" size="0.001 0.2" pos="-0.2 -0.8 0.2" rgba="1 1 1 1"
46+
euler="1.57079 1.57079 0" />
47+
</replicate>
48+
<!-- Top -->
49+
<!-- Vertical -->
50+
<replicate count="3" offset="0.1 0 0">
51+
<geom type="cylinder" size="0.001 0.8" pos="-0.3 0 0.8" rgba="1 1 1 1" euler="1.57079 0 0" />
52+
</replicate>
53+
<!-- Horizontal -->
54+
<replicate count="15" offset="0 0.1 0">
55+
<geom type="cylinder" size="0.001 0.2" pos="-0.2 -0.7 0.8" rgba="1 1 1 1"
56+
euler="1.57079 1.57079 0" />
57+
</replicate>
58+
</body>
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)