diff --git a/doc/XMLreference.rst b/doc/XMLreference.rst index 7c6c8b56..fcd7b54d 100644 --- a/doc/XMLreference.rst +++ b/doc/XMLreference.rst @@ -2982,7 +2982,7 @@ coordinates results in compiler error. See :ref:`CComposite` in the modeling gui .. _body-composite-type: -:at:`type`: :at-val:`[particle, grid, cable, rope, loop, cloth, box, cylinder, ellipsoid], required` +:at:`type`: :at-val:`[particle, cable], required` This attribute determines the type of composite object. The remaining attributes and sub-elements are then interpreted according to the type. Default settings are also adjusted depending on the type. @@ -2993,13 +2993,6 @@ coordinates results in compiler error. See :ref:`CComposite` in the modeling gui and replace the default sphere with a custom geom. Note that the particle composite type is deprecated and might be removed in a future version. Instead of particle, it is recommended to use :ref:`replicate`. - The **grid** type creates a 1D or 2D grid of bodies, each having a sphere geom, a sphere site, and 3 orthogonal - sliding joints by default. The :el:`pin` sub-element can be used to specify that some bodies should not have joints, - and instead should be pinned to the parent body. Unlike the particle type, here each two neighboring bodies are - connected with a spatial tendon whose length is equality-constrained to its initial value (the sites are needed to - define the tendons). The "main" tendons are parallel to the axes of the grid. In addition one can create diagonal - "shear" tendons, using the :el:`tendon` sub-element. This type is suitable for simulating strings as well as cloth. - The **cable** type creates a 1D chain of bodies connected with ball joints, each having a geom with user-defined type (cylinder, capsule or box). The geometry can either be defined with an array of 3D vertex coordinates :at:`vertex` or with prescribed functions with the option :at:`curve`. Currently, only linear and trigonometric functions are @@ -3007,34 +3000,6 @@ coordinates results in compiler error. See :ref:`CComposite` in the modeling gui :at:`size`, resulting in :math:`f(s)=\{\text{size}[1]\cdot\cos(2\pi\cdot\text{size}[2]),\; \text{size}[1]\cdot\sin(2\pi\cdot\text{size}[2]),\; \text{size}[0]\cdot s\}`. - The **cloth** type is a different way to model cloth, beyond type="grid". Here the elements are connected with - universal joints and form a kinematic spanning tree. The root of the tree is the parent body, and its coordinates in - the grid are inferred from its name - similar to rope but here the naming format is "CB2_0". Neighboring bodies that - are not connected with joints are then connected with equality-constrained spatial tendons. The resulting cloth is - non-homogeneous, because the kinematic constraints cannot be violated while the tendon equality constraints are soft. - One can make it more homogeneous by adding stretch and twist joints (similar to rope) and adjusting the strength of - their equality constraints. Shear tendons can also be added. In addition to the different physics, cloth can do - things that a 2D grid cannot do. This is because the elements of cloth have both position and orientation, while the - elements of grid can only translate. The geoms used in cloth can be ellipsoids and capsules in addition to spheres. - When elongated geoms are used, they are rotated and interleaved in a pattern that fills the holes, preventing objects - from penetrating the cloth. Furthermore the inertia of the cloth elements can be modified with the flatinertia - attribute, and can then be used with lift and drag forces to simulate ripple effects. - - The **box** type creates a 3D arrangement of bodies forming the outer shell of a (soft) box. The parent body is at - the center of the box. Each element body has a geom (sphere, ellipsoid or capsule) and a single sliding joint - pointing away from the center of the box. The sliding joints are equality-constrained to their initial value. - Furthermore, to achieve smooth deformations of the sides of the box, each joint is equality-constrained to remain - equal to its neighbor joints. To preserve the volume of the soft box approximately, a fixed tendon is used to - constrain the sum of all joints to remain constant. When the user specifies elongated geoms (capsules or ellipsoids) - their long axis is aligned with the sliding joint axis. This makes the shell thicker for collision detection - purposes, preventing objects from penetrating the box. It is important to disable contacts between the elements of - the box. This is done by setting the default geom contype to 0. The user can change it of course, but if the geoms - comprising the soft box are allowed to contact each other the model will not work as intended. - - The **cylinder** and **ellipsoid** types are the same as box, except the elements are projected on the surface of an - ellipsoid or a cylinder respectively. Thus the composite soft body shape is different, while everything else is the - same as in the box type. - .. _body-composite-count: :at:`count`: :at-val:`int(3), required` diff --git a/doc/changelog.rst b/doc/changelog.rst index fb5c7389..456651ed 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -48,6 +48,7 @@ General Previously, if the volumetric inertia computation failed (for example due to a very flat mesh), the compiler would silently fall back to surface inertia computation. Now, the compiler will throw an informative error. + - Removed the composite type ``grid``. Users should instead use :ref:`flexcomp`. MJX ^^^ diff --git a/doc/modeling.rst b/doc/modeling.rst index 4872dc7c..f61dad1f 100644 --- a/doc/modeling.rst +++ b/doc/modeling.rst @@ -1193,47 +1193,10 @@ a more complete treatment, see again the :ref:`deformable ` section flex, see the folder `elasticity/ `__ for several examples. -**1D grid**. +**Grid**. -|image6| |image7| - -.. code-block:: xml - - - - - - - - - -The grid type can create 1D or 2D grids, depending on the :at:`count` attribute. Here we illustrate 1D grids. These -are strings of spheres connected with tendons whose length is soft-equality-constrained. The softness can be adjusted. -Similar to particles, the element bodies here have slider joints but no rotational joints. The plot on the right -illustrates pinning. The :el:`pin` sub-element is used to specify the grid coordinates of the pinned bodies, and the -model compiler does not generate joints for these bodies, thereby fixing them rigidly to the parent body (in this case -the world). This makes the string in the right plot hang in space. The same mechanism can be used to model a whip for -example; in that case the parent body would be moving, and the first element body would be pinned to the parent. - -**2D grid**. - -|image8| |image9| - -.. code-block:: xml - - - - - - - - -A 2D grid can be used to simulate cloth. What it really simulates is a 2D grid of spheres connected with -equality-constrained tendons (not shown). The model compiler can also generate skin, enabled with the :el:`skin` -sub-element in the above XML. Some of the element bodies can also be pinned, similar to 1D grids but using two grid -coordinates. The plot on the right shows a cloth pinned to the world body at the two corners, and draping over our -capsule probe. The skin on the right is subdivided using bi-cubic interpolation, which increases visual quality in the -absence of textures. When textures are present (left) the benefits of subdivision are less visible. +The grid composite type has been removed. It is recommended to use 2D flex :ref:`deformable objects ` for +simulating thin elastic structures. **Cable**. diff --git a/model/composite/grid2pin.xml b/model/composite/grid2pin.xml deleted file mode 100644 index c9595d23..00000000 --- a/model/composite/grid2pin.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/model/hammock/hammock.xml b/model/hammock/hammock.xml index 28e69ff5..b00abcfd 100644 --- a/model/hammock/hammock.xml +++ b/model/hammock/hammock.xml @@ -22,7 +22,7 @@ Simple humanoid on a hammock, implemented as a 2D grid composite, pinned at the corners. --> -