Skip to content

Commit 9c295be

Browse files
kevinzakkacopybara-github
authored andcommitted
dm_control: Import of refs/pull/487/head
PiperOrigin-RevId: 657564508 Change-Id: I4126748fecfe2c5a81f2e2d9d186e4ec0c26e97b
1 parent 1608629 commit 9c295be

2 files changed

Lines changed: 38 additions & 0 deletions

File tree

dm_control/locomotion/walkers/rescale.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
def rescale_subtree(body, position_factor, size_factor):
2222
"""Recursively rescales an entire subtree of an MJCF model."""
2323
for child in body.all_children():
24+
if child.tag == 'sensor':
25+
continue
2426
if getattr(child, 'fromto', None) is not None:
2527
new_pos = position_factor * 0.5 * (child.fromto[3:] + child.fromto[:3])
2628
new_size = size_factor * 0.5 * (child.fromto[3:] - child.fromto[:3])

dm_control/mjcf/schema.xml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2620,6 +2620,42 @@
26202620
</element>
26212621
</children>
26222622
</element>
2623+
<element name="fromto" repeated="true" namespace="sensor">
2624+
<attributes>
2625+
<attribute name="name" type="identifier"/>
2626+
<attribute name="noise" type="float"/>
2627+
<attribute name="user" type="array" array_type="float"/>
2628+
<attribute name="cutoff" type="float"/>
2629+
<attribute name="geom1" type="reference" required="true" reference_namespace="geom"/>
2630+
<attribute name="geom2" type="reference" required="true" reference_namespace="geom"/>
2631+
<attribute name="body1" type="reference" required="true" reference_namespace="body"/>
2632+
<attribute name="body2" type="reference" required="true" reference_namespace="body"/>
2633+
</attributes>
2634+
</element>
2635+
<element name="normal" repeated="true" namespace="sensor">
2636+
<attributes>
2637+
<attribute name="name" type="identifier"/>
2638+
<attribute name="noise" type="float"/>
2639+
<attribute name="user" type="array" array_type="float"/>
2640+
<attribute name="cutoff" type="float"/>
2641+
<attribute name="geom1" type="reference" required="true" reference_namespace="geom"/>
2642+
<attribute name="geom2" type="reference" required="true" reference_namespace="geom"/>
2643+
<attribute name="body1" type="reference" required="true" reference_namespace="body"/>
2644+
<attribute name="body2" type="reference" required="true" reference_namespace="body"/>
2645+
</attributes>
2646+
</element>
2647+
<element name="distance" repeated="true" namespace="sensor">
2648+
<attributes>
2649+
<attribute name="name" type="identifier"/>
2650+
<attribute name="noise" type="float"/>
2651+
<attribute name="user" type="array" array_type="float"/>
2652+
<attribute name="cutoff" type="float"/>
2653+
<attribute name="geom1" type="reference" required="true" reference_namespace="geom"/>
2654+
<attribute name="geom2" type="reference" required="true" reference_namespace="geom"/>
2655+
<attribute name="body1" type="reference" required="true" reference_namespace="body"/>
2656+
<attribute name="body2" type="reference" required="true" reference_namespace="body"/>
2657+
</attributes>
2658+
</element>
26232659
</children>
26242660
</element>
26252661
<element name="keyframe">

0 commit comments

Comments
 (0)