Add dof="2d" option to flexcomp for in-plane deformations.

PiperOrigin-RevId: 902620719
Change-Id: Ib06d3f7b9439e1d90a8373a4289ade0c327e72e4
This commit is contained in:
Alessio Quaglino
2026-04-20 07:13:17 -07:00
committed by Copybara-Service
parent cad734ae70
commit 2d12dee025
6 changed files with 513 additions and 2 deletions
+5 -1
View File
@@ -3593,7 +3593,7 @@ saving the XML:
.. _body-flexcomp-dof:
:at:`dof`: :at-val:`[full, radial, trilinear, quadratic], "full"`
:at:`dof`: :at-val:`[full, radial, trilinear, quadratic, 2d], "full"`
The parametrization of the flex's degrees of freedom (dofs). See the video on the right illustrating the
different parametrizations with deformable spheres. The three models in the video are respectively
`sphere_full <https://github.com/google-deepmind/mujoco/blob/main/model/flex/sphere_full.xml>`__,
@@ -3608,6 +3608,10 @@ saving the XML:
requires a free joint at the flex's parent in order for free body motion to be possible. This type of
parametrization is appropriate for shapes that are relatively spherical.
**2d**
Two orthogonal translational dofs (X and Y) per vertex. This restricts the motion of the vertices to planes
parallel to the parent body's X-Y plane.
**trilinear**
Three translational dofs at each corner of the bounding box of the flex, for a total of 24 dofs for the entire
flex, independent of the number of vertices. The positions of the vertices are updated using trilinear