Skip to content

Commit 96dda6e

Browse files
thowellcopybara-github
authored andcommitted
Add tendon actuator force limits and tendon actuator force sensor.
PiperOrigin-RevId: 745096883 Change-Id: Ib9acb727fbbfc6b0b0323ee6a889053a7a878056
1 parent 16e49f2 commit 96dda6e

File tree

26 files changed

+464
-74
lines changed

26 files changed

+464
-74
lines changed

doc/XMLreference.rst

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4630,12 +4630,28 @@ length X, as in the clip on the right of `this example model
46304630
solver. If this attribute is "auto", and :at:`autolimits` is set in :ref:`compiler <compiler>`, length limits
46314631
will be enabled if range is defined.
46324632

4633+
.. _tendon-spatial-actuatorfrclimited:
4634+
4635+
:at:`actuatorfrclimited`: :at-val:`[false, true, auto], "auto"`
4636+
This attribute specifies whether actuator forces acting on the tendon should be clamped. See :ref:`CForceRange` for
4637+
details. This attribute interacts with the :ref:`actuatorfrcrange<tendon-spatial-actuatorfrcrange>` attribute. If
4638+
this attribute is "false", actuator force clamping is disabled. If it is "true", actuator force clamping is enabled.
4639+
If this attribute is "auto", and :at:`autolimits` is set in :ref:`compiler <compiler>`, actuator force clamping will
4640+
be enabled if :at:`actuatorfrcrange` is defined.
4641+
46334642
.. _tendon-spatial-range:
46344643

46354644
:at:`range`: :at-val:`real(2), "0 0"`
46364645
Range of allowed tendon lengths. Setting this attribute without specifying :at:`limited` is an error, unless
46374646
:at:`autolimits` is set in :ref:`compiler <compiler>`.
46384647

4648+
.. _tendon-spatial-actuatorfrcrange:
4649+
4650+
:at:`actuatorfrcrange`: :at-val:`real(2), "0 0"`
4651+
Range for clamping total actuator forces acting on this tendon. See :ref:`CForceRange` for details. The compiler
4652+
expects the lower bound to be nonpositive and the upper bound to be nonnegative. |br| Setting this attribute without
4653+
specifying :at:`actuatorfrclimited` is an error if :at:`compiler-autolimits` is "false".
4654+
46394655
.. _tendon-spatial-solreflimit:
46404656

46414657
.. _tendon-spatial-solimplimit:
@@ -4820,8 +4836,12 @@ as above.
48204836

48214837
.. _tendon-fixed-limited:
48224838

4839+
.. _tendon-fixed-actuatorfrclimited:
4840+
48234841
.. _tendon-fixed-range:
48244842

4843+
.. _tendon-fixed-actuatorfrcrange:
4844+
48254845
.. _tendon-fixed-solreflimit:
48264846

48274847
.. _tendon-fixed-solimplimit:
@@ -6385,6 +6405,33 @@ joint or when a single actuator acts on multiple joints. See :ref:`CForceRange`
63856405
The joint where actuator forces will be sensed. The sensor output is copied from ``mjData.qfrc_actuator``.
63866406

63876407

6408+
.. _sensor-tendonactuatorfrc:
6409+
6410+
:el-prefix:`sensor/` |-| **tendonactuatorfrc** (*)
6411+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6412+
6413+
This element creates an actuator force sensor, measured at a tendon. The quantity being sensed is the total force
6414+
contributed by all actuators to a single tendon. This type of sensor is important when multiple actuators act on a
6415+
single tendon. See :ref:`CForceRange` for details.
6416+
6417+
6418+
.. _sensor-tendonactuatorfrc-name:
6419+
6420+
.. _sensor-tendonactuatorfrc-noise:
6421+
6422+
.. _sensor-tendonactuatorfrc-cutoff:
6423+
6424+
.. _sensor-tendonactuatorfrc-user:
6425+
6426+
:at:`name`, :at:`noise`, :at:`cutoff`, :at:`user`
6427+
See :ref:`CSensor`.
6428+
6429+
.. _sensor-tendonactuatorfrc-tendon:
6430+
6431+
:at:`tendon`: :at-val:`string, required`
6432+
The tendon where actuator forces will be sensed.
6433+
6434+
63886435
.. _sensor-ballquat:
63896436

63906437
:el-prefix:`sensor/` |-| **ballquat** (*)
@@ -8277,8 +8324,12 @@ if omitted.
82778324

82788325
.. _default-tendon-limited:
82798326

8327+
.. _default-tendon-actuatorfrclimited:
8328+
82808329
.. _default-tendon-range:
82818330

8331+
.. _default-tendon-actuatorfrcrange:
8332+
82828333
.. _default-tendon-solreflimit:
82838334

82848335
.. _default-tendon-solimplimit:

doc/XMLschema.rst

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -621,13 +621,15 @@
621621
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
622622
| | | | :ref:`name<tendon-spatial-name>` | :ref:`class<tendon-spatial-class>` | :ref:`group<tendon-spatial-group>` | :ref:`limited<tendon-spatial-limited>` | |
623623
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
624-
| | | | :ref:`range<tendon-spatial-range>` | :ref:`solreflimit<tendon-spatial-solreflimit>` | :ref:`solimplimit<tendon-spatial-solimplimit>` | :ref:`solreffriction<tendon-spatial-solreffriction>` | |
624+
| | | | :ref:`actuatorfrclimited<tendon-spatial-actuatorfrclimited>` | :ref:`range<tendon-spatial-range>` | :ref:`actuatorfrcrange<tendon-spatial-actuatorfrcrange>` | :ref:`solreflimit<tendon-spatial-solreflimit>` | |
625625
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
626-
| | | | :ref:`solimpfriction<tendon-spatial-solimpfriction>` | :ref:`frictionloss<tendon-spatial-frictionloss>` | :ref:`springlength<tendon-spatial-springlength>` | :ref:`width<tendon-spatial-width>` | |
626+
| | | | :ref:`solimplimit<tendon-spatial-solimplimit>` | :ref:`solreffriction<tendon-spatial-solreffriction>` | :ref:`solimpfriction<tendon-spatial-solimpfriction>` | :ref:`frictionloss<tendon-spatial-frictionloss>` | |
627627
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
628-
| | | | :ref:`material<tendon-spatial-material>` | :ref:`margin<tendon-spatial-margin>` | :ref:`stiffness<tendon-spatial-stiffness>` | :ref:`damping<tendon-spatial-damping>` | |
628+
| | | | :ref:`springlength<tendon-spatial-springlength>` | :ref:`width<tendon-spatial-width>` | :ref:`material<tendon-spatial-material>` | :ref:`margin<tendon-spatial-margin>` | |
629629
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
630-
| | | | :ref:`armature<tendon-spatial-armature>` | :ref:`rgba<tendon-spatial-rgba>` | :ref:`user<tendon-spatial-user>` | | |
630+
| | | | :ref:`stiffness<tendon-spatial-stiffness>` | :ref:`damping<tendon-spatial-damping>` | :ref:`armature<tendon-spatial-armature>` | :ref:`rgba<tendon-spatial-rgba>` | |
631+
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
632+
| | | | :ref:`user<tendon-spatial-user>` | | | | |
631633
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
632634
+------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
633635
| |_2| spatial |br| |_2| |L| | | .. table:: |
@@ -657,11 +659,13 @@
657659
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
658660
| | | | :ref:`name<tendon-fixed-name>` | :ref:`class<tendon-fixed-class>` | :ref:`group<tendon-fixed-group>` | :ref:`limited<tendon-fixed-limited>` | |
659661
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
660-
| | | | :ref:`range<tendon-fixed-range>` | :ref:`solreflimit<tendon-fixed-solreflimit>` | :ref:`solimplimit<tendon-fixed-solimplimit>` | :ref:`solreffriction<tendon-fixed-solreffriction>` | |
662+
| | | | :ref:`actuatorfrclimited<tendon-fixed-actuatorfrclimited>` | :ref:`range<tendon-fixed-range>` | :ref:`actuatorfrcrange<tendon-fixed-actuatorfrcrange>` | :ref:`solreflimit<tendon-fixed-solreflimit>` | |
663+
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
664+
| | | | :ref:`solimplimit<tendon-fixed-solimplimit>` | :ref:`solreffriction<tendon-fixed-solreffriction>` | :ref:`solimpfriction<tendon-fixed-solimpfriction>` | :ref:`frictionloss<tendon-fixed-frictionloss>` | |
661665
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
662-
| | | | :ref:`solimpfriction<tendon-fixed-solimpfriction>` | :ref:`frictionloss<tendon-fixed-frictionloss>` | :ref:`springlength<tendon-fixed-springlength>` | :ref:`margin<tendon-fixed-margin>` | |
666+
| | | | :ref:`springlength<tendon-fixed-springlength>` | :ref:`margin<tendon-fixed-margin>` | :ref:`stiffness<tendon-fixed-stiffness>` | :ref:`damping<tendon-fixed-damping>` | |
663667
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
664-
| | | | :ref:`stiffness<tendon-fixed-stiffness>` | :ref:`damping<tendon-fixed-damping>` | :ref:`armature<tendon-fixed-armature>` | :ref:`user<tendon-fixed-user>` | |
668+
| | | | :ref:`armature<tendon-fixed-armature>` | :ref:`user<tendon-fixed-user>` | | | |
665669
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
666670
+------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
667671
| |_2| fixed |br| |_2| |L| | | .. table:: |
@@ -1004,6 +1008,15 @@
10041008
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
10051009
+------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
10061010
| |_| sensor |br| |_| |L| | | .. table:: |
1011+
| :ref:`tendonactuatorfrc | \* | :class: mjcf-attributes |
1012+
| <sensor-tendonactuatorfrc>` | | |
1013+
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
1014+
| | | | :ref:`name<sensor-tendonactuatorfrc-name>` | :ref:`tendon<sensor-tendonactuatorfrc-tendon>` | :ref:`cutoff<sensor-tendonactuatorfrc-cutoff>` | :ref:`noise<sensor-tendonactuatorfrc-noise>` | |
1015+
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
1016+
| | | | :ref:`user<sensor-tendonactuatorfrc-user>` | | | | |
1017+
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
1018+
+------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1019+
| |_| sensor |br| |_| |L| | | .. table:: |
10071020
| :ref:`ballquat | \* | :class: mjcf-attributes |
10081021
| <sensor-ballquat>` | | |
10091022
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |

doc/changelog.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ General
2020
bodies when saving to XML.
2121
- Added :ref:`orientation<body-composite-quat>` attribute to :ref:`composite<body-composite>`. Moreover, allow the
2222
composite to be the direct child of a frame.
23+
- Added :ref:`tendon actuator force limits<tendon-spatial-actuatorfrclimited>` and
24+
:ref:`tendon actuator force sensor<sensor-tendonactuatorfrc>`.
2325

2426
Bug fixes
2527
^^^^^^^^^

0 commit comments

Comments
 (0)