Skip to content

Commit de21947

Browse files
DeepMindcopybara-github
authored andcommitted
Fix sensor/user element's attribute defaults
PiperOrigin-RevId: 514787631 Change-Id: Ibc1733a2c6bd302acfdc00f0db4044b0c3677c58
1 parent 461bed9 commit de21947

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

dm_control/mjcf/schema.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2168,10 +2168,10 @@
21682168
<attribute name="noise" type="float"/>
21692169
<attribute name="cutoff" type="float"/>
21702170
<attribute name="user" type="array" array_type="float"/>
2171-
<attribute name="objtype" type="keyword" required="true" valid_values="body joint geom site camera light mesh skin hfield texture material equality tendon actuator sensor numeric text tuple contact keyframe"/>
2172-
<attribute name="objname" type="reference" required="true" reference_namespace="attrib:objtype"/>
2173-
<attribute name="datatype" type="keyword" required="true" valid_values="real positive axis quaternion"/>
2174-
<attribute name="needstage" type="keyword" required="true" valid_values="pos vel acc"/>
2171+
<attribute name="objtype" type="keyword" valid_values="body joint geom site camera light mesh skin hfield texture material equality tendon actuator sensor numeric text tuple contact keyframe"/>
2172+
<attribute name="objname" type="reference" reference_namespace="attrib:objtype"/>
2173+
<attribute name="datatype" type="keyword" valid_values="real positive axis quaternion"/>
2174+
<attribute name="needstage" type="keyword" valid_values="pos vel acc"/>
21752175
<attribute name="dim" type="int" required="true"/>
21762176
</attributes>
21772177
</element>

dm_control/mjcf/test_assets/test_model.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<mujoco model="test">
2+
<size memory="1024"/>
23
<compiler texturedir="textures"/>
34
<asset>
45
<texture name="texture" type="cube" file="deepmind.png"/>
@@ -42,4 +43,7 @@
4243
<velocity name="b_0_0" joint="b_0_0"/>
4344
<velocity name="b_1_0" joint="b_1_0"/>
4445
</actuator>
46+
<sensor>
47+
<user name="dummy" dim="1" user="0 1 0 1" />
48+
</sensor>
4549
</mujoco>

0 commit comments

Comments
 (0)