Rename `actuatorforcerange and actuatorforcelimited, to actuatorfrcrange and actuatorfrclimited`, respectively.
PiperOrigin-RevId: 556780590 Change-Id: Ide12cf390920f9efe6f79cc9f864a480ce5f256d
This commit is contained in:
committed by
Copybara-Service
parent
abfa08f6cd
commit
a276c49c30
@@ -2339,14 +2339,14 @@ unit quaternions.
|
||||
attribute is "auto", and :at:`autolimits` is set in :ref:`compiler <compiler>`, joint limits will be enabled
|
||||
if range is defined.
|
||||
|
||||
.. _body-joint-actuatorforcelimited:
|
||||
.. _body-joint-actuatorfrclimited:
|
||||
|
||||
:at:`actuatorforcelimited`: :at-val:`[false, true, auto], "auto"`
|
||||
:at:`actuatorfrclimited`: :at-val:`[false, true, auto], "auto"`
|
||||
This attribute specifies whether actuator forces acting on the joint should be clamped. See :ref:`CForceRange` for
|
||||
details. It is available only for scalar joints (hinge and slider) and ignored for ball and free joints. |br| This
|
||||
attribute interacts with the actuatorforcerange attribute below. If this attribute is "false", actuator force
|
||||
attribute interacts with the actuatorfrcrange attribute below. If this attribute is "false", actuator force
|
||||
clamping is disabled. If it is "true", actuator force clamping is enabled. If this attribute is "auto", and
|
||||
:at:`autolimits` is set in :ref:`compiler <compiler>`, actuator force clamping will be enabled if actuatorforcerange
|
||||
:at:`autolimits` is set in :ref:`compiler <compiler>`, actuator force clamping will be enabled if actuatorfrcrange
|
||||
is defined.
|
||||
|
||||
.. _body-joint-solreflimit:
|
||||
@@ -2380,12 +2380,12 @@ unit quaternions.
|
||||
|br| Setting this attribute without specifying :at:`limited` is an error, unless :at:`autolimits` is set in
|
||||
:ref:`compiler <compiler>`.
|
||||
|
||||
.. _body-joint-actuatorforcerange:
|
||||
.. _body-joint-actuatorfrcrange:
|
||||
|
||||
:at:`actuatorforcerange`: :at-val:`real(2), "0 0"`
|
||||
:at:`actuatorfrcrange`: :at-val:`real(2), "0 0"`
|
||||
Range for clamping total actuator forces acting on this joint. See :ref:`CForceRange` for details. It is available
|
||||
only for scalar joints (hinge and slider) and ignored for ball and free joints. |br| The compiler expects the first
|
||||
value to be smaller than the second value. |br| Setting this attribute without specifying :at:`actuatorforcelimited`
|
||||
value to be smaller than the second value. |br| Setting this attribute without specifying :at:`actuatorfrclimited`
|
||||
is an error, unless :at:`compiler-autolimits` is set.
|
||||
|
||||
.. _body-joint-margin:
|
||||
@@ -6417,7 +6417,7 @@ if omitted.
|
||||
|
||||
.. _default-joint-limited:
|
||||
|
||||
.. _default-joint-actuatorforcelimited:
|
||||
.. _default-joint-actuatorfrclimited:
|
||||
|
||||
.. _default-joint-solreflimit:
|
||||
|
||||
@@ -6431,7 +6431,7 @@ if omitted.
|
||||
|
||||
.. _default-joint-range:
|
||||
|
||||
.. _default-joint-actuatorforcerange:
|
||||
.. _default-joint-actuatorfrcrange:
|
||||
|
||||
.. _default-joint-margin:
|
||||
|
||||
|
||||
+4
-4
@@ -274,9 +274,9 @@
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`pos<body-joint-pos>` | :ref:`axis<body-joint-axis>` | :ref:`springdamper<body-joint-springdamper>` | :ref:`limited<body-joint-limited>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`actuatorforcelimited<body-joint-actuatorforcelimited>` | :ref:`solreflimit<body-joint-solreflimit>` | :ref:`solimplimit<body-joint-solimplimit>` | :ref:`solreffriction<body-joint-solreffriction>` | |
|
||||
| | | | :ref:`actuatorfrclimited<body-joint-actuatorfrclimited>` | :ref:`solreflimit<body-joint-solreflimit>` | :ref:`solimplimit<body-joint-solimplimit>` | :ref:`solreffriction<body-joint-solreffriction>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`solimpfriction<body-joint-solimpfriction>` | :ref:`stiffness<body-joint-stiffness>` | :ref:`range<body-joint-range>` | :ref:`actuatorforcerange<body-joint-actuatorforcerange>` | |
|
||||
| | | | :ref:`solimpfriction<body-joint-solimpfriction>` | :ref:`stiffness<body-joint-stiffness>` | :ref:`range<body-joint-range>` | :ref:`actuatorfrcrange<body-joint-actuatorfrcrange>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`margin<body-joint-margin>` | :ref:`ref<body-joint-ref>` | :ref:`springref<body-joint-springref>` | :ref:`armature<body-joint-armature>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
@@ -1138,11 +1138,11 @@
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`type<default-joint-type>` | :ref:`group<default-joint-group>` | :ref:`pos<default-joint-pos>` | :ref:`axis<default-joint-axis>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`springdamper<default-joint-springdamper>` | :ref:`limited<default-joint-limited>` | :ref:`actuatorforcelimited<default-joint-actuatorforcelimited>` | :ref:`solreflimit<default-joint-solreflimit>` | |
|
||||
| | | | :ref:`springdamper<default-joint-springdamper>` | :ref:`limited<default-joint-limited>` | :ref:`actuatorfrclimited<default-joint-actuatorfrclimited>` | :ref:`solreflimit<default-joint-solreflimit>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`solimplimit<default-joint-solimplimit>` | :ref:`solreffriction<default-joint-solreffriction>` | :ref:`solimpfriction<default-joint-solimpfriction>` | :ref:`stiffness<default-joint-stiffness>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`range<default-joint-range>` | :ref:`actuatorforcerange<default-joint-actuatorforcerange>` | :ref:`margin<default-joint-margin>` | :ref:`ref<default-joint-ref>` | |
|
||||
| | | | :ref:`range<default-joint-range>` | :ref:`actuatorfrcrange<default-joint-actuatorfrcrange>` | :ref:`margin<default-joint-margin>` | :ref:`ref<default-joint-ref>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`springref<default-joint-springref>` | :ref:`armature<default-joint-armature>` | :ref:`damping<default-joint-damping>` | :ref:`frictionloss<default-joint-frictionloss>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
|
||||
+4
-1
@@ -12,6 +12,9 @@ General
|
||||
the exact formula rather than with Euler integration.
|
||||
#. Added an actuator attribute, :ref:`actearly<actuator-general-actearly>`, which uses semi-implicit integration for
|
||||
actuator forces: using the next step's actuator state to compute the current actuator forces at the current timestep.
|
||||
#. Renamed ``actuatorforcerange`` and ``actuatorforcelimited``, introduced in the previous version to
|
||||
:ref:`actuatorfrcrange<body-joint-actuatorfrcrange>` and
|
||||
:ref:`actuatorfrclimited<body-joint-actuatorfrclimied>`, respectively.
|
||||
|
||||
Python bindings
|
||||
^^^^^^^^^^^^^^^
|
||||
@@ -26,7 +29,7 @@ General
|
||||
^^^^^^^
|
||||
|
||||
1. Added primitive collider for sphere-cylinder contacts, previously this pair used the generic convex-convex collider.
|
||||
#. Added :ref:`joint-actuatorforcerange<body-joint-actuatorforcerange>` for clamping total actuator force at joints and
|
||||
#. Added :ref:`joint-actuatorforcerange<body-joint-actuatorfrcrange>` for clamping total actuator force at joints and
|
||||
:ref:`sensor-jointactuatorfrc<sensor-jointactuatorfrc>` for measuring total actuation force applied at a joint. The
|
||||
most important use case for joint-level actuator force clamping is to ensure that
|
||||
:ref:`Cartesian actuator<actuator-general-refsite>` forces are realizable by individual motors at the joints.
|
||||
|
||||
+1
-1
@@ -607,7 +607,7 @@ Force clamping at actuator output with :ref:`forcerange<actuator-general-forcera
|
||||
:ref:`position actuators<actuator-position>`, to keep the forces within bounds. Note that position actuators
|
||||
usually also require control range clamping to avoid hitting joint limits.
|
||||
|
||||
Force clamping at joint input with :ref:`joint/actuatorforcerange<body-joint-actuatorforcerange>`:
|
||||
Force clamping at joint input with :ref:`joint/actuatorfrcrange<body-joint-actuatorfrcrange>`:
|
||||
This joint attribute clamps input forces from all actuators acting on the joint, after passing through the
|
||||
:ref:`transmission<geTransmission>`. Clamping actuator forces at the joint is equivalent to clamping them at the
|
||||
actuator if the transmission is trivial (there is a one-to-one relationship between the actuator and the joint).
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
</asset>
|
||||
|
||||
<default>
|
||||
<joint damping=".03" actuatorforcerange="-0.5 0.5"/>
|
||||
<joint damping=".03" actuatorfrcrange="-0.5 0.5"/>
|
||||
<default class="wheel">
|
||||
<geom type="cylinder" size=".03 .01" rgba=".5 .5 1 1"/>
|
||||
</default>
|
||||
|
||||
@@ -140,8 +140,8 @@ static const char* MJCF[nMJCF][mjXATTRNUM] = {
|
||||
{"material", "?", "8", "texture", "emission", "specular", "shininess",
|
||||
"reflectance", "rgba", "texrepeat", "texuniform"},
|
||||
{"joint", "?", "21", "type", "group", "pos", "axis", "springdamper",
|
||||
"limited", "actuatorforcelimited", "solreflimit", "solimplimit",
|
||||
"solreffriction", "solimpfriction", "stiffness", "range", "actuatorforcerange",
|
||||
"limited", "actuatorfrclimited", "solreflimit", "solimplimit",
|
||||
"solreffriction", "solimpfriction", "stiffness", "range", "actuatorfrcrange",
|
||||
"margin", "ref", "springref", "armature", "damping", "frictionloss", "user"},
|
||||
{"geom", "?", "31", "type", "pos", "quat", "contype", "conaffinity", "condim",
|
||||
"group", "priority", "size", "material", "friction", "mass", "density",
|
||||
@@ -239,9 +239,9 @@ static const char* MJCF[nMJCF][mjXATTRNUM] = {
|
||||
{"inertial", "?", "9", "pos", "quat", "mass", "diaginertia",
|
||||
"axisangle", "xyaxes", "zaxis", "euler", "fullinertia"},
|
||||
{"joint", "*", "23", "name", "class", "type", "group", "pos", "axis",
|
||||
"springdamper", "limited", "actuatorforcelimited",
|
||||
"springdamper", "limited", "actuatorfrclimited",
|
||||
"solreflimit", "solimplimit", "solreffriction", "solimpfriction",
|
||||
"stiffness", "range", "actuatorforcerange", "margin", "ref", "springref",
|
||||
"stiffness", "range", "actuatorfrcrange", "margin", "ref", "springref",
|
||||
"armature", "damping", "frictionloss", "user"},
|
||||
{"freejoint", "*", "2", "name", "group"},
|
||||
{"geom", "*", "33", "name", "class", "type", "contype", "conaffinity", "condim",
|
||||
@@ -1318,7 +1318,7 @@ void mjXReader::OneJoint(XMLElement* elem, mjCJoint* pjoint) {
|
||||
pjoint->type = (mjtJoint)n;
|
||||
}
|
||||
MapValue(elem, "limited", &pjoint->limited, TFAuto_map, 3);
|
||||
MapValue(elem, "actuatorforcelimited", &pjoint->actfrclimited, TFAuto_map, 3);
|
||||
MapValue(elem, "actuatorfrclimited", &pjoint->actfrclimited, TFAuto_map, 3);
|
||||
ReadAttrInt(elem, "group", &pjoint->group);
|
||||
ReadAttr(elem, "solreflimit", mjNREF, pjoint->solref_limit, text, false, false);
|
||||
ReadAttr(elem, "solimplimit", mjNIMP, pjoint->solimp_limit, text, false, false);
|
||||
@@ -1329,7 +1329,7 @@ void mjXReader::OneJoint(XMLElement* elem, mjCJoint* pjoint) {
|
||||
ReadAttr(elem, "springdamper", 2, pjoint->springdamper, text);
|
||||
ReadAttr(elem, "stiffness", 1, &pjoint->stiffness, text);
|
||||
ReadAttr(elem, "range", 2, pjoint->range, text);
|
||||
ReadAttr(elem, "actuatorforcerange", 2, pjoint->actfrcrange, text);
|
||||
ReadAttr(elem, "actuatorfrcrange", 2, pjoint->actfrcrange, text);
|
||||
ReadAttr(elem, "margin", 1, &pjoint->margin, text);
|
||||
ReadAttr(elem, "ref", 1, &pjoint->ref, text);
|
||||
ReadAttr(elem, "springref", 1, &pjoint->springref, text);
|
||||
|
||||
@@ -228,7 +228,7 @@ void mjXWriter::OneJoint(XMLElement* elem, mjCJoint* pjoint, mjCDef* def) {
|
||||
bool afrange_defined = pjoint->actfrcrange[0]!=0 || pjoint->actfrcrange[1]!=0;
|
||||
bool aflimited_inferred = def->joint.actfrclimited==2 && pjoint->actfrclimited==afrange_defined;
|
||||
if (writingdefaults || !aflimited_inferred) {
|
||||
WriteAttrKey(elem, "actutorforcelimited", TFAuto_map, 3,
|
||||
WriteAttrKey(elem, "actuatorfrclimited", TFAuto_map, 3,
|
||||
pjoint->actfrclimited, def->joint.actfrclimited);
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ void mjXWriter::OneJoint(XMLElement* elem, mjCJoint* pjoint, mjCDef* def) {
|
||||
WriteAttr(elem, "solimpfriction", mjNIMP, pjoint->solimp_friction, def->joint.solimp_friction);
|
||||
WriteAttr(elem, "stiffness", 1, &pjoint->stiffness, &def->joint.stiffness);
|
||||
WriteAttr(elem, "range", 2, pjoint->range, def->joint.range);
|
||||
WriteAttr(elem, "actuatorforcerange", 2, pjoint->actfrcrange, def->joint.actfrcrange);
|
||||
WriteAttr(elem, "actuatorfrcrange", 2, pjoint->actfrcrange, def->joint.actfrcrange);
|
||||
WriteAttr(elem, "margin", 1, &pjoint->margin, &def->joint.margin);
|
||||
WriteAttr(elem, "armature", 1, &pjoint->armature, &def->joint.armature);
|
||||
WriteAttr(elem, "damping", 1, &pjoint->damping, &def->joint.damping);
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
<geom type="plane" size="1 1 .01"/>
|
||||
<light pos="0 0 2"/>
|
||||
<body pos="0 0 .3">
|
||||
<joint name="hinge" damping=".01" actuatorforcerange="-.4 .4"/>
|
||||
<joint name="hinge" damping=".01" actuatorfrcrange="-.4 .4"/>
|
||||
<geom type="capsule" size=".01" fromto="0 0 0 .2 0 0"/>
|
||||
<geom size=".03" pos=".2 0 0"/>
|
||||
</body>
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@
|
||||
commands is achievable by individual joint actuators with the specified torque limits.
|
||||
See https://mujoco.readthedocs.io/en/latest//modeling.html#actuator-force-clamping
|
||||
-->
|
||||
<joint stiffness="1e-1" actuatorforcerange="-1 1"/>
|
||||
<joint stiffness="1e-1" actuatorfrcrange="-1 1"/>
|
||||
<site type="box" size=".012 .012 .012" rgba=".7 .7 .8 1"/>
|
||||
</default>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user