Add Flex component.
PiperOrigin-RevId: 572830650 Change-Id: I6908228087b7b9683be3506c8d9cdc725ed5dcd5
This commit is contained in:
committed by
Saran Tunyasuvunakool
parent
649a474788
commit
5a70ad08ab
@@ -724,6 +724,15 @@ mj_camlight
|
||||
|
||||
Compute camera and light positions and orientations.
|
||||
|
||||
.. _mj_flex:
|
||||
|
||||
mj_flex
|
||||
~~~~~~~
|
||||
|
||||
.. mujoco-include:: mj_flex
|
||||
|
||||
Compute flex-related quantities.
|
||||
|
||||
.. _mj_tendon:
|
||||
|
||||
mj_tendon
|
||||
@@ -948,6 +957,16 @@ mju_rayGeom
|
||||
|
||||
Intersect ray with pure geom, return nearest distance or -1 if no intersection.
|
||||
|
||||
.. _mju_rayFlex:
|
||||
|
||||
mju_rayFlex
|
||||
~~~~~~~~~~~
|
||||
|
||||
.. mujoco-include:: mju_rayFlex
|
||||
|
||||
Intersect ray with flex, return nearest distance or -1 if no intersection,
|
||||
and also output nearest vertex id.
|
||||
|
||||
.. _mju_raySkin:
|
||||
|
||||
mju_raySkin
|
||||
|
||||
+227
-5
@@ -1322,9 +1322,9 @@ also known as terrain map, is a 2D matrix of elevation data. The data can be spe
|
||||
|
||||
.. _asset-hfield-content_type:
|
||||
|
||||
:at:`content_type`: :at-val:`string, optional`
|
||||
:at:`content_type`: :at-val: `string, optional`
|
||||
If the file attribute is specified, then this sets the
|
||||
`Media Type <https://www.iana.org/assignments/media-types/media-types.xhtml>`__ (formerly known as MIME types) of the
|
||||
`Media Type <https://www.iana.org/assignments/media-types/media-types.xhtml>`_ (formerly known as MIME types) of the
|
||||
file to be loaded. Any filename extensions will be overloaded. Currently ``image/png`` and
|
||||
``image/vnd.mujoco.hfield`` are supported.
|
||||
|
||||
@@ -1578,6 +1578,7 @@ Associate this mesh with an :ref:`engine plugin<exPlugin>`. Either :at:`plugin`
|
||||
|
||||
|
||||
|
||||
.. _deformable-skin:
|
||||
.. _asset-skin:
|
||||
|
||||
:el-prefix:`asset/` |-| **skin** (*)
|
||||
@@ -1641,11 +1642,13 @@ Similar to the other custom binary formats used in MuJoCo, the file size in byte
|
||||
compiler. The skin file format has subelements so the overall file size formula is difficult to write down, but should
|
||||
be clear from the above specification.
|
||||
|
||||
.. _deformable-skin-name:
|
||||
.. _asset-skin-name:
|
||||
|
||||
:at:`name`: :at-val:`string, optional`
|
||||
Name of the skin.
|
||||
|
||||
.. _deformable-skin-file:
|
||||
.. _asset-skin-file:
|
||||
|
||||
:at:`file`: :at-val:`string, optional`
|
||||
@@ -1653,11 +1656,13 @@ be clear from the above specification.
|
||||
:ref:`compiler <compiler>`. If the file is omitted, the skin specification must be provided in the XML using the
|
||||
attributes below.
|
||||
|
||||
.. _deformable-skin-vertex:
|
||||
.. _asset-skin-vertex:
|
||||
|
||||
:at:`vertex`: :at-val:`real(3*nvert), optional`
|
||||
Vertex 3D positions, in the global bind pose where the skin is defined.
|
||||
|
||||
.. _deformable-skin-texcoord:
|
||||
.. _asset-skin-texcoord:
|
||||
|
||||
:at:`texcoord`: :at-val:`real(2*nvert), optional`
|
||||
@@ -1667,22 +1672,26 @@ be clear from the above specification.
|
||||
skin using this attribute. Otherwise the texture will appear to be stationary in the world while the skin moves
|
||||
around (creating an interesting effect but probably not as intended).
|
||||
|
||||
.. _deformable-skin-face:
|
||||
.. _asset-skin-face:
|
||||
|
||||
:at:`face`: :at-val:`int(3*nface), optional`
|
||||
Trinagular skin faces. Each face is a triple of vertex indices, which are integers between zero and nvert-1.
|
||||
|
||||
.. _deformable-skin-inflate:
|
||||
.. _asset-skin-inflate:
|
||||
|
||||
:at:`inflate`: :at-val:`real, "0"`
|
||||
If this number is not zero, the position of vertex during updating will be offset along the vertex normal, but the
|
||||
distance specified in this attribute. This is particularly useful for skins representing flexible 2D shapes.
|
||||
|
||||
.. _deformable-skin-material:
|
||||
.. _asset-skin-material:
|
||||
|
||||
:at:`material`: :at-val:`string, optional`
|
||||
If specified, this attribute applies a material to the skin.
|
||||
|
||||
.. _deformable-skin-rgba:
|
||||
.. _asset-skin-rgba:
|
||||
|
||||
:at:`rgba`: :at-val:`real(4), "0.5 0.5 0.5 1"`
|
||||
@@ -1690,6 +1699,7 @@ be clear from the above specification.
|
||||
only. This is not as flexible as the material mechanism, but is more convenient and is often sufficient. If the value
|
||||
of this attribute is different from the internal default, it takes precedence over the material.
|
||||
|
||||
.. _deformable-skin-group:
|
||||
.. _asset-skin-group:
|
||||
|
||||
:at:`group`: :at-val:`int, "0"`
|
||||
@@ -1919,9 +1929,11 @@ adjust it properly through the XML.
|
||||
|
||||
.. _option-o_solimp:
|
||||
|
||||
:at:`o_solref`, :at:`o_solimp`
|
||||
These attributes replace the solref and solimp parameters of all active contact pairs when contact override is
|
||||
enabled. See :ref:`CSolver` for details.
|
||||
.. _option-o_friction:
|
||||
|
||||
:at:`o_solref`, :at:`o_solimp`, :at:`o_friction`
|
||||
These attributes replace the solref, solimp, and friction parameters of all active contact pairs when contact
|
||||
override is enabled. See :ref:`CSolver` for details.
|
||||
|
||||
.. _option-integrator:
|
||||
|
||||
@@ -3702,6 +3714,160 @@ Associate this composite with an :ref:`engine plugin<exPlugin>`. Either :at:`plu
|
||||
:at:`instance`: :at-val:`string, optional`
|
||||
Instance name, used for explicit plugin instantiation.
|
||||
|
||||
|
||||
.. _body-flexcomp:
|
||||
|
||||
:el-prefix:`body/` |-| **flex** (*)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. _body-flexcomp-name:
|
||||
|
||||
.. _body-flexcomp-class:
|
||||
|
||||
.. _body-flexcomp-type:
|
||||
|
||||
.. _body-flexcomp-dim:
|
||||
|
||||
.. _body-flexcomp-count:
|
||||
|
||||
.. _body-flexcomp-spacing:
|
||||
|
||||
.. _body-flexcomp-radius:
|
||||
|
||||
.. _body-flexcomp-rigid:
|
||||
|
||||
.. _body-flexcomp-mass:
|
||||
|
||||
.. _body-flexcomp-inertiabox:
|
||||
|
||||
.. _body-flexcomp-scale:
|
||||
|
||||
.. _body-flexcomp-file:
|
||||
|
||||
.. _body-flexcomp-point:
|
||||
|
||||
.. _body-flexcomp-element:
|
||||
|
||||
.. _body-flexcomp-material:
|
||||
|
||||
.. _body-flexcomp-rgba:
|
||||
|
||||
.. _body-flexcomp-texcoord:
|
||||
|
||||
.. _body-flexcomp-pos:
|
||||
|
||||
.. _body-flexcomp-quat:
|
||||
|
||||
.. _body-flexcomp-axisangle:
|
||||
|
||||
.. _body-flexcomp-xyaxes:
|
||||
|
||||
.. _body-flexcomp-zaxis:
|
||||
|
||||
.. _body-flexcomp-euler:
|
||||
|
||||
.. _body-flexcomp-selfcollide:
|
||||
|
||||
.. _body-flexcomp-flatskin:
|
||||
|
||||
.. _flex-edge:
|
||||
.. _flexcomp-edge:
|
||||
|
||||
.. _flex-edge-equality:
|
||||
.. _flexcomp-edge-equality:
|
||||
|
||||
.. _flex-edge-solref:
|
||||
.. _flexcomp-edge-solref:
|
||||
|
||||
.. _flex-edge-solimp:
|
||||
.. _flexcomp-edge-solimp:
|
||||
|
||||
.. _flex-edge-stiffness:
|
||||
.. _flexcomp-edge-stiffness:
|
||||
|
||||
.. _flex-edge-damping:
|
||||
.. _flexcomp-edge-damping:
|
||||
|
||||
.. _flex-contact:
|
||||
.. _flexcomp-contact:
|
||||
|
||||
.. _flexcomp-contact-:
|
||||
|
||||
.. _flex-contact-contype:
|
||||
.. _flexcomp-contact-contype:
|
||||
|
||||
.. _flex-contact-conaffinity:
|
||||
.. _flexcomp-contact-conaffinity:
|
||||
|
||||
.. _flex-contact-condim:
|
||||
.. _flexcomp-contact-condim:
|
||||
|
||||
.. _flex-contact-priority:
|
||||
.. _flexcomp-contact-priority:
|
||||
|
||||
.. _flex-contact-friction:
|
||||
.. _flexcomp-contact-friction:
|
||||
|
||||
.. _flex-contact-solmix:
|
||||
.. _flexcomp-contact-solmix:
|
||||
|
||||
.. _flex-contact-solref:
|
||||
.. _flexcomp-contact-solref:
|
||||
|
||||
.. _flex-contact-solimp:
|
||||
.. _flexcomp-contact-solimp:
|
||||
|
||||
.. _flex-contact-margin:
|
||||
.. _flexcomp-contact-margin:
|
||||
|
||||
.. _flex-contact-gap:
|
||||
.. _flexcomp-contact-gap:
|
||||
|
||||
.. _flexcomp-pin:
|
||||
|
||||
.. _flexcomp-pin-id:
|
||||
|
||||
.. _flexcomp-pin-range:
|
||||
|
||||
.. _flexcomp-pin-grid:
|
||||
|
||||
.. _flexcomp-pin-gridrange:
|
||||
|
||||
|
||||
.. _deformable:
|
||||
|
||||
.. _deformable-flex:
|
||||
|
||||
.. _deformable-flex-name:
|
||||
|
||||
.. _deformable-flex-group:
|
||||
|
||||
.. _deformable-flex-material:
|
||||
|
||||
.. _deformable-flex-radius:
|
||||
|
||||
.. _deformable-flex-rgba:
|
||||
|
||||
.. _deformable-flex-texcoord:
|
||||
|
||||
.. _deformable-flex-flatskin:
|
||||
|
||||
.. _deformable-flex-selfcollide:
|
||||
|
||||
.. _deformable-flex-dim:
|
||||
|
||||
.. _deformable-flex-body:
|
||||
|
||||
.. _deformable-flex-vertex:
|
||||
|
||||
.. _deformable-flex-element:
|
||||
|
||||
|
||||
|
||||
**deformable** (*)
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
.. _contact:
|
||||
|
||||
**contact** (*)
|
||||
@@ -4027,6 +4193,24 @@ This element constrains the length of one tendon to be a quartic polynomial of a
|
||||
positions.
|
||||
|
||||
|
||||
.. _equality-flex:
|
||||
|
||||
:el-prefix:`equality/` |-| **flex** (*)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. _equality-flex-name:
|
||||
|
||||
.. _equality-flex-class:
|
||||
|
||||
.. _equality-flex-flex:
|
||||
|
||||
.. _equality-flex-active:
|
||||
|
||||
.. _equality-flex-solref:
|
||||
|
||||
.. _equality-flex-solimp:
|
||||
|
||||
|
||||
.. _equality-distance:
|
||||
|
||||
:el-prefix:`equality/` |-| **distance** (*)
|
||||
@@ -7165,6 +7349,44 @@ tendon, slidersite, cranksite.
|
||||
All :ref:`adhesion <actuator-adhesion>` attributes are available here except: name, class, body.
|
||||
|
||||
|
||||
.. _default-flex:
|
||||
|
||||
.. _default-flex-contype:
|
||||
|
||||
.. _default-flex-conaffinity:
|
||||
|
||||
.. _default-flex-condim:
|
||||
|
||||
.. _default-flex-priority:
|
||||
|
||||
.. _default-flex-material:
|
||||
|
||||
.. _default-flex-friction:
|
||||
|
||||
.. _default-flex-solmix:
|
||||
|
||||
.. _default-flex-solref:
|
||||
|
||||
.. _default-flex-solimp:
|
||||
|
||||
.. _default-flex-margin:
|
||||
|
||||
.. _default-flex-gap:
|
||||
|
||||
.. _default-flex-stiffness:
|
||||
|
||||
.. _default-flex-damping:
|
||||
|
||||
.. _default-flex-radius:
|
||||
|
||||
.. _default-flex-rgba:
|
||||
|
||||
.. _default-flex-dim:
|
||||
|
||||
:el-prefix:`default/` |-| **flex** (?)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
.. _custom:
|
||||
|
||||
**custom** (*)
|
||||
|
||||
+111
-4
@@ -222,13 +222,13 @@
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`wind<option-wind>` | :ref:`magnetic<option-magnetic>` | :ref:`density<option-density>` | :ref:`viscosity<option-viscosity>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`o_margin<option-o_margin>` | :ref:`o_solref<option-o_solref>` | :ref:`o_solimp<option-o_solimp>` | :ref:`integrator<option-integrator>` | |
|
||||
| | | | :ref:`o_margin<option-o_margin>` | :ref:`o_solref<option-o_solref>` | :ref:`o_solimp<option-o_solimp>` | :ref:`o_friction<option-o_friction>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`cone<option-cone>` | :ref:`jacobian<option-jacobian>` | :ref:`solver<option-solver>` | :ref:`iterations<option-iterations>` | |
|
||||
| | | | :ref:`integrator<option-integrator>` | :ref:`cone<option-cone>` | :ref:`jacobian<option-jacobian>` | :ref:`solver<option-solver>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`ls_iterations<option-ls_iterations>` | :ref:`noslip_iterations<option-noslip_iterations>` | :ref:`mpr_iterations<option-mpr_iterations>` | :ref:`sdf_iterations<option-sdf_iterations>` | |
|
||||
| | | | :ref:`iterations<option-iterations>` | :ref:`ls_iterations<option-ls_iterations>` | :ref:`noslip_iterations<option-noslip_iterations>` | :ref:`mpr_iterations<option-mpr_iterations>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`sdf_initpoints<option-sdf_initpoints>` | | | | |
|
||||
| | | | :ref:`sdf_iterations<option-sdf_iterations>` | :ref:`sdf_initpoints<option-sdf_initpoints>` | | | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
+------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |_| option |br| |_| |L| | | .. table:: |
|
||||
@@ -481,6 +481,104 @@
|
||||
| | | | :ref:`key<plugin-config-key>` | :ref:`value<plugin-config-value>` | | | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
+------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |_| body |br| |_| |L| | | .. table:: |
|
||||
| :ref:`flexcomp | \* | :class: mjcf-attributes |
|
||||
| <body-flexcomp>` | | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`name<body-flexcomp-name>` | :ref:`class<body-flexcomp-class>` | :ref:`type<body-flexcomp-type>` | :ref:`dim<body-flexcomp-dim>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`flatskin<body-flexcomp-flatskin>` | :ref:`count<body-flexcomp-count>` | :ref:`spacing<body-flexcomp-spacing>` | :ref:`radius<body-flexcomp-radius>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`rigid<body-flexcomp-rigid>` | :ref:`mass<body-flexcomp-mass>` | :ref:`inertiabox<body-flexcomp-inertiabox>` | :ref:`scale<body-flexcomp-scale>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`file<body-flexcomp-file>` | :ref:`point<body-flexcomp-point>` | :ref:`element<body-flexcomp-element>` | :ref:`texcoord<body-flexcomp-texcoord>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`material<body-flexcomp-material>` | :ref:`rgba<body-flexcomp-rgba>` | :ref:`selfcollide<body-flexcomp-selfcollide>` | :ref:`flatskin<body-flexcomp-flatskin>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`pos<body-flexcomp-pos>` | :ref:`quat<body-flexcomp-quat>` | :ref:`axisangle<body-flexcomp-axisangle>` | :ref:`xyaxes<body-flexcomp-xyaxes>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`zaxis<body-flexcomp-zaxis>` | :ref:`euler<body-flexcomp-euler>` | | | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
+------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |_2| flexcomp |br| |_2| |L| | | .. table:: |
|
||||
| :ref:`edge | ? | :class: mjcf-attributes |
|
||||
| <flexcomp-edge>` | | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`equality<flexcomp-edge-equality>` | :ref:`solref<flexcomp-edge-solref>` | :ref:`solimp<flexcomp-edge-solimp>` | :ref:`stiffness<flexcomp-edge-stiffness>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`damping<flexcomp-edge-damping>` | | | | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
+------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |_2| flexcomp |br| |_2| |L| | | .. table:: |
|
||||
| :ref:`contact | ? | :class: mjcf-attributes |
|
||||
| <flexcomp-contact>` | | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`contype<flexcomp-contact-contype>` | :ref:`conaffinity<flexcomp-contact-conaffinity>` | :ref:`condim<flexcomp-contact-condim>` | :ref:`priority<flexcomp-contact-priority>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`friction<flexcomp-contact-friction>` | :ref:`solmix<flexcomp-contact-solmix>` | :ref:`solref<flexcomp-contact-solref>` | :ref:`solimp<flexcomp-contact-solimp>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`margin<flexcomp-contact-margin>` | :ref:`gap<flexcomp-contact-gap>` | :ref:`<flexcomp-contact->` | | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
+------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |_2| flexcomp |br| |_2| |L| | | .. table:: |
|
||||
| :ref:`pin | \* | :class: mjcf-attributes |
|
||||
| <flexcomp-pin>` | | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`id<flexcomp-pin-id>` | :ref:`range<flexcomp-pin-range>` | :ref:`grid<flexcomp-pin-grid>` | :ref:`gridrange<flexcomp-pin-gridrange>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
+------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| mujoco |br| |L| | | *no attributes* |
|
||||
| :ref:`deformable<deformable>` | | |
|
||||
+------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |_| deformable |br| |_| |L| | | .. table:: |
|
||||
| :ref:`flex | \* | :class: mjcf-attributes |
|
||||
| <deformable-flex>` | | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`name<deformable-flex-name>` | :ref:`group<deformable-flex-group>` | :ref:`dim<deformable-flex-dim>` | :ref:`radius<deformable-flex-radius>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`material<deformable-flex-material>` | :ref:`rgba<deformable-flex-rgba>` | :ref:`flatskin<deformable-flex-flatskin>` | :ref:`selfcollide<deformable-flex-selfcollide>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`body<deformable-flex-body>` | :ref:`vertex<deformable-flex-vertex>` | :ref:`element<deformable-flex-element>` | :ref:`texcoord<deformable-flex-texcoord>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
+------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |_2| flex |br| |_2| |L| | | .. table:: |
|
||||
| :ref:`contact | ? | :class: mjcf-attributes |
|
||||
| <flex-contact>` | | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`contype<flex-contact-contype>` | :ref:`conaffinity<flex-contact-conaffinity>` | :ref:`condim<flex-contact-condim>` | :ref:`priority<flex-contact-priority>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`friction<flex-contact-friction>` | :ref:`solmix<flex-contact-solmix>` | :ref:`solref<flex-contact-solref>` | :ref:`solimp<flex-contact-solimp>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`margin<flex-contact-margin>` | :ref:`gap<flex-contact-gap>` | | | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
+------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |_2| flex |br| |_2| |L| | | .. table:: |
|
||||
| :ref:`edge | ? | :class: mjcf-attributes |
|
||||
| <flex-edge>` | | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`stiffness<flex-edge-stiffness>` | :ref:`damping<flex-edge-damping>` | | | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
+------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |_| deformable |br| |_| |L| | | .. table:: |
|
||||
| :ref:`skin | \* | :class: mjcf-attributes |
|
||||
| <deformable-skin>` | | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`name<deformable-skin-name>` | :ref:`file<deformable-skin-file>` | :ref:`material<deformable-skin-material>` | :ref:`rgba<deformable-skin-rgba>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`inflate<deformable-skin-inflate>` | :ref:`vertex<deformable-skin-vertex>` | :ref:`texcoord<deformable-skin-texcoord>` | :ref:`face<deformable-skin-face>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`group<deformable-skin-group>` | | | | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
+------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |_2| skin |br| |_2| |L| | | .. table:: |
|
||||
| :ref:`bone | \* | :class: mjcf-attributes |
|
||||
| <skin-bone>` | | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`body<skin-bone-body>` | :ref:`bindpos<skin-bone-bindpos>` | :ref:`bindquat<skin-bone-bindquat>` | :ref:`vertid<skin-bone-vertid>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`vertweight<skin-bone-vertweight>` | | | | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
+------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| mujoco |br| |L| | | *no attributes* |
|
||||
| :ref:`contact<contact>` | | |
|
||||
+------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
@@ -543,6 +641,15 @@
|
||||
| | | | :ref:`polycoef<equality-tendon-polycoef>` | :ref:`active<equality-tendon-active>` | :ref:`solref<equality-tendon-solref>` | :ref:`solimp<equality-tendon-solimp>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
+------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |_| equality |br| |_| |L| | | .. table:: |
|
||||
| :ref:`flex | \* | :class: mjcf-attributes |
|
||||
| <equality-flex>` | | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`name<equality-flex-name>` | :ref:`class<equality-flex-class>` | :ref:`flex<equality-flex-flex>` | :ref:`active<equality-flex-active>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`solref<equality-flex-solref>` | :ref:`solimp<equality-flex-solimp>` | | | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
+------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| mujoco |br| |L| | | *no attributes* |
|
||||
| :ref:`tendon<tendon>` | | |
|
||||
+------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
+2
-2
@@ -179,8 +179,8 @@ General
|
||||
:ref:`Cartesian actuator<actuator-general-refsite>` forces are realizable by individual motors at the joints.
|
||||
See :ref:`CForceRange` for details.
|
||||
#. Added an optional ``content_type`` attribute to hfield, texture, and mesh assets. This attribute supports a formatted
|
||||
`Media Type <https://www.iana.org/assignments/media-types/media-types.xhtml>`__ (previously known as MIME type)
|
||||
string used to determine the type of the asset file without resorting to pulling the type from the file extension.
|
||||
`Media Type <https://www.iana.org/assignments/media-types/media-types.xhtml>`_ (previously known as MIME type) string
|
||||
used to determine the type of the asset file without resorting to pulling the type from the file extension.
|
||||
#. Added analytic derivatives for quaternion :ref:`subtraction<mjd_subQuat>` and :ref:`integration<mjd_quatIntegrate>`
|
||||
(rotation with an angular velocity). Derivatives are in the 3D tangent space.
|
||||
#. Added :ref:`mjv_connector` which has identical functionality to :ref:`mjv_makeConnector`, but with more convenient
|
||||
|
||||
+170
-27
@@ -81,7 +81,7 @@ typedef enum mjtTimer_ { // internal timers
|
||||
mjNTIMER // number of timers
|
||||
} mjtTimer;
|
||||
struct mjContact_ { // result of collision detection functions
|
||||
// contact parameters set by geom-specific collision detector
|
||||
// contact parameters set by near-phase collision function
|
||||
mjtNum dist; // distance between nearest points; neg: penetration
|
||||
mjtNum pos[3]; // position of contact point: midpoint between geoms
|
||||
mjtNum frame[9]; // normal is in [0-2]
|
||||
@@ -97,12 +97,16 @@ struct mjContact_ { // result of collision detection functions
|
||||
mjtNum mu; // friction of regularized cone, set by mj_makeConstraint
|
||||
mjtNum H[36]; // cone Hessian, set by mj_updateConstraint
|
||||
|
||||
// contact descriptors set by mj_collideGeoms
|
||||
// contact descriptors set by mj_collideXXX
|
||||
int dim; // contact space dimensionality: 1, 3, 4 or 6
|
||||
int geom1; // id of geom 1
|
||||
int geom2; // id of geom 2
|
||||
int geom[2]; // geom ids; -1 for flex
|
||||
int flex[2]; // flex ids; -1 for geom
|
||||
int elem[2]; // element ids; -1 for geom or flex vertex
|
||||
int vert[2]; // vertex ids; -1 for geom or flex element
|
||||
|
||||
// flag set by mj_instantianteEquality
|
||||
// flag set by mj_setContact or mj_instantiateContact
|
||||
int exclude; // 0: include, 1: in gap, 2: fused, 3: no dofs
|
||||
|
||||
// address computed by mj_instantiateContact
|
||||
@@ -160,12 +164,6 @@ struct mjData_ {
|
||||
int solver_nnz[mjNISLAND]; // number of non-zeros in Hessian or efc_AR, per island
|
||||
mjtNum solver_fwdinv[2]; // forward-inverse comparison: qfrc, efc
|
||||
|
||||
// collision statistics
|
||||
int nbodypair_broad; // number of body pairs in collision according to the broad-phase
|
||||
int nbodypair_narrow; // number of body pairs actually in collision in the narrow-phase
|
||||
int ngeompair_mid; // number of geom pairs in collision according to the mid-phase
|
||||
int ngeompair_narrow; // number of geom pairs actually in collision in the narrow-phase
|
||||
|
||||
// variable sizes
|
||||
int ne; // number of equality constraints
|
||||
int nf; // number of friction constraints
|
||||
@@ -242,14 +240,23 @@ struct mjData_ {
|
||||
mjtNum* cdof; // com-based motion axis of each dof (nv x 6)
|
||||
mjtNum* cinert; // com-based body inertia and mass (nbody x 10)
|
||||
|
||||
// computed by mj_fwdPosition/mj_flex
|
||||
mjtNum* flexvert_xpos; // Cartesian flex vertex positions (nflexvert x 3)
|
||||
mjtNum* flexelem_aabb; // flex element bounding boxes (center, size) (nflexelem x 6)
|
||||
int* flexedge_J_rownnz; // number of non-zeros in Jacobian row (nflexedge x 1)
|
||||
int* flexedge_J_rowadr; // row start address in colind array (nflexedge x 1)
|
||||
int* flexedge_J_colind; // column indices in sparse Jacobian (nflexedge x nv)
|
||||
mjtNum* flexedge_J; // flex edge Jacobian (nflexedge x nv)
|
||||
mjtNum* flexedge_length; // flex edge lengths (nflexedge x 1)
|
||||
|
||||
// computed by mj_fwdPosition/mj_tendon
|
||||
int* ten_wrapadr; // start address of tendon's path (ntendon x 1)
|
||||
int* ten_wrapnum; // number of wrap points in path (ntendon x 1)
|
||||
int* ten_J_rownnz; // number of non-zeros in Jacobian row (ntendon x 1)
|
||||
int* ten_J_rowadr; // row start address in colind array (ntendon x 1)
|
||||
int* ten_J_colind; // column indices in sparse Jacobian (ntendon x nv)
|
||||
mjtNum* ten_length; // tendon lengths (ntendon x 1)
|
||||
mjtNum* ten_J; // tendon Jacobian (ntendon x nv)
|
||||
mjtNum* ten_length; // tendon lengths (ntendon x 1)
|
||||
int* wrap_obj; // geom id; -1: site; -2: pulley (nwrap*2 x 1)
|
||||
mjtNum* wrap_xpos; // Cartesian 3D points in all path (nwrap*2 x 3)
|
||||
|
||||
@@ -267,11 +274,13 @@ struct mjData_ {
|
||||
mjtNum* qLDiagSqrtInv; // 1/sqrt(diag(D)) (nv x 1)
|
||||
|
||||
// computed by mj_collisionTree
|
||||
mjtNum* bvh_aabb_dyn; // global bounding box (center, size) (nbvhdynamic x 6)
|
||||
mjtByte* bvh_active; // volume has been added to collisions (nbvh x 1)
|
||||
|
||||
//-------------------- POSITION, VELOCITY dependent
|
||||
|
||||
// computed by mj_fwdVelocity
|
||||
mjtNum* flexedge_velocity; // flex edge velocities (nflexedge x 1)
|
||||
mjtNum* ten_velocity; // tendon velocities (ntendon x 1)
|
||||
mjtNum* actuator_velocity; // actuator velocities (nu x 1)
|
||||
|
||||
@@ -290,8 +299,8 @@ struct mjData_ {
|
||||
mjtNum* subtree_angmom; // angular momentum about subtree com (nbody x 3)
|
||||
|
||||
// computed by mj_Euler or mj_implicit
|
||||
mjtNum* qH; // L'*D*L factorization of modified M (nM x 1)
|
||||
mjtNum* qHDiagInv; // 1/diag(D) of modified M (nv x 1)
|
||||
mjtNum* qH; // L'*D*L factorization of modified M (nM x 1)
|
||||
mjtNum* qHDiagInv; // 1/diag(D) of modified M (nv x 1)
|
||||
|
||||
// computed by mj_resetData
|
||||
int* D_rownnz; // non-zeros in each row (nv x 1)
|
||||
@@ -446,6 +455,7 @@ typedef enum mjtGeom_ { // type of geometric shape
|
||||
mjGEOM_ARROW1, // arrow without wedges
|
||||
mjGEOM_ARROW2, // arrow in both directions
|
||||
mjGEOM_LINE, // line
|
||||
mjGEOM_FLEX, // flex
|
||||
mjGEOM_SKIN, // skin
|
||||
mjGEOM_LABEL, // text label
|
||||
mjGEOM_TRIANGLE, // triangle connecting a frame
|
||||
@@ -489,6 +499,7 @@ typedef enum mjtEq_ { // type of equality constraint
|
||||
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_FLEX, // fix all edge lengths of a flex
|
||||
mjEQ_DISTANCE // unsupported, will cause an error if used
|
||||
} mjtEq;
|
||||
typedef enum mjtWrap_ { // type of tendon wrap object
|
||||
@@ -539,6 +550,7 @@ typedef enum mjtObj_ { // type of MujoCo object
|
||||
mjOBJ_SITE, // site
|
||||
mjOBJ_CAMERA, // camera
|
||||
mjOBJ_LIGHT, // light
|
||||
mjOBJ_FLEX, // flex
|
||||
mjOBJ_MESH, // mesh
|
||||
mjOBJ_SKIN, // skin
|
||||
mjOBJ_HFIELD, // heightfield
|
||||
@@ -650,6 +662,13 @@ typedef enum mjtLRMode_ { // mode for actuator length range computation
|
||||
mjLRMODE_MUSCLEUSER, // process muscle and user actuators
|
||||
mjLRMODE_ALL // process all actuators
|
||||
} mjtLRMode;
|
||||
typedef enum mjtFlexSelf_ { // mode for flex selfcollide
|
||||
mjFLEXSELF_NONE = 0, // no self-collisions
|
||||
mjFLEXSELF_NARROW, // skip midphase, go directly to narrowphase
|
||||
mjFLEXSELF_BVH, // use BVH in midphase (if midphase enabled)
|
||||
mjFLEXSELF_SAP, // use SAP in midphase
|
||||
mjFLEXSELF_AUTO // choose between BVH and SAP automatically
|
||||
} mjtFlexSelf;
|
||||
struct mjLROpt_ { // options for mj_setLengthRange()
|
||||
// flags
|
||||
int mode; // which actuators to process (mjtLRMode)
|
||||
@@ -696,6 +715,7 @@ struct mjOption_ { // physics options
|
||||
mjtNum o_margin; // margin
|
||||
mjtNum o_solref[mjNREF]; // solref
|
||||
mjtNum o_solimp[mjNIMP]; // solimp
|
||||
mjtNum o_friction[5]; // friction
|
||||
|
||||
// discrete settings
|
||||
int integrator; // integration mode (mjtIntegrator)
|
||||
@@ -723,9 +743,9 @@ struct mjVisual_ { // visualization options
|
||||
float linewidth; // line width for wireframe and ray rendering
|
||||
float glow; // glow coefficient for selected body
|
||||
float realtime; // initial real-time factor (1: real time)
|
||||
int offwidth; // width of offscreen buffer
|
||||
int offheight; // height of offscreen buffer
|
||||
int ellipsoidinertia; // geom for inertia visualization (0: box, 1: ellipsoid)
|
||||
int offwidth; // width of offscreen buffer
|
||||
int offheight; // height of offscreen buffer
|
||||
int ellipsoidinertia; // geom for inertia visualization (0: box, 1: ellipsoid)
|
||||
} global;
|
||||
|
||||
struct { // rendering quality
|
||||
@@ -821,12 +841,22 @@ struct mjModel_ {
|
||||
int nu; // number of actuators/controls = dim(ctrl)
|
||||
int na; // number of activation states = dim(act)
|
||||
int nbody; // number of bodies
|
||||
int nbvh; // number of bounding volumes in all bodies
|
||||
int nbvh; // number of total bounding volumes in all bodies
|
||||
int nbvhstatic; // number of static bounding volumes (aabb stored in mjModel)
|
||||
int nbvhdynamic; // number of dynamic bounding volumes (aabb stored in mjData)
|
||||
int njnt; // number of joints
|
||||
int ngeom; // number of geoms
|
||||
int nsite; // number of sites
|
||||
int ncam; // number of cameras
|
||||
int nlight; // number of lights
|
||||
int nflex; // number of flexes
|
||||
int nflexvert; // number of vertices in all flexes
|
||||
int nflexedge; // number of edges in all flexes
|
||||
int nflexelem; // number of elements in all flexes
|
||||
int nflexelemdata; // number of element vertex ids in all flexes
|
||||
int nflexshelldata; // number of shell fragment vertex ids in all flexes
|
||||
int nflexevpair; // number of element-vertex pairs in all flexes
|
||||
int nflextexcoord; // number of vertices with texture coordinates
|
||||
int nmesh; // number of meshes
|
||||
int nmeshvert; // number of vertices in all meshes
|
||||
int nmeshnormal; // number of normals in all meshes
|
||||
@@ -925,16 +955,19 @@ struct mjModel_ {
|
||||
mjtNum* body_inertia; // diagonal inertia in ipos/iquat frame (nbody x 3)
|
||||
mjtNum* body_invweight0; // mean inv inert in qpos0 (trn, rot) (nbody x 2)
|
||||
mjtNum* body_gravcomp; // antigravity force, units of body weight (nbody x 1)
|
||||
mjtNum* body_margin; // MAX over all geom margins (nbody x 1)
|
||||
mjtNum* body_user; // user data (nbody x nuser_body)
|
||||
int* body_plugin; // plugin instance id; -1: not in use (nbody x 1)
|
||||
int* body_contype; // OR over all geom contypes (nbody x 1)
|
||||
int* body_conaffinity; // OR over all geom conaffinities (nbody x 1)
|
||||
int* body_bvhadr; // address of bvh root (nbody x 1)
|
||||
int* body_bvhnum; // number of bounding volumes (nbody x 1)
|
||||
|
||||
// bounding volume hierarchy
|
||||
int* bvh_depth; // depth in the bounding volume hierarchy (nbvh x 1)
|
||||
int* bvh_child; // left and right children in tree (nbvh x 2)
|
||||
int* bvh_geomid; // geom id of the node; -1: non-leaf (nbvh x 1)
|
||||
mjtNum* bvh_aabb; // bounding box of node (center, size) (nbvh x 6)
|
||||
int* bvh_nodeid; // geom or elem id of node; -1: non-leaf (nbvh x 1)
|
||||
mjtNum* bvh_aabb; // local bounding box (center, size) (nbvhstatic x 6)
|
||||
|
||||
// joints
|
||||
int* jnt_type; // type of joint (mjtJoint) (njnt x 1)
|
||||
@@ -1043,6 +1076,59 @@ struct mjModel_ {
|
||||
float* light_diffuse; // diffuse rgb (alpha=1) (nlight x 3)
|
||||
float* light_specular; // specular rgb (alpha=1) (nlight x 3)
|
||||
|
||||
// flexes: contact properties
|
||||
int* flex_contype; // flex contact type (nflex x 1)
|
||||
int* flex_conaffinity; // flex contact affinity (nflex x 1)
|
||||
int* flex_condim; // contact dimensionality (1, 3, 4, 6) (nflex x 1)
|
||||
int* flex_priority; // flex contact priority (nflex x 1)
|
||||
mjtNum* flex_solmix; // mix coef for solref/imp in contact pair (nflex x 1)
|
||||
mjtNum* flex_solref; // constraint solver reference: contact (nflex x mjNREF)
|
||||
mjtNum* flex_solimp; // constraint solver impedance: contact (nflex x mjNIMP)
|
||||
mjtNum* flex_friction; // friction for (slide, spin, roll) (nflex x 3)
|
||||
mjtNum* flex_margin; // detect contact if dist<margin (nflex x 1)
|
||||
mjtNum* flex_gap; // include in solver if dist<margin-gap (nflex x 1)
|
||||
mjtByte* flex_internal; // internal flex collision enabled (nflex x 1)
|
||||
int* flex_selfcollide; // self collision mode (mjtFlexSelf) (nflex x 1)
|
||||
int* flex_activelayers; // number of active element layers, 3D only (nflex x 1)
|
||||
|
||||
// flexes: other properties
|
||||
int* flex_dim; // 1: lines, 2: triangles, 3: tetrahedra (nflex x 1)
|
||||
int* flex_matid; // material id for rendering (nflex x 1)
|
||||
int* flex_group; // group for visibility (nflex x 1)
|
||||
int* flex_vertadr; // first vertex address (nflex x 1)
|
||||
int* flex_vertnum; // number of vertices (nflex x 1)
|
||||
int* flex_edgeadr; // first edge address (nflex x 1)
|
||||
int* flex_edgenum; // number of edges (nflex x 1)
|
||||
int* flex_elemadr; // first element address (nflex x 1)
|
||||
int* flex_elemnum; // number of elements (nflex x 1)
|
||||
int* flex_elemdataadr; // first element vertex id address (nflex x 1)
|
||||
int* flex_shellnum; // number of shells (nflex x 1)
|
||||
int* flex_shelldataadr; // first shell data address (nflex x 1)
|
||||
int* flex_evpairadr; // first evpair address (nflex x 1)
|
||||
int* flex_evpairnum; // number of evpairs (nflex x 1)
|
||||
int* flex_texcoordadr; // address in flex_texcoord; -1: none (nflex x 1)
|
||||
int* flex_vertbodyid; // vertex body ids (nflexvert x 1)
|
||||
int* flex_edge; // edge vertex ids (2 per edge) (nflexedge x 2)
|
||||
int* flex_elem; // element vertex ids (dim+1 per elem) (nflexelemdata x 1)
|
||||
int* flex_elemlayer; // element distance from surface, 3D only (nflexelem x 1)
|
||||
int* flex_shell; // shell fragment vertex ids (dim per frag) (nflexshelldata x 1)
|
||||
int* flex_evpair; // (element, vertex) collision pairs (nflexevpair x 2)
|
||||
mjtNum* flex_vert; // vertex positions in local body frames (nflexvert x 3)
|
||||
mjtNum* flex_xvert0; // Cartesian vertex positions in qpos0 (nflexvert x 3)
|
||||
mjtNum* flexedge_length0; // edge lengths in qpos0 (nflexedge x 1)
|
||||
mjtNum* flexedge_invweight0; // edge inv. weight in qpos0 (nflexedge x 1)
|
||||
mjtNum* flex_radius; // radius around primitive element (nflex x 1)
|
||||
mjtNum* flex_edgestiffness; // edge stiffness (nflex x 1)
|
||||
mjtNum* flex_edgedamping; // edge damping (nflex x 1)
|
||||
mjtByte* flex_edgeequality; // is edge equality constraint defined (nflex x 1)
|
||||
mjtByte* flex_rigid; // are all verices in the same body (nflex x 1)
|
||||
mjtByte* flex_centered; // are all vertex coordinates (0,0,0) (nflex x 1)
|
||||
mjtByte* flex_flatskin; // render flex skin with flat shading (nflex x 1)
|
||||
int* flex_bvhadr; // address of bvh root; -1: no bvh (nflex x 1)
|
||||
int* flex_bvhnum; // number of bounding volumes (nflex x 1)
|
||||
float* flex_rgba; // rgba when material is omitted (nflex x 4)
|
||||
float* flex_texcoord; // vertex texture coordinates (nflextexcoord x 2)
|
||||
|
||||
// meshes
|
||||
int* mesh_vertadr; // first vertex address (nmesh x 1)
|
||||
int* mesh_vertnum; // number of vertices (nmesh x 1)
|
||||
@@ -1117,7 +1203,7 @@ struct mjModel_ {
|
||||
int* pair_dim; // contact dimensionality (npair x 1)
|
||||
int* pair_geom1; // id of geom1 (npair x 1)
|
||||
int* pair_geom2; // id of geom2 (npair x 1)
|
||||
int* pair_signature; // (body1+1) << 16 + body2+1 (npair x 1)
|
||||
int* pair_signature; // body1 << 16 + body2 (npair x 1)
|
||||
mjtNum* pair_solref; // solver reference: contact normal (npair x mjNREF)
|
||||
mjtNum* pair_solreffriction; // solver reference: contact friction (npair x mjNREF)
|
||||
mjtNum* pair_solimp; // solver impedance: contact (npair x mjNIMP)
|
||||
@@ -1126,7 +1212,7 @@ struct mjModel_ {
|
||||
mjtNum* pair_friction; // tangent1, 2, spin, roll1, 2 (npair x 5)
|
||||
|
||||
// excluded body pairs for collision detection
|
||||
int* exclude_signature; // (body1+1) << 16 + body2+1 (nexclude x 1)
|
||||
int* exclude_signature; // body1 << 16 + body2 (nexclude x 1)
|
||||
|
||||
// equality constraints
|
||||
int* eq_type; // constraint type (mjtEq) (neq x 1)
|
||||
@@ -1246,6 +1332,7 @@ struct mjModel_ {
|
||||
int* name_siteadr; // site name pointers (nsite x 1)
|
||||
int* name_camadr; // camera name pointers (ncam x 1)
|
||||
int* name_lightadr; // light name pointers (nlight x 1)
|
||||
int* name_flexadr; // flex name pointers (nflex x 1)
|
||||
int* name_meshadr; // mesh name pointers (nmesh x 1)
|
||||
int* name_skinadr; // skin name pointers (nskin x 1)
|
||||
int* name_hfieldadr; // hfield name pointers (nhfield x 1)
|
||||
@@ -1732,6 +1819,7 @@ typedef enum mjtLabel_ { // object labeling
|
||||
mjLABEL_TENDON, // tendon labels
|
||||
mjLABEL_ACTUATOR, // actuator labels
|
||||
mjLABEL_CONSTRAINT, // constraint labels
|
||||
mjLABEL_FLEX, // flex labels
|
||||
mjLABEL_SKIN, // skin labels
|
||||
mjLABEL_SELECTION, // selected object
|
||||
mjLABEL_SELPNT, // coordinates of selection point
|
||||
@@ -1778,7 +1866,12 @@ typedef enum mjtVisFlag_ { // flags enabling model element visualization
|
||||
mjVIS_SELECT, // selection point
|
||||
mjVIS_STATIC, // static bodies
|
||||
mjVIS_SKIN, // skin
|
||||
mjVIS_MIDPHASE, // mid-phase bounding volume hierarchy
|
||||
mjVIS_FLEXVERT, // flex vertices
|
||||
mjVIS_FLEXEDGE, // flex edges
|
||||
mjVIS_FLEXFACE, // flex element faces
|
||||
mjVIS_FLEXSKIN, // flex smooth skin (disables the rest)
|
||||
mjVIS_BODYBVH, // body bounding volume hierarchy
|
||||
mjVIS_FLEXBVH, // flex bounding volume hierarchy
|
||||
mjVIS_MESHBVH, // mesh bounding volume hierarchy
|
||||
mjVIS_SDFITER, // iterations of SDF gradient descent
|
||||
|
||||
@@ -1805,6 +1898,7 @@ typedef enum mjtStereo_ { // type of stereo rendering
|
||||
} mjtStereo;
|
||||
struct mjvPerturb_ { // object selection and perturbation
|
||||
int select; // selected body id; non-positive: none
|
||||
int flexselect; // selected flex id; negative: none
|
||||
int skinselect; // selected skin id; negative: none
|
||||
int active; // perturbation bitmask (mjtPertBit)
|
||||
int active2; // secondary perturbation bitmask (mjtPertBit)
|
||||
@@ -1853,7 +1947,7 @@ struct mjvGeom_ { // abstract geom
|
||||
int category; // visual category
|
||||
int texid; // texture id; -1: no texture
|
||||
int texuniform; // uniform cube mapping
|
||||
int texcoord; // mesh geom has texture coordinates
|
||||
int texcoord; // mesh or flex geom has texture coordinates
|
||||
int segid; // segmentation id; -1: not shown
|
||||
|
||||
// OpenGL info
|
||||
@@ -1896,9 +1990,11 @@ struct mjvOption_ { // abstract visualization options
|
||||
mjtByte jointgroup[mjNGROUP]; // joint visualization by group
|
||||
mjtByte tendongroup[mjNGROUP]; // tendon visualization by group
|
||||
mjtByte actuatorgroup[mjNGROUP]; // actuator visualization by group
|
||||
mjtByte flexgroup[mjNGROUP]; // flex visualization by group
|
||||
mjtByte skingroup[mjNGROUP]; // skin visualization by group
|
||||
mjtByte flags[mjNVISFLAG]; // visualization flags (indexed by mjtVisFlag)
|
||||
int bvh_depth; // depth of the bounding volume hierarchy to be visualized
|
||||
int bvh_depth; // depth of the bounding volume hierarchy to be visualized
|
||||
int flex_layer; // element layer to be visualized for 3D flex
|
||||
};
|
||||
typedef struct mjvOption_ mjvOption;
|
||||
struct mjvScene_ { // abstract scene passed to OpenGL renderer
|
||||
@@ -1908,13 +2004,32 @@ struct mjvScene_ { // abstract scene passed to OpenGL renderer
|
||||
mjvGeom* geoms; // buffer for geoms (ngeom)
|
||||
int* geomorder; // buffer for ordering geoms by distance to camera (ngeom)
|
||||
|
||||
// flex data
|
||||
int nflex; // number of flexes
|
||||
int* flexedgeadr; // address of flex edges (nflex)
|
||||
int* flexedgenum; // number of edges in flex (nflex)
|
||||
int* flexvertadr; // address of flex vertices (nflex)
|
||||
int* flexvertnum; // number of vertices in flex (nflex)
|
||||
int* flexfaceadr; // address of flex faces (nflex)
|
||||
int* flexfacenum; // number of flex faces allocated (nflex)
|
||||
int* flexfaceused; // number of flex faces currently in use (nflex)
|
||||
int* flexedge; // flex edge data (2*nflexedge)
|
||||
float* flexvert; // flex vertices (3*nflexvert)
|
||||
float* flexface; // flex faces vertices (9*sum(flexfacenum))
|
||||
float* flexnormal; // flex face normals (9*sum(flexfacenum))
|
||||
float* flextexcoord; // flex face texture coordinates (6*sum(flexfacenum))
|
||||
mjtByte flexvertopt; // copy of mjVIS_FLEXVERT mjvOption flag
|
||||
mjtByte flexedgeopt; // copy of mjVIS_FLEXEDGE mjvOption flag
|
||||
mjtByte flexfaceopt; // copy of mjVIS_FLEXFACE mjvOption flag
|
||||
mjtByte flexskinopt; // copy of mjVIS_FLEXSKIN mjvOption flag
|
||||
|
||||
// skin data
|
||||
int nskin; // number of skins
|
||||
int* skinfacenum; // number of faces in skin (nskin)
|
||||
int* skinvertadr; // address of skin vertices (nskin)
|
||||
int* skinvertnum; // number of vertices in skin (nskin)
|
||||
float* skinvert; // skin vertex data (nskin)
|
||||
float* skinnormal; // skin normal data (nskin)
|
||||
float* skinvert; // skin vertex data (3*nskinvert)
|
||||
float* skinnormal; // skin normal data (3*nskinvert)
|
||||
|
||||
// OpenGL lights
|
||||
int nlight; // number of lights currently in buffer
|
||||
@@ -1998,6 +2113,7 @@ struct mjvSceneState_ {
|
||||
int na;
|
||||
int nbody;
|
||||
int nbvh;
|
||||
int nbvhstatic;
|
||||
int njnt;
|
||||
int ngeom;
|
||||
int nsite;
|
||||
@@ -2005,6 +2121,8 @@ struct mjvSceneState_ {
|
||||
int nlight;
|
||||
int nmesh;
|
||||
int nskin;
|
||||
int nflex;
|
||||
int nflexvert;
|
||||
int nskinvert;
|
||||
int nskinface;
|
||||
int nskinbone;
|
||||
@@ -2041,7 +2159,7 @@ struct mjvSceneState_ {
|
||||
|
||||
int* bvh_depth;
|
||||
int* bvh_child;
|
||||
int* bvh_geomid;
|
||||
int* bvh_nodeid;
|
||||
mjtNum* bvh_aabb;
|
||||
|
||||
int* jnt_type;
|
||||
@@ -2081,6 +2199,24 @@ struct mjvSceneState_ {
|
||||
float* light_diffuse;
|
||||
float* light_specular;
|
||||
|
||||
mjtByte* flex_flatskin;
|
||||
int* flex_dim;
|
||||
int* flex_matid;
|
||||
int* flex_group;
|
||||
int* flex_vertadr;
|
||||
int* flex_vertnum;
|
||||
int* flex_elem;
|
||||
int* flex_elemadr;
|
||||
int* flex_elemnum;
|
||||
int* flex_elemdataadr;
|
||||
int* flex_shell;
|
||||
int* flex_shellnum;
|
||||
int* flex_shelldataadr;
|
||||
int* flex_bvhadr;
|
||||
int* flex_bvhnum;
|
||||
mjtNum* flex_radius;
|
||||
float* flex_rgba;
|
||||
|
||||
int* mesh_bvhadr;
|
||||
int* mesh_bvhnum;
|
||||
int* mesh_texcoordadr;
|
||||
@@ -2212,6 +2348,8 @@ struct mjvSceneState_ {
|
||||
int* efc_island;
|
||||
int* tendon_efcadr;
|
||||
|
||||
mjtNum* flexvert_xpos;
|
||||
|
||||
mjContact* contact;
|
||||
mjtNum* efc_force;
|
||||
} data;
|
||||
@@ -2291,6 +2429,7 @@ void mj_checkAcc(const mjModel* m, mjData* d);
|
||||
void mj_kinematics(const mjModel* m, mjData* d);
|
||||
void mj_comPos(const mjModel* m, mjData* d);
|
||||
void mj_camlight(const mjModel* m, mjData* d);
|
||||
void mj_flex(const mjModel* m, mjData* d);
|
||||
void mj_tendon(const mjModel* m, mjData* d);
|
||||
void mj_transmission(const mjModel* m, mjData* d);
|
||||
void mj_crb(const mjModel* m, mjData* d);
|
||||
@@ -2365,6 +2504,9 @@ mjtNum mj_rayMesh(const mjModel* m, const mjData* d, int geomid,
|
||||
const mjtNum pnt[3], const mjtNum vec[3]);
|
||||
mjtNum mju_rayGeom(const mjtNum pos[3], const mjtNum mat[9], const mjtNum size[3],
|
||||
const mjtNum pnt[3], const mjtNum vec[3], int geomtype);
|
||||
mjtNum mju_rayFlex(const mjModel* m, const mjData* d, int flex_layer, mjtByte flg_vert,
|
||||
mjtByte flg_edge, mjtByte flg_face, mjtByte flg_skin, int flexid,
|
||||
const mjtNum* pnt, const mjtNum* vec, int vertid[1]);
|
||||
mjtNum mju_raySkin(int nface, int nvert, const int* face, const float* vert,
|
||||
const mjtNum pnt[3], const mjtNum vec[3], int vertid[1]);
|
||||
void mjv_defaultCamera(mjvCamera* cam);
|
||||
@@ -2399,7 +2541,8 @@ void mjv_applyPerturbForce(const mjModel* m, mjData* d, const mjvPerturb* pert);
|
||||
mjvGLCamera mjv_averageCamera(const mjvGLCamera* cam1, const mjvGLCamera* cam2);
|
||||
int mjv_select(const mjModel* m, const mjData* d, const mjvOption* vopt,
|
||||
mjtNum aspectratio, mjtNum relx, mjtNum rely,
|
||||
const mjvScene* scn, mjtNum selpnt[3], int geomid[1], int skinid[1]);
|
||||
const mjvScene* scn, mjtNum selpnt[3],
|
||||
int geomid[1], int flexid[1], int skinid[1]);
|
||||
void mjv_defaultOption(mjvOption* opt);
|
||||
void mjv_defaultFigure(mjvFigure* fig);
|
||||
void mjv_initGeom(mjvGeom* geom, int type, const mjtNum size[3],
|
||||
|
||||
Reference in New Issue
Block a user