Remove distance constraints.

- `distance` constraints were not very useful and increased the contact buffer within the constraint solver, violating a core design principle. Therefore they have been removed.
- The enum value `mjEQ_DISTANCE` is retained, but errors will be thrown in the parser and engine if these constraints are selected.

PiperOrigin-RevId: 467050101
Change-Id: Ie72a07e4fe338eea5107004a9fc0f5e47eb0c3b7
This commit is contained in:
Yuval Tassa
2022-08-11 14:30:33 -07:00
committed by Copybara-Service
parent 396fdf00c3
commit c8ff7b3d34
14 changed files with 18 additions and 263 deletions
+1 -1
View File
@@ -324,7 +324,7 @@ mjtEq
mjEQ_WELD, // fix relative position and orientation of two bodies
mjEQ_JOINT, // couple the values of two scalar joints with cubic
mjEQ_TENDON, // couple the lengths of two tendons with cubic
mjEQ_DISTANCE // fix the contact distance betweent two geoms
mjEQ_DISTANCE // unsupported, will cause an error if used
} mjtEq;
| Defined in `mjmodel.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjmodel.h>`_
+2 -14
View File
@@ -4061,20 +4061,8 @@ This element constrains the length of one tendon to be a quartic polynomial of a
:el-prefix:`equality/` **distance** (*)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This element constrains the nearest distance between two geoms. When the distance attribute is set to 0 the two geom
surfaces slide over each other, otherwise they slide over a virtual cushion with depth equal to the specified distance.
This mechanism is implemented as a modification to the collision detector. For geom pairs handled by the general-purpose
convex collider, large distance values in this constraint are handled approximately, due to the nature of the underlying
collision algorithm.
:at:`name`, :at:`class`, :at:`active`, :at:`solref`, :at:`solimp`
Same as in :ref:`connect <equality-connect>` element.
:at:`geom1`: :at-val:`string, required`
Name of the first geom.
:at:`geom2`: :at-val:`string, required`
Name of the second geom.
:at:`distance`: :at-val:`real, "0"`
Desired distance between the two geom surfaces. The constraint solver enforces this distance softly.
Distance equality constraints were removed in MuJoCo version 2.2.2. If you are using an earlier version, please switch
to the corresponding version of the documentation.
.. _tendon:
+5 -1
View File
@@ -18,9 +18,13 @@ General
inaccurate. If this occurs, open the mesh in MeshLab or Blender and recalculate the faces.
- Added ``azimuth`` and ``elevation`` attributes to :ref:`visual/global<global>`, defining the initial orientation of
the free camera at model load time.
- Added ``mjv_defaultFreeCamera`` which sets the default free camera, respecting the above attributes.
- Added ``mjv_defaultFreeCamera`` which sets the default free camera, respecting the above attributes.
- ``simulate`` now supports taking a screenshot via a button in the File section or via ``Ctrl-P``.
Deleted/deprecated features
^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Removed ``distance`` constraints.
Bug fixes
^^^^^^^^^
- Fixed rendering of some transparent geoms in reflection.