Remove the particle composite (replaced by replicate).
PiperOrigin-RevId: 730089997 Change-Id: If8d18fb56ae01241e76f84dbf7951e034026d829
This commit is contained in:
committed by
Copybara-Service
parent
0fcd20f0da
commit
c52d1b3941
@@ -3010,13 +3010,6 @@ coordinates results in compiler error. See :ref:`CComposite` in the modeling gui
|
||||
parent body. Note that some types imply a grid of certain dimensionality, so the requirements for this attribute
|
||||
depend on the specified type.
|
||||
|
||||
.. _body-composite-spacing:
|
||||
|
||||
:at:`spacing`: :at-val:`real, required`
|
||||
The spacing between the centers of the grid elements. This spacing is the same in all dimensions. It should normally
|
||||
be set to a value larger than the geom size, otherwise there will be a lot of contacts in the reference model
|
||||
configuration (which is allowed but rarely desirable).
|
||||
|
||||
.. _body-composite-offset:
|
||||
|
||||
:at:`offset`: :at-val:`real(3), "0 0 0"`
|
||||
@@ -3034,16 +3027,6 @@ coordinates results in compiler error. See :ref:`CComposite` in the modeling gui
|
||||
geom shapes, but instead will set the body inertias directly and disable the automatic computation of inertia from
|
||||
geom shape for the composite body only.
|
||||
|
||||
.. _body-composite-solrefsmooth:
|
||||
|
||||
.. _body-composite-solimpsmooth:
|
||||
|
||||
:at:`solrefsmooth`, :at:`solimpsmooth`
|
||||
These are the solref and solimp attributes of the loop-closure equality constraint for loop types, and the
|
||||
smoothness-preserving equality constraint for box, cylinder and ellipsoid types. For all other types they have no
|
||||
effect. They obey the same rules as all other solref and solimp attributes in MJCF, except their defaults here are
|
||||
adjusted depending on the composite type. See :ref:`CSolver`.
|
||||
|
||||
.. _body-composite-vertex:
|
||||
|
||||
:at:`vertex`: :at-val:`real(3*nvert), optional`
|
||||
@@ -3147,73 +3130,6 @@ joints should be created, as well as to adjust the attributes of both automatic
|
||||
Same meaning as regular :ref:`joint <body-joint>` attributes.
|
||||
|
||||
|
||||
.. _composite-tendon:
|
||||
|
||||
:el-prefix:`composite/` |-| **tendon** (*)
|
||||
''''''''''''''''''''''''''''''''''''''''''
|
||||
|
||||
Tendons are treated similarly to joints in composite objects. The tendon kind specified here together with the composite
|
||||
body type imply the tendon type as used in the rest of MJCF. This sub-element is used to both create optional tendons,
|
||||
and adjust the attributes of automatic and optional tendons. One difference from joints is that all tendons used in
|
||||
composite objects are equality-constrained.
|
||||
|
||||
.. _composite-tendon-kind:
|
||||
|
||||
:at:`kind`: :at-val:`[main, shear], required`
|
||||
The **main** kind corresponds to tendons holding the composite body together. These are the spatial tendons that
|
||||
connect neighboring bodies in grid and cloth, and the fixed tendon used to preserve the volume of box, cylinder and
|
||||
ellipsoid. For other composite types this sub-element has no effect.
|
||||
|
||||
The **shear** kind corresponds to diagonal tendons that prevent shear (as opposed to enabling - which is the function
|
||||
of optional joints). Such tendons can be created in 2D grid objects and cloth objects. For all other composite object
|
||||
types this sub-element has no effect.
|
||||
|
||||
.. _composite-tendon-solreffix:
|
||||
|
||||
.. _composite-tendon-solimpfix:
|
||||
|
||||
:at:`solreffix`, :at:`solimpfix`
|
||||
These are the solref and solimp attributes used to equality-constrain the tendon. The defaults are adjusted depending
|
||||
on the composite type. Otherwise these attributes obey the same rules as all other solref and solimp attributes in
|
||||
MJCF. See :ref:`CSolver`.
|
||||
|
||||
.. _composite-tendon-group:
|
||||
|
||||
.. _composite-tendon-stiffness:
|
||||
|
||||
.. _composite-tendon-damping:
|
||||
|
||||
.. _composite-tendon-limited:
|
||||
|
||||
.. _composite-tendon-range:
|
||||
|
||||
.. _composite-tendon-margin:
|
||||
|
||||
.. _composite-tendon-solreflimit:
|
||||
|
||||
.. _composite-tendon-solimplimit:
|
||||
|
||||
.. _composite-tendon-frictionloss:
|
||||
|
||||
.. _composite-tendon-solreffriction:
|
||||
|
||||
.. _composite-tendon-solimpfriction:
|
||||
|
||||
.. _composite-tendon-material:
|
||||
|
||||
.. _composite-tendon-rgba:
|
||||
|
||||
.. _composite-tendon-width:
|
||||
|
||||
.. |body/composite/tendon attrib list| replace::
|
||||
:at:`group`, :at:`stiffness`, :at:`damping`, :at:`limited`, :at:`range`, :at:`margin`, :at:`solreflimit`,
|
||||
:at:`solimplimit`, :at:`frictionloss`, :at:`solreffriction`, :at:`solimpfriction`, :at:`material`, :at:`rgba`,
|
||||
:at:`width`
|
||||
|
||||
|body/composite/tendon attrib list|
|
||||
Same meaning as regular :ref:`tendon <tendon>` attributes.
|
||||
|
||||
|
||||
.. _composite-geom:
|
||||
|
||||
:el-prefix:`composite/` |-| **geom** (?)
|
||||
@@ -3335,22 +3251,6 @@ automatically-generated skin.
|
||||
bi-cubic interpolation. This increases the quality of the rendering (especially in the absence of textures) but also
|
||||
slows down the renderer, so use it with caution. Values above 3 are unlikely to be needed.
|
||||
|
||||
.. _composite-pin:
|
||||
|
||||
:el-prefix:`composite/` |-| **pin** (*)
|
||||
'''''''''''''''''''''''''''''''''''''''
|
||||
|
||||
This sub-element can be used to pin some of the element bodies in grid objects (both 1D and 2D). Pinning means that the
|
||||
corresponding body has no joints, and therefore it is rigidly fixed to the parent body. When the parent is the world,
|
||||
this has the effect of hanging a string or a cloth in space. If the parent body is moving, this can be used to model a
|
||||
handle where the composite object is attached. For other composite types this sub-element has no effect.
|
||||
|
||||
.. _composite-pin-coord:
|
||||
|
||||
:at:`coord`: :at-val:`int(2), required`
|
||||
The grid coordinates of the element body which should be pinned. The coordinates are zero-based. For 1D grids this
|
||||
attribute can have only one number, in which case the second number is automatically set to 0.
|
||||
|
||||
|
||||
.. _composite-plugin:
|
||||
|
||||
|
||||
+3
-25
@@ -340,11 +340,11 @@
|
||||
| :ref:`composite | \* | :class: mjcf-attributes |
|
||||
| <body-composite>` | | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`prefix<body-composite-prefix>` | :ref:`type<body-composite-type>` | :ref:`count<body-composite-count>` | :ref:`spacing<body-composite-spacing>` | |
|
||||
| | | | :ref:`prefix<body-composite-prefix>` | :ref:`type<body-composite-type>` | :ref:`count<body-composite-count>` | :ref:`offset<body-composite-offset>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`offset<body-composite-offset>` | :ref:`flatinertia<body-composite-flatinertia>` | :ref:`solrefsmooth<body-composite-solrefsmooth>` | :ref:`solimpsmooth<body-composite-solimpsmooth>` | |
|
||||
| | | | :ref:`flatinertia<body-composite-flatinertia>` | :ref:`vertex<body-composite-vertex>` | :ref:`initial<body-composite-initial>` | :ref:`curve<body-composite-curve>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`vertex<body-composite-vertex>` | :ref:`initial<body-composite-initial>` | :ref:`curve<body-composite-curve>` | :ref:`size<body-composite-size>` | |
|
||||
| | | | :ref:`size<body-composite-size>` | | | | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
+------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |_2| composite |br| |_2| |L| | | .. table:: |
|
||||
@@ -363,21 +363,6 @@
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
+------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |_2| composite |br| |_2| |L| | | .. table:: |
|
||||
| :ref:`tendon | \* | :class: mjcf-attributes |
|
||||
| <composite-tendon>` | | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`kind<composite-tendon-kind>` | :ref:`group<composite-tendon-group>` | :ref:`stiffness<composite-tendon-stiffness>` | :ref:`damping<composite-tendon-damping>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`solreffix<composite-tendon-solreffix>` | :ref:`solimpfix<composite-tendon-solimpfix>` | :ref:`limited<composite-tendon-limited>` | :ref:`range<composite-tendon-range>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`margin<composite-tendon-margin>` | :ref:`solreflimit<composite-tendon-solreflimit>` | :ref:`solimplimit<composite-tendon-solimplimit>` | :ref:`frictionloss<composite-tendon-frictionloss>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`solreffriction<composite-tendon-solreffriction>` | :ref:`solimpfriction<composite-tendon-solimpfriction>` | :ref:`material<composite-tendon-material>` | :ref:`rgba<composite-tendon-rgba>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`width<composite-tendon-width>` | | | | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
+------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |_2| composite |br| |_2| |L| | | .. table:: |
|
||||
| :ref:`skin | ? | :class: mjcf-attributes |
|
||||
| <composite-skin>` | | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
@@ -409,13 +394,6 @@
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
+------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |_2| composite |br| |_2| |L| | | .. table:: |
|
||||
| :ref:`pin | \* | :class: mjcf-attributes |
|
||||
| <composite-pin>` | | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`coord<composite-pin-coord>` | | | | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
+------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |_2| composite |br| |_2| |L| | | .. table:: |
|
||||
| :ref:`plugin | \* | :class: mjcf-attributes |
|
||||
| <composite-plugin>` | | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
|
||||
@@ -36,6 +36,9 @@ General
|
||||
- Added :ref:`potential<sensor-e_potential>` and :ref:`kinetic<sensor-e_kinetic>` energy sensors.
|
||||
- Improved shadow rendering in the native renderer.
|
||||
- Moved ``introspect`` to ``python/introspect``.
|
||||
- Removed the ``particle`` composite type. It is recommended to use the more generic :ref:`replicate<replicate>`
|
||||
instead, for example `this model
|
||||
<https://github.com/google-deepmind/mujoco/blob/main/model/replicate/particle.xml>`__.
|
||||
|
||||
.. admonition:: Breaking API changes
|
||||
:class: attention
|
||||
|
||||
+2
-28
@@ -1164,34 +1164,8 @@ see the XML model files in the distribution for the complete examples.
|
||||
|
||||
**Particle**.
|
||||
|
||||
|image4| |image5|
|
||||
|
||||
.. code-block:: xml
|
||||
|
||||
<worldbody>
|
||||
<composite type="particle" count="10 10 10" spacing="0.07" offset="0 0 1">
|
||||
<geom size=".02" rgba=".8 .2 .1 1"/>
|
||||
</composite>
|
||||
</worldbody>
|
||||
|
||||
The above XML is all it takes to create a system with 1000 particles with initial positions on a 10-10-10 grid, and
|
||||
set the size, color, spacing and offset of the particles. The resulting element bodies become children of the world
|
||||
body. One could adjust many other properties including the softness of the contacts and the joint attributes. The plot
|
||||
on the right shows the joints. Each element body has 3 orthogonal slider joints, allowing it to translate but not
|
||||
rotate. The idea is that particles should have position but no orientation. MuJoCo bodies always have orientation,
|
||||
however by using only slider joints we do not allow the orientation to change. The geom defaults are adjusted
|
||||
automatically so that they make frictionless contacts with each other and with the rest of the model. So this system
|
||||
has 1000 bodies (each with a geom), 3000 degrees of freedom and around 1000 active contacts. Evaluating the dynamics
|
||||
takes around 1 ms on a single core of a modern processor. As with most other MuJoCo models, the soft constraints allow
|
||||
simulation at much larger timesteps (this model is stable at 30 ms timestep and even higher).
|
||||
|
||||
Particles are also compatible with the passive forces 2D and 3D plugins, discussed in the :ref:`deformable
|
||||
<CDeformable>` section. However, collisions are limited to the particle themselves and not to the whole boundary of the
|
||||
skin that encloses them. This makes contacts very fast but does not guarantee that all penetrations can be avoided. For
|
||||
a more complete treatment, see again the :ref:`deformable <CDeformable>` section, which outlines how to use
|
||||
:ref:`flexcomp<body-flexcomp>` to create such an object. It is easy to port models create with composite particles to
|
||||
flex, see the folder `elasticity/ <https://github.com/google-deepmind/mujoco/tree/main/model/plugin/elasticity>`__ for
|
||||
several examples.
|
||||
The particle type is deprecated. It is recommended to use the more generic :ref:`replicate<replicate>` instead, for
|
||||
example `this model <https://github.com/google-deepmind/mujoco/blob/main/model/replicate/particle.xml>`__.
|
||||
|
||||
**Grid**.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user