Finalize built-in mesh example model and documentation
PiperOrigin-RevId: 791227350 Change-Id: Ibdcdb8a4ee5b3f78c9ae93e1db2a9a2f9d55a80c
This commit is contained in:
committed by
Copybara-Service
parent
2f4375dda3
commit
fde479736e
+54
-19
@@ -1327,57 +1327,92 @@ The full list of processing steps applied by the compiler to each mesh is as fol
|
||||
|
||||
:at:`builtin`: :at-val:`string, optional`
|
||||
The mesh is generated by the compiler from a set of parameters specified in :ref:`params<asset-mesh-params>`.
|
||||
When saved to XML, meshes produced this way are converted to explicit vertices.
|
||||
When saved to XML, meshes produced this way are converted to explicit vertices. The Python bindings include
|
||||
:ref:`convenience methods <PyEditConvenience>` for generating these meshes.
|
||||
The available built-in types, their parameters and semantics are:
|
||||
|
||||
.. image:: images/XMLreference/s.png
|
||||
:width: 23%
|
||||
:align: right
|
||||
:target: https://github.com/google-deepmind/mujoco/blob/main/test/user/testdata/makemesh.xml
|
||||
|
||||
:at-val:`sphere` (subdivision)
|
||||
Repeated subdivisions :math:`s` of a unit icosahedron. Has :math:`2 + 10 \cdot 4^s` vertices.
|
||||
Repeated subdivisions of a unit icosahedron ("icosphere"). For :math:`s` subdivisions, this mesh
|
||||
has :math:`V = 2 + 10 \cdot 4^s` vertices and :math:`F = 20 \cdot 4^s` faces.
|
||||
|
||||
**subdivision**: integer in [0-4]: The number of subdivisions to apply to icosahedron faces.
|
||||
|
||||
.. image:: images/XMLreference/h.png
|
||||
:width: 23%
|
||||
:align: right
|
||||
:target: https://github.com/google-deepmind/mujoco/blob/main/test/user/testdata/makemesh.xml
|
||||
|
||||
:at-val:`hemisphere` (subdivision)
|
||||
Repeated subdivisions :math:`s` of a square-based pyramid. Has :math:`2+2(s+1)(s+2)` vertices.
|
||||
Repeated subdivisions of a square-based pyramid. For :math:`s` subdivisions, this mesh
|
||||
has :math:`V = 2 + 2(s+1)(s+2)` vertices and :math:`F = 4(s+1)(s+2)` faces.
|
||||
|
||||
**subdivision**: integer in [0-10]: The number of subdivisions to apply to the pyramid.
|
||||
|
||||
.. image:: images/XMLreference/c.png
|
||||
:width: 23%
|
||||
:align: right
|
||||
:target: https://github.com/google-deepmind/mujoco/blob/main/test/user/testdata/makemesh.xml
|
||||
|
||||
:at-val:`cone` (nvert, radius)
|
||||
The convex hull of a regular unit polygon at z = -1 and a unit polygon with the given radiusat z = 1.
|
||||
If radius is 1, the mesh a prism. If radius is 0, only a single vertex is place at (0, 0, 1) and the mesh is a
|
||||
The convex hull of a regular unit polygon at z = -1 and a unit polygon with the given radius at z = 1.
|
||||
If radius is 1, the mesh a prism. If radius is 0, only a single vertex is placed at (0, 0, 1) and the mesh is a
|
||||
discrete cone. If radius is positive, the mesh is a truncated discrete cone.
|
||||
|
||||
**nvert**: integer >= 3: The number vertices in the polygon.
|
||||
|br| **radius**: real in [0, 1]: The radius of the top face.
|
||||
|
||||
:at-val:`supersphere` (resolution, e, n)
|
||||
A generalization of a sphere, also known as a superellipsoid (we use "supersphere" since semiaxis rescaling is
|
||||
performed by the :ref:`scale<asset-mesh-scale>` attribute). If the **n** and **e** parameters are both 1, the
|
||||
shape is a sphere. See `here <https://en.wikipedia.org/wiki/Superellipsoid>`__ for the definition of superspheres.
|
||||
.. image:: images/XMLreference/ss.png
|
||||
:width: 23%
|
||||
:align: right
|
||||
:target: https://github.com/google-deepmind/mujoco/blob/main/test/user/testdata/makemesh.xml
|
||||
|
||||
**resolution** integer >= 4: The discretization of both major and minor radii.
|
||||
:at-val:`supersphere` (resolution, e, n)
|
||||
A generalization of a sphere, also known as a superellipsoid (we use 'supersphere' since semiaxis rescaling is
|
||||
performed by the :ref:`scale<asset-mesh-scale>` attribute). If the **n** and **e** parameters are both 1, the
|
||||
shape is a sphere. See `here <https://en.wikipedia.org/wiki/Superellipsoid>`__ for more details.
|
||||
|
||||
**resolution** integer >= 3: Longitude and latitude discretization.
|
||||
|br| **e**: real >= 0: The "east-west" exponent.
|
||||
|br| **n**: real >= 0: The "north-south" exponent.
|
||||
|
||||
.. image:: images/XMLreference/st.png
|
||||
:width: 23%
|
||||
:align: right
|
||||
:target: https://github.com/google-deepmind/mujoco/blob/main/test/user/testdata/makemesh.xml
|
||||
|
||||
:at-val:`supertorus` (resolution, radius, s, t)
|
||||
A generalization of a torus with major radius of 1 and given minor radius. If the **s** and **t** parameters are
|
||||
both 1, the shape is a torus. See `here <https://en.wikipedia.org/wiki/Supertoroid>`__ for details regarding
|
||||
the definition of supertori.
|
||||
both 1, the shape is a torus. See `here <https://en.wikipedia.org/wiki/Supertoroid>`__ for more details. Note that
|
||||
this shape is inherently non-convex, and the :ref:`standard caveats<coDecomposition>` about mesh collisions apply.
|
||||
|
||||
**resolution** integer >= 4: The discretization of both major and minor radii.
|
||||
**resolution** integer >= 3: Discretization of both circumfrences.
|
||||
|br| **radius**: real in (0, 1]: The minor radius of the torus.
|
||||
|br| **s**: real > 0: The "squareness" of major sections.
|
||||
|br| **t**: real > 0: The "squareness" of minor sections.
|
||||
|br| **s**: real > 0: The "squareness" of minor sections.
|
||||
|br| **t**: real > 0: The "squareness" of major sections.
|
||||
|
||||
.. image:: images/XMLreference/w.png
|
||||
:width: 23%
|
||||
:align: right
|
||||
:target: https://github.com/google-deepmind/mujoco/blob/main/test/user/testdata/makemesh.xml
|
||||
|
||||
:at-val:`wedge` (res_phi, res_theta, fov_phi, fov_theta, gamma)
|
||||
A slice of a unit spherical shell in spherical coordinates.
|
||||
A slice of a unit spherical shell in spherical coordinates. This mesh is designed to be used by the :ref:`tactile
|
||||
sensor<sensor-tactile>`, which reports data at the vertices.
|
||||
|
||||
**res_phi**: integer >= 0: The vertical resolution of the slice.
|
||||
|br| **res_theta**: integer >= 0: The horizontal resolution of the slice.
|
||||
|br| **fov_phi**: real in (0, 180]: The horizontal field of view (longitude) in degrees.
|
||||
|br| **fov_phi**: real in (0, 90): The vertical field of view (latitude) in degrees.
|
||||
|br| **fov_phi**: real in (0, 180]: The horizontal field of view (degrees).
|
||||
|br| **fov_phi**: real in (0, 90): The vertical field of view (degrees).
|
||||
|br| **gamma**: real in [0, 1]: Foveal deformation of the discretization.
|
||||
|
||||
:at-val:`plate` (res_x, res_y)
|
||||
A rectangular plate with resolution in each dimension.
|
||||
A rectangular plate with given resolution in each dimension. This mesh is designed to be used by the :ref:`tactile
|
||||
sensor<sensor-tactile>`, which reports data at the vertices.
|
||||
|
||||
**res_x**: integer > 0: The horizontal resolution of the plate.
|
||||
|br| **res_y**: integer > 0: The vertical resolution of the plate.
|
||||
|
||||
Reference in New Issue
Block a user