Add <damper> actuator shortcut and related mjGAIN_AFFINE.
**Rationale** A general `mjGAIN_AFFINE` actuator adds the term `force = (c + kp * length + kv * velocity) * ctrl`. The damper shortcut restricts it to `kv * velocity * ctrl` and sets the `ctrllimited` attribute to true. **API** ```xml <actuator> <damper ctrlrange="0 1" kv="1"/> </actuator> ``` * Required attributes: `ctrlrange` (>=0) * Optional attributes: `kv` (>=0) PiperOrigin-RevId: 455366866 Change-Id: I88773abbeccabb6442f215c9fc05e205df63f692
This commit is contained in:
committed by
Copybara-Service
parent
e0b6ba4a13
commit
307cf692e5
+71
-8
@@ -412,6 +412,17 @@ if present, the parser ignores it. The symbols in the second column of the table
|
||||
| | | | :at:`actrange` | | | |
|
||||
| | | +-------------------------+-------------------------+-------------------------+ |
|
||||
+--------------------------+----+------------------------------------------------------------------------------------+
|
||||
| |_2|:el:`damper` | ? | .. table:: |
|
||||
| | | :class: mjcf-attributes |
|
||||
| | | |
|
||||
| | | +-------------------------+-------------------------+-------------------------+ |
|
||||
| | | | :at:`ctrllimited` | :at:`forcelimited` | :at:`ctrlrange` | |
|
||||
| | | +-------------------------+-------------------------+-------------------------+ |
|
||||
| | | | :at:`forcerange` | :at:`gear` | :at:`cranklength` | |
|
||||
| | | +-------------------------+-------------------------+-------------------------+ |
|
||||
| | | | :at:`user` | :at:`group` | :at:`kv` | |
|
||||
| | | +-------------------------+-------------------------+-------------------------+ |
|
||||
+--------------------------+----+------------------------------------------------------------------------------------+
|
||||
| |_2|:el:`cylinder` | ? | .. table:: |
|
||||
| | | :class: mjcf-attributes |
|
||||
| | | |
|
||||
@@ -991,6 +1002,23 @@ if present, the parser ignores it. The symbols in the second column of the table
|
||||
| | | | :at:`kp` | | | |
|
||||
| | | +-------------------------+-------------------------+-------------------------+ |
|
||||
+--------------------------+----+------------------------------------------------------------------------------------+
|
||||
| |_2|:el:`damper` | \* | .. table:: |
|
||||
| | | :class: mjcf-attributes |
|
||||
| | | |
|
||||
| | | +-------------------------+-------------------------+-------------------------+ |
|
||||
| | | | :at:`name` | :at:`class` | :at:`group` | |
|
||||
| | | +-------------------------+-------------------------+-------------------------+ |
|
||||
| | | | :at:`ctrllimited` | :at:`forcelimited` | :at:`ctrlrange` | |
|
||||
| | | +-------------------------+-------------------------+-------------------------+ |
|
||||
| | | | :at:`forcerange` | :at:`lengthrange` | :at:`gear` | |
|
||||
| | | +-------------------------+-------------------------+-------------------------+ |
|
||||
| | | | :at:`cranklength` | :at:`user` | :at:`joint` | |
|
||||
| | | +-------------------------+-------------------------+-------------------------+ |
|
||||
| | | | :at:`jointinparent` | :at:`tendon` | :at:`slidersite` | |
|
||||
| | | +-------------------------+-------------------------+-------------------------+ |
|
||||
| | | | :at:`cranksite` | :at:`site` | :at:`kv` | |
|
||||
| | | +-------------------------+-------------------------+-------------------------+ |
|
||||
+--------------------------+----+------------------------------------------------------------------------------------+
|
||||
| |_2|:el:`cylinder` | \* | .. table:: |
|
||||
| | | :class: mjcf-attributes |
|
||||
| | | |
|
||||
@@ -2328,6 +2356,14 @@ slidersite, cranksite.
|
||||
All :ref:`intvelocity <intvelocity>` attributes are available here except: name, class, joint, jointinparent, site, tendon,
|
||||
slidersite, cranksite.
|
||||
|
||||
.. _default-damper:
|
||||
|
||||
:el-prefix:`default/` **damper** (?)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
All :ref:`damper <damper>` attributes are available here except: name, class, joint, jointinparent, site, tendon,
|
||||
slidersite, cranksite.
|
||||
|
||||
.. _default-cylinder:
|
||||
|
||||
:el-prefix:`default/` **cylinder** (?)
|
||||
@@ -4401,7 +4437,6 @@ gaintype fixed gainprm kv 0 0
|
||||
biastype affine biasprm 0 0 -kv
|
||||
========= ======= ========= =======
|
||||
|
||||
|
||||
This element has one custom attribute in addition to the common attributes:
|
||||
|
||||
.. |actuator/velocity attrib list| replace::
|
||||
@@ -4423,13 +4458,14 @@ This element creates an integrated-velocity servo. For more information, see the
|
||||
:ref:`Activation clamping <CActRange>` section of the Modeling chapter. The underlying
|
||||
:el:`general` attributes are set as follows:
|
||||
|
||||
========= =========== ========= =======
|
||||
Attribute Setting Attribute Setting
|
||||
========= =========== ========= =======
|
||||
dyntype integrator dynprm 1 0 0
|
||||
gaintype fixed gainprm kp 0 0
|
||||
biastype affine biasprm 0 -kp 0
|
||||
========= =========== ========= =======
|
||||
========== =========== ========= =======
|
||||
Attribute Setting Attribute Setting
|
||||
========== =========== ========= =======
|
||||
dyntype integrator dynprm 1 0 0
|
||||
gaintype fixed gainprm kp 0 0
|
||||
biastype affine biasprm 0 -kp 0
|
||||
actlimited true
|
||||
========== =========== ========= =======
|
||||
|
||||
This element has one custom attribute in addition to the common attributes:
|
||||
|
||||
@@ -4443,6 +4479,33 @@ This element has one custom attribute in addition to the common attributes:
|
||||
:at:`kp`: :at-val:`real, "1"`
|
||||
Position feedback gain.
|
||||
|
||||
.. _damper:
|
||||
|
||||
:el-prefix:`actuator/` **damper** (*)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
This element is an active damper which produces a force proportional to both velocity and control: ``F = - kv * velocity * control``, where ``kv`` must be nonnegative. :at:`ctrlrange` is required and must also be nonnegative. The underlying :el:`general` attributes are set as follows:
|
||||
|
||||
=========== ======= ========= =======
|
||||
Attribute Setting Attribute Setting
|
||||
=========== ======= ========= =======
|
||||
dyntype none dynprm 1 0 0
|
||||
gaintype affine gainprm 0 0 kv
|
||||
biastype none biasprm 0 0 0
|
||||
ctrllimited true
|
||||
=========== ======= ========= =======
|
||||
|
||||
|
||||
This element has one custom attribute in addition to the common attributes:
|
||||
|
||||
.. |actuator/damper attrib list| replace::
|
||||
:at:`name`, :at:`class`, :at:`group`, :at:`ctrllimited`, :at:`forcelimited`, :at:`ctrlrange`, :at:`forcerange`, :at:`lengthrange`, :at:`gear`, :at:`cranklength`, :at:`joint`, :at:`jointinparent`, :at:`tendon`, :at:`cranksite`, :at:`slidersite`, :at:`site`, :at:`user`
|
||||
|
||||
|actuator/damper attrib list|
|
||||
Same as in actuator/ :ref:`general <general>`.
|
||||
:at:`kv`: :at-val:`real, "1"`
|
||||
Velocity feedback gain.
|
||||
|
||||
.. _cylinder:
|
||||
|
||||
:el-prefix:`actuator/` **cylinder** (*)
|
||||
|
||||
Reference in New Issue
Block a user