Allow height-field elevation data to be specified in XML.

PiperOrigin-RevId: 602374498
Change-Id: I2d3364d68876a35799b24aca1051e2f5aebdda75
This commit is contained in:
Yuval Tassa
2024-01-29 06:58:30 -08:00
committed by Copybara-Service
parent e6847f843d
commit e143b3dbc0
16 changed files with 258 additions and 35 deletions
+12
View File
@@ -0,0 +1,12 @@
<mujoco>
<asset>
<hfield name="hfield" file="hfield.png" size="0.5 0.5 0.05 0.1"/>
<texture name="hfield" type="2d" file="hfield.png"/>
<material name="hfield" texture="hfield"/>
</asset>
<worldbody>
<light pos="-.4 .6 1"/>
<geom type="hfield" hfield="hfield" pos="-.4 .6 .05" material="hfield"/>
</worldbody>
</mujoco>
+22
View File
@@ -0,0 +1,22 @@
<mujoco>
<asset>
<hfield name="J" size="0.9 1.1 .2 .1" nrow="12" ncol="10" elevation="
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1 0 0
0 0 0 0 0 0 1 1 0 0
0 0 0 0 0 0 1 1 0 0
0 0 0 0 0 0 1 1 0 0
0 0 0 0 0 0 1 1 0 0
0 0 1 1 0 0 1 1 0 0
0 0 1 1 1 1 1 1 0 0
0 0 1 1 1 1 1 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0"/>
</asset>
<worldbody>
<light pos="0 0 1"/>
<geom type="hfield" hfield="J"/>
</worldbody>
</mujoco>
-9
View File
@@ -1,9 +0,0 @@
<mujoco>
<asset>
<hfield name="hfield" file="hfield.png" size="0.5 0.5 1 0.1"/>
</asset>
<worldbody>
<geom type="hfield" hfield="hfield" pos="-.4 .6 .05"/>
</worldbody>
</mujoco>