Allow more than 1 activation state per actuator, but only for dyntype user.

Fixes #305.

PiperOrigin-RevId: 486597273
Change-Id: I3eb806f60949e68ebe6cbe35a6e66218a167ed45
This commit is contained in:
Yuval Tassa
2022-11-07 01:42:18 -08:00
committed by Copybara-Service
parent 0514010928
commit 36b30e4500
20 changed files with 271 additions and 37 deletions
+2
View File
@@ -1683,6 +1683,8 @@ mjModel
int* actuator_gaintype; // gain type (mjtGain) (nu x 1)
int* actuator_biastype; // bias type (mjtBias) (nu x 1)
int* actuator_trnid; // transmission id: joint, tendon, site (nu x 2)
int* actuator_actadr; // first activation address; -1: stateless (nu x 1)
int* actuator_actnum; // number of activation variables (nu x 1)
int* actuator_group; // group for visibility (nu x 1)
mjtByte* actuator_ctrllimited; // is control limited (nu x 1)
mjtByte* actuator_forcelimited;// is force limited (nu x 1)
+5
View File
@@ -3019,6 +3019,11 @@ specify them independently.
it is defined in the kinematic tree; its orientation cannot be changed in the actuator definition.
:at:`user`: :at-val:`real(nuser_actuator), "0 ... 0"`
See :ref:`CUser`.
:at:`actdim`: :at-val:`real, "-1"`
Dimension of the activation state. The default value of ``-1`` instructs the compiler to set the dimension according
to the :at:`dyntype`. Values larger than ``1`` are only allowed for user-defined activation dynamics, as native types
require dimensions of only 0 or 1. For activation dimensions bigger than 1, the *last element* is used to generate
force.
:at:`dyntype`: :at-val:`[none, integrator, filter, muscle, user], "none"`
Activation dynamics type for the actuator. The available dynamics types were already described in the :ref:`Actuation
model <geActuation>` section. Repeating that description in somewhat different notation (corresponding to the mjModel
+7 -5
View File
@@ -340,11 +340,11 @@
| | | +-------------------------+-------------------------+-------------------------+ |
| | | | :at:`gear` | :at:`cranklength` | :at:`user` | |
| | | +-------------------------+-------------------------+-------------------------+ |
| | | | :at:`group` | :at:`dyntype` | :at:`gaintype` | |
| | | | :at:`group` | :at:`actdim` | :at:`dyntype` | |
| | | +-------------------------+-------------------------+-------------------------+ |
| | | | :at:`biastype` | :at:`dynprm` | :at:`gainprm` | |
| | | | :at:`gaintype` | :at:`biastype` | :at:`dynprm` | |
| | | +-------------------------+-------------------------+-------------------------+ |
| | | | :at:`biasprm` | | | |
| | | | :at:`gainprm` | :at:`biasprm` | | |
| | | +-------------------------+-------------------------+-------------------------+ |
+--------------------------+----+------------------------------------------------------------------------------------+
| |_2|:ref:`motor | ? | .. table:: |
@@ -979,9 +979,11 @@
| | | +-------------------------+-------------------------+-------------------------+ |
| | | | :at:`site` | :at:`refsite` | :at:`body` | |
| | | +-------------------------+-------------------------+-------------------------+ |
| | | | :at:`dyntype` | :at:`gaintype` | :at:`biastype` | |
| | | | :at:`actdim` | :at:`dyntype` | :at:`gaintype` | |
| | | +-------------------------+-------------------------+-------------------------+ |
| | | | :at:`dynprm` | :at:`gainprm` | :at:`biasprm` | |
| | | | :at:`biastype` | :at:`dynprm` | :at:`gainprm` | |
| | | +-------------------------+-------------------------+-------------------------+ |
| | | | :at:`biasprm` | | | |
| | | +-------------------------+-------------------------+-------------------------+ |
+--------------------------+----+------------------------------------------------------------------------------------+
| |_2|:ref:`motor | \* | .. table:: |
+5 -2
View File
@@ -29,8 +29,11 @@ General
- Added :ref:`mju_fill`, :ref:`mju_symmetrize` and :ref:`mju_eye` utility functions.
- Added :at:`gravcomp` attribute to :ref:`body<body>`, implementing gravity compensation and bouyancy.
See `balloons.xml <https://github.com/deepmind/mujoco/tree/main/model/balloons/balloons.xml>`_ example model.
- Renamed the cable plugin library to elasticity.
- Renamed the ``cable`` plugin library to ``elasticity``.
- Added :ref:`actdim` attribute to :ref:`general actuators<actuator-general>`. Values greater than 1 are only allowed
for dyntype :at-val:`user`, as native activation dynamics are all scalar. Added example test implementing 2nd-order
activation dynamics to
`engine_forward_test.cc <https://github.com/deepmind/mujoco/blob/main/test/engine/engine_forward_test.cc>`_.
Version 2.3.0 (October 18, 2022)
--------------------------------