Skip to content

Commit

Permalink
Add kv damping attribute to position and intvelocity actuator s…
Browse files Browse the repository at this point in the history
…hortcuts.

PiperOrigin-RevId: 588377097
Change-Id: I07d856807ab95166c02dd90dcd4ed62af4eefd60
  • Loading branch information
yuvaltassa authored and copybara-github committed Dec 6, 2023
1 parent bce984a commit 620ab9b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dm_control/mjcf/schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@
<attribute name="cranklength" type="float"/>
<attribute name="user" type="array" array_type="float"/>
<attribute name="kp" type="float"/>
<attribute name="kv" type="float"/>
</attributes>
</element>
<element name="velocity">
Expand Down Expand Up @@ -466,6 +467,7 @@
<attribute name="cranklength" type="float"/>
<attribute name="user" type="array" array_type="float"/>
<attribute name="kp" type="float"/>
<attribute name="kv" type="float"/>
</attributes>
</element>
<element name="damper">
Expand Down Expand Up @@ -742,6 +744,7 @@
<attribute name="cranklength" type="float"/>
<attribute name="user" type="array" array_type="float"/>
<attribute name="kp" type="float"/>
<attribute name="kv" type="float"/>
</attributes>
</element>
<element name="velocity">
Expand All @@ -767,6 +770,7 @@
<attribute name="cranklength" type="float"/>
<attribute name="user" type="array" array_type="float"/>
<attribute name="kp" type="float"/>
<attribute name="kv" type="float"/>
</attributes>
</element>
<element name="damper">
Expand Down Expand Up @@ -1965,6 +1969,7 @@
<attribute name="refsite" type="reference" reference_namespace="site"/>
<attribute name="user" type="array" array_type="float"/>
<attribute name="kp" type="float"/>
<attribute name="kv" type="float"/>
</attributes>
</element>
<element name="velocity" repeated="true" namespace="actuator">
Expand Down Expand Up @@ -2012,6 +2017,7 @@
<attribute name="refsite" type="reference" reference_namespace="site"/>
<attribute name="user" type="array" array_type="float"/>
<attribute name="kp" type="float"/>
<attribute name="kv" type="float"/>
</attributes>
</element>
<element name="damper" repeated="true" namespace="actuator">
Expand Down
1 change: 1 addition & 0 deletions dm_control/mjcf/traversal_utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ def test_resolve_actuator_defaults(self):
self.assert_same_attributes(position, dict(
joint=joint,
kp=0.1,
kv=0.2,
forcelimited='true',
forcerange=[-2, 3]))

Expand Down

0 comments on commit 620ab9b

Please sign in to comment.