Skip to content

Commit 620ab9b

Browse files
yuvaltassacopybara-github
authored andcommitted
Add kv damping attribute to position and intvelocity actuator shortcuts.
PiperOrigin-RevId: 588377097 Change-Id: I07d856807ab95166c02dd90dcd4ed62af4eefd60
1 parent bce984a commit 620ab9b

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

dm_control/mjcf/schema.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,7 @@
439439
<attribute name="cranklength" type="float"/>
440440
<attribute name="user" type="array" array_type="float"/>
441441
<attribute name="kp" type="float"/>
442+
<attribute name="kv" type="float"/>
442443
</attributes>
443444
</element>
444445
<element name="velocity">
@@ -466,6 +467,7 @@
466467
<attribute name="cranklength" type="float"/>
467468
<attribute name="user" type="array" array_type="float"/>
468469
<attribute name="kp" type="float"/>
470+
<attribute name="kv" type="float"/>
469471
</attributes>
470472
</element>
471473
<element name="damper">
@@ -742,6 +744,7 @@
742744
<attribute name="cranklength" type="float"/>
743745
<attribute name="user" type="array" array_type="float"/>
744746
<attribute name="kp" type="float"/>
747+
<attribute name="kv" type="float"/>
745748
</attributes>
746749
</element>
747750
<element name="velocity">
@@ -767,6 +770,7 @@
767770
<attribute name="cranklength" type="float"/>
768771
<attribute name="user" type="array" array_type="float"/>
769772
<attribute name="kp" type="float"/>
773+
<attribute name="kv" type="float"/>
770774
</attributes>
771775
</element>
772776
<element name="damper">
@@ -1965,6 +1969,7 @@
19651969
<attribute name="refsite" type="reference" reference_namespace="site"/>
19661970
<attribute name="user" type="array" array_type="float"/>
19671971
<attribute name="kp" type="float"/>
1972+
<attribute name="kv" type="float"/>
19681973
</attributes>
19691974
</element>
19701975
<element name="velocity" repeated="true" namespace="actuator">
@@ -2012,6 +2017,7 @@
20122017
<attribute name="refsite" type="reference" reference_namespace="site"/>
20132018
<attribute name="user" type="array" array_type="float"/>
20142019
<attribute name="kp" type="float"/>
2020+
<attribute name="kv" type="float"/>
20152021
</attributes>
20162022
</element>
20172023
<element name="damper" repeated="true" namespace="actuator">

dm_control/mjcf/traversal_utils_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ def test_resolve_actuator_defaults(self):
155155
self.assert_same_attributes(position, dict(
156156
joint=joint,
157157
kp=0.1,
158+
kv=0.2,
158159
forcelimited='true',
159160
forcerange=[-2, 3]))
160161

0 commit comments

Comments
 (0)