Allow actuators to add damping and armature to joint and tendon transmissions.

PiperOrigin-RevId: 886899849
Change-Id: I02200ee0d4f7c96096d8188b95f823b566562a30
This commit is contained in:
Yuval Tassa
2026-03-20 11:40:35 -07:00
committed by Copybara-Service
parent f7bd6d15f7
commit 510d75f4cf
25 changed files with 1164 additions and 77 deletions
+111 -8
View File
@@ -5353,6 +5353,45 @@ specify them independently.
the first element of this vector is used. The remaining elements are needed for joint, jointinparent and site
transmissions where this attribute is used to specify 3D force and torque axes.
.. _actuator-general-damping:
:at:`damping`: :at-val:`real(3), "0 0 0"`
Viscous damping coefficients, contributed by the actuator to its transmission target (joint or tendon only).
The damping value is scaled by :ref:`gear<actuator-general-gear>` squared, because the gear ratio scales both forces
and velocities, leading to reflected damping (analogous to :ref:`reflected inertia<actuator-general-armature>`).
Like :ref:`joint damping<body-joint-damping>`, coefficients correspond to linear, quadratic and cubic velocity.
See :ref:`Polynomial forces<gePolynomial>` for details.
Several actuator shortcuts have a :at:`kv` attribute which maps to :ref:`-biasprm[2]<actuator-general-biasprm>` and
has similar semantics to :at:`damping`: (e.g.,
:ref:`position/kv<actuator-position-kv>`). The differences between these attributes are:
- :at:`damping` is applied at the transmission target, and therefore includes the gear\ :sup:`2` factor. This factor
is not required for :at:`kv` as it is already applied in actuator space (so the units are identical).
- Implicit integration works for :at:`damping` when using the Euler integrator but not for :at:`kv`.
To get implicit integration for :at:`kv`, implicit or implicitfast is required, see
:ref:`Integration<CIntegrator>`.
- :at:`damping` allows for polynomial damping, while :at:`kv` is only linear.
- Damping forces generated by :at:`kv` are subject to :ref:`forcerange<actuator-general-forcerange>` clamping, but
forces generated by :at:`damping` are not.
Finally, note that while it is permitted for nonzero damping and :ref:`armature<actuator-general-armature>` to be
specified for multiple actuators acting on the same transmission target, it is more performant to specify
them for only one actuator. Since these values are summed anyway, it is recommended to place all damping and
armature for one transmission target in a single actuator definition.
.. _actuator-general-armature:
:at:`armature`: :at-val:`real, "0"`
Armature inertia (or mass for slider joints) contributed by the actuator to its transmission target (joint or tendon
only). This is the actual inertia of the spinning element inside the actuator (e.g., a rotor). The contributed value
is scaled by :ref:`gear<actuator-general-gear>` squared, because the gear ratio scales both forces and velocities,
leading to `reflected inertia <https://en.wikipedia.org/wiki/Reflective_inertia>`__. See
:ref:`joint<body-joint-armature>` and :ref:`tendon<tendon-fixed-armature>` armature for more details.
See also the note in :ref:`damping<actuator-general-damping>` regarding multiple actuators acting on the same
transmission target.
.. _actuator-general-cranklength:
:at:`cranklength`: :at-val:`real, "0"`
@@ -5596,11 +5635,15 @@ This element does not have custom attributes. It only has common attributes, whi
.. _actuator-motor-user:
.. _actuator-motor-damping:
.. _actuator-motor-armature:
.. |actuator/motor attrib list| replace::
:at:`name`, :at:`class`, :at:`group`, :at:`delay`, :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:`refsite`, :at:`user`
:at:`cranksite`, :at:`slidersite`, :at:`site`, :at:`refsite`, :at:`user`, :at:`damping`, :at:`armature`
|actuator/motor attrib list|
Same as in actuator/ :ref:`general <actuator-general>`.
@@ -5667,10 +5710,14 @@ This element has one custom attribute in addition to the common attributes:
.. _actuator-position-user:
.. _actuator-position-damping:
.. _actuator-position-armature:
.. |actuator/position attrib list| replace::
:at:`name`, :at:`class`, :at:`group`, :at:`delay`, :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:`refsite`, :at:`user`
:at:`cranksite`, :at:`slidersite`, :at:`site`, :at:`refsite`, :at:`user`, :at:`damping`, :at:`armature`
|actuator/position attrib list|
Same as in actuator/ :ref:`general <actuator-general>`.
@@ -5786,10 +5833,14 @@ This element has one custom attribute in addition to the common attributes:
.. _actuator-velocity-user:
.. _actuator-velocity-damping:
.. _actuator-velocity-armature:
.. |actuator/velocity attrib list| replace::
:at:`name`, :at:`class`, :at:`group`, :at:`delay`, :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:`refsite`, :at:`user`
:at:`cranksite`, :at:`slidersite`, :at:`site`, :at:`refsite`, :at:`user`, :at:`damping`, :at:`armature`
|actuator/velocity attrib list|
Same as in actuator/ :ref:`general <actuator-general>`.
@@ -5864,10 +5915,14 @@ This element has one custom attribute in addition to the common attributes:
.. _actuator-intvelocity-user:
.. _actuator-intvelocity-damping:
.. _actuator-intvelocity-armature:
.. |actuator/intvelocity attrib list| replace::
:at:`name`, :at:`class`, :at:`group`, :at:`delay`, :at:`ctrllimited`, :at:`forcelimited`, :at:`ctrlrange`,
:at:`forcerange`, :at:`actrange`, :at:`lengthrange`, :at:`gear`, :at:`cranklength`, :at:`joint`, :at:`jointinparent`,
:at:`tendon`, :at:`cranksite`, :at:`slidersite`, :at:`site`, :at:`refsite`, :at:`user`
:at:`tendon`, :at:`cranksite`, :at:`slidersite`, :at:`site`, :at:`refsite`, :at:`user`, :at:`damping`, :at:`armature`
|actuator/intvelocity attrib list|
Same as in actuator/ :ref:`general <actuator-general>`.
@@ -5958,10 +6013,14 @@ This element has one custom attribute in addition to the common attributes:
.. _actuator-damper-user:
.. _actuator-damper-damping:
.. _actuator-damper-armature:
.. |actuator/damper attrib list| replace::
:at:`name`, :at:`class`, :at:`group`, :at:`delay`, :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:`refsite`, :at:`user`
:at:`cranksite`, :at:`slidersite`, :at:`site`, :at:`refsite`, :at:`user`, :at:`damping`, :at:`armature`
|actuator/damper attrib list|
Same as in actuator/ :ref:`general <actuator-general>`.
@@ -6033,10 +6092,14 @@ This element has four custom attributes in addition to the common attributes:
.. _actuator-cylinder-user:
.. _actuator-cylinder-damping:
.. _actuator-cylinder-armature:
.. |actuator/cylinder attrib list| replace::
:at:`name`, :at:`class`, :at:`group`, :at:`delay`, :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:`refsite`, :at:`user`
:at:`cranksite`, :at:`slidersite`, :at:`site`, :at:`refsite`, :at:`user`, :at:`damping`, :at:`armature`
|actuator/cylinder attrib list|
Same as in actuator/ :ref:`general <actuator-general>`.
@@ -6119,11 +6182,15 @@ This element has nine custom attributes in addition to the common attributes:
.. _actuator-muscle-user:
.. _actuator-muscle-damping:
.. _actuator-muscle-armature:
.. |actuator/muscle attrib list| replace::
:at:`name`, :at:`class`, :at:`group`, :at:`delay`, :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:`user`
:at:`cranksite`, :at:`slidersite`, :at:`user`, :at:`damping`, :at:`armature`
|actuator/muscle attrib list|
Same as in actuator/ :ref:`general <actuator-general>`.
@@ -6336,11 +6403,15 @@ Associate this actuator with an :ref:`engine plugin<exPlugin>`. Either :at:`plug
.. _actuator-plugin-actearly:
.. _actuator-plugin-damping:
.. _actuator-plugin-armature:
.. |actuator/plugin attrib list| replace::
:at:`name`, :at:`class`, :at:`group`, :at:`delay`, :at:`actlimited`, :at:`ctrllimited`, :at:`forcelimited`,
:at:`ctrlrange`, :at:`forcerange`, :at:`lengthrange`, :at:`gear`, :at:`cranklength`, :at:`joint`,
:at:`jointinparent`, :at:`site`, :at:`tendon`, :at:`cranksite`, :at:`slidersite`, :at:`user`, :at:`actdim`,
:at:`dynprm`, :at:`actearly`
:at:`dynprm`, :at:`actearly`, :at:`damping`, :at:`armature`
|actuator/plugin attrib list|
Same as in actuator/ :ref:`general <actuator-general>`.
@@ -9454,6 +9525,10 @@ if omitted.
.. _default-general-gear:
.. _default-general-damping:
.. _default-general-armature:
.. _default-general-cranklength:
.. _default-general-user:
@@ -9502,6 +9577,10 @@ if omitted.
.. _default-motor-gear:
.. _default-motor-damping:
.. _default-motor-armature:
.. _default-motor-cranklength:
.. _default-motor-user:
@@ -9538,6 +9617,10 @@ tendon, slidersite, cranksite.
.. _default-position-gear:
.. _default-position-damping:
.. _default-position-armature:
.. _default-position-cranklength:
.. _default-position-user:
@@ -9577,6 +9660,10 @@ refsite, tendon, slidersite, cranksite.
.. _default-velocity-gear:
.. _default-velocity-damping:
.. _default-velocity-armature:
.. _default-velocity-cranklength:
.. _default-velocity-user:
@@ -9614,6 +9701,10 @@ refsite, tendon, slidersite, cranksite.
.. _default-intvelocity-gear:
.. _default-intvelocity-damping:
.. _default-intvelocity-armature:
.. _default-intvelocity-cranklength:
.. _default-intvelocity-user:
@@ -9649,6 +9740,10 @@ site, refsite, tendon, slidersite, cranksite.
.. _default-damper-gear:
.. _default-damper-damping:
.. _default-damper-armature:
.. _default-damper-cranklength:
.. _default-damper-user:
@@ -9682,6 +9777,10 @@ refsite, tendon, slidersite, cranksite.
.. _default-cylinder-gear:
.. _default-cylinder-damping:
.. _default-cylinder-armature:
.. _default-cylinder-cranklength:
.. _default-cylinder-user:
@@ -9721,6 +9820,10 @@ refsite, tendon, slidersite, cranksite.
.. _default-muscle-gear:
.. _default-muscle-damping:
.. _default-muscle-armature:
.. _default-muscle-cranklength:
.. _default-muscle-user: