diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7bc18f65..84646f60 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,23 +25,31 @@ jobs: matrix: include: - os: ubuntu-22.04 - additional_label: "with GCC 11" + additional_label: "-gcc-12" + cmake_args: >- + -G Ninja + -DCMAKE_C_COMPILER:STRING=gcc-12 + -DCMAKE_CXX_COMPILER:STRING=g++-12 + -DCMAKE_EXE_LINKER_FLAGS:STRING=-Wl,--no-as-needed + tmpdir: "/tmp" + - os: ubuntu-22.04 + additional_label: "-gcc-11" cmake_args: >- -G Ninja -DCMAKE_C_COMPILER:STRING=gcc-11 -DCMAKE_CXX_COMPILER:STRING=g++-11 -DCMAKE_EXE_LINKER_FLAGS:STRING=-Wl,--no-as-needed tmpdir: "/tmp" - - os: ubuntu-20.04 - additional_label: "with GCC 10" + - os: ubuntu-22.04 + additional_label: "-gcc-10" cmake_args: >- -G Ninja -DCMAKE_C_COMPILER:STRING=gcc-10 -DCMAKE_CXX_COMPILER:STRING=g++-10 -DCMAKE_EXE_LINKER_FLAGS:STRING=-Wl,--no-as-needed tmpdir: "/tmp" - - os: ubuntu-20.04 - additional_label: "with GCC 9" + - os: ubuntu-22.04 + additional_label: "-gcc-9" cmake_args: >- -G Ninja -DCMAKE_C_COMPILER:STRING=gcc-9 @@ -49,7 +57,7 @@ jobs: -DCMAKE_EXE_LINKER_FLAGS:STRING=-Wl,--no-as-needed tmpdir: "/tmp" - os: ubuntu-22.04 - additional_label: "with Clang 14" + additional_label: "-clang-14" cmake_args: >- -G Ninja -DCMAKE_C_COMPILER:STRING=clang-14 @@ -57,15 +65,15 @@ jobs: -DMUJOCO_HARDEN:BOOL=ON tmpdir: "/tmp" - os: ubuntu-22.04 - additional_label: "with Clang 13" + additional_label: "-clang-13" cmake_args: >- -G Ninja -DCMAKE_C_COMPILER:STRING=clang-13 -DCMAKE_CXX_COMPILER:STRING=clang++-13 -DMUJOCO_HARDEN:BOOL=ON tmpdir: "/tmp" - - os: ubuntu-22.04 - additional_label: "with Clang 12" + - os: ubuntu-20.04 + additional_label: "-clang-12" cmake_args: >- -G Ninja -DCMAKE_C_COMPILER:STRING=clang-12 @@ -73,7 +81,7 @@ jobs: -DMUJOCO_HARDEN:BOOL=ON tmpdir: "/tmp" - os: ubuntu-20.04 - additional_label: "with Clang 11" + additional_label: "-clang-11" cmake_args: >- -G Ninja -DCMAKE_C_COMPILER:STRING=clang-11 @@ -81,7 +89,7 @@ jobs: -DMUJOCO_HARDEN:BOOL=ON tmpdir: "/tmp" - os: ubuntu-20.04 - additional_label: "with Clang 10" + additional_label: "-clang-10" cmake_args: >- -G Ninja -DCMAKE_C_COMPILER:STRING=clang-10 @@ -98,13 +106,8 @@ jobs: -DCMAKE_SYSTEM_VERSION="10.0.22621.0" cmake_build_args: "-- -m" tmpdir: "C:/Temp" - - os: windows-2019 - cmake_args: >- - -DCMAKE_SYSTEM_VERSION="10.0.22621.0" - cmake_build_args: "-- -m" - tmpdir: "C:/Temp" - name: "MuJoCo on ${{ matrix.os }} ${{ matrix.additional_label }}" + name: "${{ matrix.os }}${{ matrix.additional_label }}" runs-on: ${{ matrix.os }} steps: @@ -216,7 +219,7 @@ jobs: working-directory: python/dist run: > source ${{ matrix.tmpdir }}/venv/bin/activate && - pip install mujoco-*.whl + pip install --no-deps --no-index mujoco-*.whl - name: Test Python bindings if: ${{ runner.os != 'Windows' }} shell: bash @@ -225,3 +228,23 @@ jobs: run: > source ${{ matrix.tmpdir }}/venv/bin/activate && pytest -v --pyargs mujoco + - name: Notify team chat + shell: bash + env: + GCHAT_API: ${{ secrets.GCHAT_API }} + JOB_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/\ + ${{ github.run_id }}" + if: ${{ failure() && github.event_name == 'push' && env.GCHAT_API != '' }} + run: > + curl + "$GCHAT_API&threadKey=$GITHUB_SHA&messageReplyOption=REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD" + -X POST + -H "Content-Type: application/json" + -d "{ + 'text': '<$JOB_URL|*FAILURE*>: + job \`${{ matrix.os }}${{ matrix.additional_label }}\` + commit \`$(echo $GITHUB_SHA | head -c6)\`\n + \`\`\`Author: ${{ github.event.head_commit.author.name }} + <${{ github.event.head_commit.author.email }}> + \n\n${{ github.event.head_commit.message }}\`\`\` + '}" diff --git a/cmake/MujocoDependencies.cmake b/cmake/MujocoDependencies.cmake index 5b80f6b3..48c82034 100644 --- a/cmake/MujocoDependencies.cmake +++ b/cmake/MujocoDependencies.cmake @@ -39,22 +39,22 @@ set(MUJOCO_DEP_VERSION_qhull CACHE STRING "Version of `qhull` to be fetched." ) set(MUJOCO_DEP_VERSION_Eigen3 - 211c5dfc6741a5570ad007983c113ef4d144f9f3 + e8515f78ac098329ab9f8cab21c87caede090a3f CACHE STRING "Version of `Eigen3` to be fetched." ) set(MUJOCO_DEP_VERSION_abseil - c2435f8342c2d0ed8101cb43adfd605fdc52dca2 # LTS 20230125.3 + fb3621f4f897824c0dbe0615fa94543df6192f30 # LTS 20230802.1 CACHE STRING "Version of `abseil` to be fetched." ) set(MUJOCO_DEP_VERSION_gtest - b796f7d44681514f58a683a3a71ff17c94edb0c1 # v1.13.0 + f8d7d77c06936315286eb55f8de22cd23c188571 # v1.14.0 CACHE STRING "Version of `gtest` to be fetched." ) set(MUJOCO_DEP_VERSION_benchmark - 2dd015dfef425c866d9a43f2c67d8b52d709acb6 # v1.8.0 + 344117638c8ff7e239044fd0fa7085839fc03021 # v1.8.3 CACHE STRING "Version of `benchmark` to be fetched." ) diff --git a/cmake/sdflib-optional-dependencies.patch b/cmake/sdflib-optional-dependencies.patch index 2ec2ed04..46f44931 100644 --- a/cmake/sdflib-optional-dependencies.patch +++ b/cmake/sdflib-optional-dependencies.patch @@ -1,8 +1,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 20551cf..9145032 100644 +index 20551cf..0d2a364 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -70,14 +70,21 @@ add_custom_target(copyShaders ALL SOURCES ${SHADER_FILES}) +@@ -70,15 +70,25 @@ add_custom_target(copyShaders ALL SOURCES ${SHADER_FILES}) # Add dependencies add_subdirectory(libs) @@ -16,19 +16,25 @@ index 20551cf..9145032 100644 + target_link_libraries(${PROJECT_NAME} PUBLIC assimp) + target_compile_definitions(${PROJECT_NAME} PUBLIC -DASSIMP_AVAILABLE) +endif() ++ ++if(SDFLIB_BUILD_APPS OR SDFLIB_BUILD_DEBUG_APPS) ++ target_link_libraries(${PROJECT_NAME} PUBLIC args) ++ target_link_libraries(${PROJECT_NAME} PUBLIC stb_image) ++endif() + target_link_libraries(${PROJECT_NAME} PUBLIC glm) -target_link_libraries(${PROJECT_NAME} PUBLIC assimp) - target_link_libraries(${PROJECT_NAME} PUBLIC args) +-target_link_libraries(${PROJECT_NAME} PUBLIC args) target_link_libraries(${PROJECT_NAME} PUBLIC spdlog) target_link_libraries(${PROJECT_NAME} PUBLIC cereal) -target_link_libraries(${PROJECT_NAME} PUBLIC enoki) -target_link_libraries(${PROJECT_NAME} PUBLIC eigen) -target_link_libraries(${PROJECT_NAME} PUBLIC fcpw) - target_link_libraries(${PROJECT_NAME} PUBLIC stb_image) +-target_link_libraries(${PROJECT_NAME} PUBLIC stb_image) target_link_libraries(${PROJECT_NAME} PUBLIC icg) -@@ -86,17 +93,22 @@ if(CMAKE_CXX_COMPILER_ID MATCHES GNU) + if(CMAKE_CXX_COMPILER_ID MATCHES GNU) +@@ -86,17 +96,22 @@ if(CMAKE_CXX_COMPILER_ID MATCHES GNU) endif() # Add openMP @@ -62,7 +68,7 @@ index 20551cf..9145032 100644 # Add executable if (NOT UNIX) -@@ -160,6 +172,7 @@ if(SDFLIB_BUILD_DEBUG_APPS) +@@ -160,6 +175,7 @@ if(SDFLIB_BUILD_DEBUG_APPS) add_executable(GJKtest src/tools/GJKtest/main.cpp) target_link_libraries(GJKtest PUBLIC ${PROJECT_NAME}) @@ -269,10 +275,10 @@ index 9f930ed..6ee2304 100644 \ No newline at end of file +#endif diff --git a/libs/CMakeLists.txt b/libs/CMakeLists.txt -index b48bf39..3f143c8 100644 +index b48bf39..ea22b9a 100644 --- a/libs/CMakeLists.txt +++ b/libs/CMakeLists.txt -@@ -14,23 +14,25 @@ if(NOT glm_lib_POPULATED) +@@ -14,37 +14,41 @@ if(NOT glm_lib_POPULATED) endif() # assimp @@ -314,7 +320,34 @@ index b48bf39..3f143c8 100644 endif() # args -@@ -76,43 +78,47 @@ if(NOT cereal_lib_POPULATED) +-FetchContent_Declare(args_lib +- GIT_REPOSITORY https://github.com/Taywee/args.git +- GIT_TAG a48e1f880813b367d2354963a58dedbf2b708584 # 6.3.0 +-) +- +-FetchContent_GetProperties(args_lib) +-if(NOT args_lib_POPULATED) +- FetchContent_Populate(args_lib) +- add_library(args INTERFACE) +- target_include_directories(args INTERFACE ${args_lib_SOURCE_DIR}) +-endif() ++if(SDFLIB_BUILD_APPS OR SDFLIB_BUILD_DEBUG_APPS) ++ FetchContent_Declare(args_lib ++ GIT_REPOSITORY https://github.com/Taywee/args.git ++ GIT_TAG a48e1f880813b367d2354963a58dedbf2b708584 # 6.3.0 ++ ) ++ ++ FetchContent_GetProperties(args_lib) ++ if(NOT args_lib_POPULATED) ++ FetchContent_Populate(args_lib) ++ add_library(args INTERFACE) ++ target_include_directories(args INTERFACE ${args_lib_SOURCE_DIR}) ++ endif() ++ endif() + + # spdlog + FetchContent_Declare(spdlog_lib +@@ -76,47 +80,53 @@ if(NOT cereal_lib_POPULATED) endif() # Enoki @@ -395,7 +428,15 @@ index b48bf39..3f143c8 100644 + endif() # stb - add_library(stb_image INTERFACE) +-add_library(stb_image INTERFACE) +-target_include_directories(stb_image INTERFACE stb) ++if(SDFLIB_BUILD_APPS OR SDFLIB_BUILD_DEBUG_APPS) ++ add_library(stb_image INTERFACE) ++ target_include_directories(stb_image INTERFACE stb) ++ endif() + + # icg + add_library(icg INTERFACE) diff --git a/src/sdf/OctreeSdf.cpp b/src/sdf/OctreeSdf.cpp index ef8ed4d..0e1eb97 100644 --- a/src/sdf/OctreeSdf.cpp diff --git a/doc/APIreference/APIglobals.rst b/doc/APIreference/APIglobals.rst index 6bb4726e..8a6502d1 100644 --- a/doc/APIreference/APIglobals.rst +++ b/doc/APIreference/APIglobals.rst @@ -489,6 +489,10 @@ shown in the table below. Their names are in the format ``mjKEY_XXX``. They corr - 1000 - Maximum number of textures allowed. Defined in `mjrender.h `_. + * - ``mjMAXTHREADS`` + - 128 + - Maximum number OS threads that can be used in a thread pool. + Defined in `mjthread.h `_. * - ``mjMAXUISECT`` - 10 - Maximum number of UI sections. diff --git a/doc/APIreference/APItypes.rst b/doc/APIreference/APItypes.rst index 2fd10428..d2a812d6 100644 --- a/doc/APIreference/APItypes.rst +++ b/doc/APIreference/APItypes.rst @@ -174,18 +174,6 @@ Numerical integrator types. These values are used in ``m->opt.integrator``. .. mujoco-include:: mjtIntegrator - -.. _mjtCollision: - -mjtCollision -~~~~~~~~~~~~ - -Collision modes specifying how candidate geom pairs are generated for near-phase collision checking. These values are -used in ``m->opt.collision``. - -.. mujoco-include:: mjtCollision - - .. _mjtCone: mjtCone @@ -514,6 +502,18 @@ These are the possible framebuffers. They are used as an argument to the functio .. mujoco-include:: mjtFramebuffer +.. _mjtDepthMap: + +mjtDepthMap +~~~~~~~~~~~ + +These are the depth mapping options. They are used as a value for the ``readPixelDepth`` attribute of the +:ref:`mjrContext` struct, to control how the depth returned by :ref:`mjr_readPixels` is mapped from +``znear`` to ``zfar``. + +.. mujoco-include:: mjtDepthMap + + .. _mjtFontScale: mjtFontScale diff --git a/doc/APIreference/functions.rst b/doc/APIreference/functions.rst index 1f33d81b..09622ed0 100644 --- a/doc/APIreference/functions.rst +++ b/doc/APIreference/functions.rst @@ -413,7 +413,7 @@ mj_differentiatePos This function subtracts two vectors in the format of qpos (and divides the result by dt), while respecting the properties of quaternions. Recall that unit quaternions represent spatial orientations. They are points on the unit sphere in 4D. The tangent to that sphere is a 3D plane of rotational velocities. Thus when we subtract two quaternions -in the right way, the result is a 3D vector and not a 4D vector. This the output qvel has dimensionality nv while the +in the right way, the result is a 3D vector and not a 4D vector. Thus the output qvel has dimensionality nv while the inputs have dimensionality nq. .. _mj_integratePos: @@ -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 @@ -1251,12 +1270,12 @@ mj_freeStack Free the current :ref:`mjData` stack frame. All pointers returned by mj_stackAlloc since the last call to mj_markStack must no longer be used afterwards. -.. _mj_stackAlloc: +.. _mj_stackAllocByte: -mj_stackAlloc -~~~~~~~~~~~~~ +mj_stackAllocByte +~~~~~~~~~~~~~~~~~ -.. mujoco-include:: mj_stackAlloc +.. mujoco-include:: mj_stackAllocByte Allocate a number of bytes on :ref:`mjData` stack at a specific alignment. Call mju_error on stack overflow. @@ -3256,6 +3275,9 @@ These matrices and their dimensions are: - All outputs are optional (can be NULL). - ``eps`` is the finite-differencing epsilon. - ``flg_centered`` denotes whether to use forward (0) or centered (1) differences. +- Accuracy can be somewhat improved if solver :ref:`iterations` are set to a + fixed (small) value and solver :ref:`tolerance` is set to 0. This insures that + all calls to the solver will perform exactly the same number of iterations. .. _mjd_inverseFD: @@ -3446,6 +3468,15 @@ mju_threadPoolCreate Create a thread pool with the specified number of threads running. +.. _mju_bindThreadPool: + +mju_bindThreadPool +~~~~~~~~~~~~~~~~~~ + +.. mujoco-include:: mju_bindThreadPool + +Adds a thread pool to :ref:`mjData` and configures it for multi-threaded use. + .. _mju_threadPoolEnqueue: mju_threadPoolEnqueue diff --git a/doc/APIreference/functions_override.rst b/doc/APIreference/functions_override.rst index 9152d5b7..98241ae5 100644 --- a/doc/APIreference/functions_override.rst +++ b/doc/APIreference/functions_override.rst @@ -159,7 +159,7 @@ we want to add the result to a different vector. This function subtracts two vectors in the format of qpos (and divides the result by dt), while respecting the properties of quaternions. Recall that unit quaternions represent spatial orientations. They are points on the unit sphere in 4D. The tangent to that sphere is a 3D plane of rotational velocities. Thus when we subtract two quaternions -in the right way, the result is a 3D vector and not a 4D vector. This the output qvel has dimensionality nv while the +in the right way, the result is a 3D vector and not a 4D vector. Thus the output qvel has dimensionality nv while the inputs have dimensionality nq. .. _mj_integratePos: @@ -463,6 +463,9 @@ These matrices and their dimensions are: - All outputs are optional (can be NULL). - ``eps`` is the finite-differencing epsilon. - ``flg_centered`` denotes whether to use forward (0) or centered (1) differences. +- Accuracy can be somewhat improved if solver :ref:`iterations` are set to a + fixed (small) value and solver :ref:`tolerance` is set to 0. This insures that + all calls to the solver will perform exactly the same number of iterations. .. _mjd_inverseFD: diff --git a/doc/XMLreference.rst b/doc/XMLreference.rst index fa2d63fe..a97481a7 100644 --- a/doc/XMLreference.rst +++ b/doc/XMLreference.rst @@ -146,13 +146,12 @@ any effect. The settings here are global and apply to the entire model. .. _compiler-autolimits: -:at:`autolimits`: :at-val:`[false, true], "false"` +:at:`autolimits`: :at-val:`[false, true], "true"` This attribute affects the behavior of attributes such as "limited" (on or ), "forcelimited", "ctrllimited", and "actlimited" (on ). If "true", these attributes are unnecessary and their value will be inferred from the presence of their corresponding "range" attribute. If "false", no such inference will happen: For a joint to be limited, both limited="true" and range="min max" must be specified. In this mode, it is an error to specify a range without a limit. - |br| The default for this option will be set to "true" in an upcoming release. .. _compiler-boundmass: @@ -1322,9 +1321,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 `__ (formerly known as MIME types) of the + `Media Type `_ (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. @@ -1562,7 +1561,7 @@ The full list of processing steps applied by the compiler to each mesh is as fol .. _mesh-plugin: :el-prefix:`mesh/` |-| **plugin** (?) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +''''''''''''''''''''''''''''''''''''' Associate this mesh with an :ref:`engine plugin`. Either :at:`plugin` or :at:`instance` are required. @@ -1578,6 +1577,7 @@ Associate this mesh with an :ref:`engine plugin`. Either :at:`plugin` +.. _deformable-skin: .. _asset-skin: :el-prefix:`asset/` |-| **skin** (*) @@ -1641,11 +1641,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 +1655,13 @@ be clear from the above specification. :ref:`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 +1671,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 +1698,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 +1928,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: @@ -1931,14 +1942,6 @@ adjust it properly through the XML. Implicit-in-velocity Euler method, and :at:`implicitfast`, which drops the Coriolis and centrifugal terms. See :ref:`Numerical Integration` for more details. -.. _option-collision: - -:at:`collision`: :at-val:`[all, predefined, dynamic], "all"` - This attribute specifies which geom pairs should be checked for collision; recall :ref:`Collision` in the Computation - chapter. "predefined" means that only the explicitly-defined contact :ref:`pairs ` are checked. - "dynamic" means that only the contact pairs generated dynamically are checked. "all" means that the contact pairs - from both sources are checked. - .. _option-cone: :at:`cone`: :at-val:`[pyramidal, elliptic], "pyramidal"` @@ -2246,24 +2249,6 @@ defined. Its body name is automatically defined as "world". See :ref:`CUser`. -.. _body-plugin: - -:el-prefix:`body/` |-| **plugin** (?) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Associate this body with an :ref:`engine plugin`. Either :at:`plugin` or :at:`instance` are required. - -.. _body-plugin-plugin: - -:at:`plugin`: :at-val:`string, optional` - Plugin identifier, used for implicit plugin instantiation. - -.. _body-plugin-instance: - -:at:`instance`: :at-val:`string, optional` - Instance name, used for explicit plugin instantiation. - - .. _body-inertial: :el-prefix:`body/` |-| **inertial** (?) @@ -2864,31 +2849,48 @@ helps clarify the role of bodies and geoms in MuJoCo. .. _body-geom-fluidshape: :at:`fluidshape`: :at-val:`[none, ellipsoid], "none"` - "ellipsoid" Activates geom-level stateless fluid interaction model based on an ellipsoidal approximation of the geom - shape. When active, the model based on :ref:`body inertia sizes ` is disabled for the parent body. + "ellipsoid" activates the geom-level fluid interaction model based on an ellipsoidal approximation of the geom + shape. When active, the model based on :ref:`body inertia sizes ` is disabled for the parent body. + See section on :ref:`ellipsoid-based` fluid interaction model for details. .. _body-geom-fluidcoef: :at:`fluidcoef`: :at-val:`real(5), "0.5 0.25 1.5 1.0 1.0"` Dimensionless coefficients of fluid interaction model, as follows. + See section on :ref:`ellipsoid-based` fluid interaction model for details. -.. table:: +.. list-table:: + :width: 60% :align: left + :widths: 1 5 2 1 + :header-rows: 1 + + * - Index + - Description + - Symbol + - Default + * - 0 + - Blunt drag coefficient + - :math:`C_{D, \text{blunt}}` + - 0.5 + * - 1 + - Slender drag coeficient + - :math:`C_{D, \text{slender}}` + - 0.25 + * - 2 + - Angular drag coeficient + - :math:`C_{D, \text{angular}}` + - 1.5 + * - 3 + - Kutta lift coeficient + - :math:`C_K` + - 1.0 + * - 4 + - Magnus lift coeficient + - :math:`C_M` + - 1.0 - +--------+-----------------------------+----------+ - | Index | Description | Default | - +========+=============================+==========+ - | 0 | Blunt drag coefficient. | 0.5 | - +--------+-----------------------------+----------+ - | 1 | Slender drag coeficient. | 0.25 | - +--------+-----------------------------+----------+ - | 2 | Angular drag coefficient. | 1.5 | - +--------+-----------------------------+----------+ - | 3 | Kutta lift coeficient. | 1.0 | - +--------+-----------------------------+----------+ - | 4 | Magnus lift coeficient. | 1.0 | - +--------+-----------------------------+----------+ .. _body-geom-user: @@ -2898,7 +2900,7 @@ helps clarify the role of bodies and geoms in MuJoCo. .. _geom-plugin: :el-prefix:`geom/` |-| **plugin** (?) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +''''''''''''''''''''''''''''''''''''' Associate this geom with an :ref:`engine plugin`. Either :at:`plugin` or :at:`instance` are required. @@ -3062,6 +3064,35 @@ and the +Y axis points up. Thus the frame position and orientation are the key a dimensions are determined by the size of the rendering context. This attribute serves as a convenient location to save the required resolution when creating a context. +.. _body-camera-focal: + +:at:`focal`: :at-val:`real(2), "0 0"` + Focal length of the camera in length units. It is mutually exclusive with :ref:`fovy `. + See :ref:`CCamera` for details. + +.. _body-camera-focalpixel: + +:at:`focalpixel`: :at-val:`int(2), "0 0"` + Focal length of the camera in pixel units. If both :at:`focal`: and :at:`focalpixel`: are specified, the former is + ignored. + +.. _body-camera-principal: + +:at:`principal`: :at-val:`real(2), "0 0"` + Principal point of the camera in length units. It is mutually exclusive with :ref:`fovy `. + +.. _body-camera-principalpixel: + +:at:`principalpixel`: :at-val:`real(2), "0 0"` + Principal point of the camera in pixel units. If both :at:`principal`: and :at:`principalpixel`: are specified, the + former is ignored. + +.. _body-camera-sensorsize: + +:at:`sensorsize`: :at-val:`real(2), "0 0"` + Size of the camera sensor in length units. It is mutually exclusive with :ref:`fovy `. If + specified, :ref:`resolution ` and :ref:`focal ` are required. + .. _body-camera-ipd: :at:`ipd`: :at-val:`real, "0.068"` @@ -3200,6 +3231,24 @@ the direction specified by the dir attribute. It does not have a full spatial fr The specular color of the light. +.. _body-plugin: + +:el-prefix:`body/` |-| **plugin** (?) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Associate this body with an :ref:`engine plugin`. Either :at:`plugin` or :at:`instance` are required. + +.. _body-plugin-plugin: + +:at:`plugin`: :at-val:`string, optional` + Plugin identifier, used for implicit plugin instantiation. + +.. _body-plugin-instance: + +:at:`instance`: :at-val:`string, optional` + Instance name, used for explicit plugin instantiation. + + .. _body-composite: :el-prefix:`body/` |-| **composite** (*) @@ -3337,7 +3386,7 @@ coordinates results in compiler error. See :ref:`CComposite` in the modeling gui .. _body-composite-vertex: :at:`vertex`: :at-val:`real(3*nvert), optional` - Vertex 3D positions in global coordinates (cable only). + Vertex 3D positions in global coordinates (cable and shell). .. _body-composite-face: @@ -3650,7 +3699,7 @@ handle where the composite object is attached. For other composite types this su .. _composite-plugin: :el-prefix:`composite/` |-| **plugin** (?) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +'''''''''''''''''''''''''''''''''''''''''' Associate this composite with an :ref:`engine plugin`. Either :at:`plugin` or :at:`instance` are required. @@ -3664,6 +3713,158 @@ Associate this composite with an :ref:`engine plugin`. 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: + +.. _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** (*) @@ -3816,8 +4017,8 @@ geoms volumes of either body. This constraint can be used to define ball joints :at:`active`: :at-val:`[false, true], "true"` If this attribute is set to "true", the constraint is active and the constraint solver will try to enforce it. The - corresponding field in mjModel is mjData.eq_active. This field can be used at runtime to turn specific constraints on - an off. + field :ref:`mjModel.eq_active0` corresponds to this value, and is used to initialize + :ref:`mjData.eq_active`, which is user-settable at runtime. .. _equality-connect-solref: @@ -3882,7 +4083,8 @@ of the other body, without any joint elements in the child body. :at:`body2`: :at-val:`string, optional` Name of the second body. If this attribute is omitted, the second body is the world body. Welding a body to the world - and changing the corresponding component of mjModel.eq_active at runtime can be used to fix the body temporarily. + and changing the corresponding component of :ref:`mjData.eq_active` at runtime can be used to fix the body + temporarily. .. _equality-weld-relpose: @@ -3988,6 +4190,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** (*) @@ -6691,8 +6911,6 @@ if omitted. | All site attributes are available here except: name, class. -.. _default-camera: - .. _default-camera-fovy: .. _default-camera-resolution: @@ -6715,11 +6933,24 @@ if omitted. .. _default-camera-user: +.. _default-camera-focal: + +.. _default-camera-focalpixel: + +.. _default-camera-principal: + +.. _default-camera-principalpixel: + +.. _default-camera-sensorsize: + +.. _default-camera: + + :el-prefix:`default/` |-| **camera** (?) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | This element sets the attributes of the dummy :ref:`camera ` element of the defaults class. -| All camera attributes are available here except: name, class. +| All camera attributes are available here except: name, class, mode, target. .. _default-light: @@ -7115,6 +7346,44 @@ tendon, slidersite, cranksite. All :ref:`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** (*) diff --git a/doc/XMLschema.rst b/doc/XMLschema.rst index 6cc3590a..0458347c 100644 --- a/doc/XMLschema.rst +++ b/doc/XMLschema.rst @@ -222,9 +222,9 @@ | | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | | | | | :ref:`wind` | :ref:`magnetic` | :ref:`density` | :ref:`viscosity` | | | | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | -| | | | :ref:`o_margin` | :ref:`o_solref` | :ref:`o_solimp` | :ref:`integrator` | | +| | | | :ref:`o_margin` | :ref:`o_solref` | :ref:`o_solimp` | :ref:`o_friction` | | | | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | -| | | | :ref:`collision` | :ref:`cone` | :ref:`jacobian` | :ref:`solver` | | +| | | | :ref:`integrator` | :ref:`cone` | :ref:`jacobian` | :ref:`solver` | | | | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | | | | | :ref:`iterations` | :ref:`ls_iterations` | :ref:`noslip_iterations` | :ref:`mpr_iterations` | | | | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | @@ -260,20 +260,6 @@ | | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |_| body |br| |_| |L| | | .. table:: | -| :ref:`plugin | \* | :class: mjcf-attributes | -| ` | | | -| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | -| | | | :ref:`plugin` | :ref:`instance` | | | | -| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | -+------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| |_2| plugin |br| |_2| |L| | | .. table:: | -| :ref:`config | \* | :class: mjcf-attributes | -| ` | | | -| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | -| | | | :ref:`key` | :ref:`value` | | | | -| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | -+------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| |_| body |br| |_| |L| | | .. table:: | | :ref:`inertial | ? | :class: mjcf-attributes | | ` | | | | | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | @@ -368,7 +354,9 @@ | | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | | | | | :ref:`xyaxes` | :ref:`zaxis` | :ref:`euler` | :ref:`mode` | | | | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | -| | | | :ref:`target` | :ref:`user` | | | | +| | | | :ref:`target` | :ref:`focal` | :ref:`focalpixel` | :ref:`principal` | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +| | | | :ref:`principalpixel` | :ref:`sensorsize` | :ref:`user` | | | | | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |_| body |br| |_| |L| | | .. table:: | @@ -385,6 +373,20 @@ | | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |_| body |br| |_| |L| | | .. table:: | +| :ref:`plugin | \* | :class: mjcf-attributes | +| ` | | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +| | | | :ref:`plugin` | :ref:`instance` | | | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | ++------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| |_2| plugin |br| |_2| |L| | | .. table:: | +| :ref:`config | \* | :class: mjcf-attributes | +| ` | | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +| | | | :ref:`key` | :ref:`value` | | | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | ++------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| |_| body |br| |_| |L| | | .. table:: | | :ref:`composite | \* | :class: mjcf-attributes | | ` | | | | | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | @@ -398,20 +400,6 @@ | | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |_2| composite |br| |_2| |L| | | .. table:: | -| :ref:`plugin | \* | :class: mjcf-attributes | -| ` | | | -| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | -| | | | :ref:`plugin` | :ref:`instance` | | | | -| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | -+------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| |_3| plugin |br| |_3| |L| | | .. table:: | -| :ref:`config | \* | :class: mjcf-attributes | -| ` | | | -| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | -| | | | :ref:`key` | :ref:`value` | | | | -| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | -+------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| |_2| composite |br| |_2| |L| | | .. table:: | | :ref:`joint | \* | :class: mjcf-attributes | | ` | | | | | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | @@ -479,6 +467,118 @@ | | | | :ref:`coord` | | | | | | | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| |_2| composite |br| |_2| |L| | | .. table:: | +| :ref:`plugin | \* | :class: mjcf-attributes | +| ` | | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +| | | | :ref:`plugin` | :ref:`instance` | | | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | ++------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| |_3| plugin |br| |_3| |L| | | .. table:: | +| :ref:`config | \* | :class: mjcf-attributes | +| ` | | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +| | | | :ref:`key` | :ref:`value` | | | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | ++------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| |_| body |br| |_| |L| | | .. table:: | +| :ref:`flexcomp | \* | :class: mjcf-attributes | +| ` | | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +| | | | :ref:`name` | :ref:`class` | :ref:`type` | :ref:`dim` | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +| | | | :ref:`flatskin` | :ref:`count` | :ref:`spacing` | :ref:`radius` | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +| | | | :ref:`rigid` | :ref:`mass` | :ref:`inertiabox` | :ref:`scale` | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +| | | | :ref:`file` | :ref:`point` | :ref:`element` | :ref:`texcoord` | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +| | | | :ref:`material` | :ref:`rgba` | :ref:`selfcollide` | :ref:`flatskin` | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +| | | | :ref:`pos` | :ref:`quat` | :ref:`axisangle` | :ref:`xyaxes` | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +| | | | :ref:`zaxis` | :ref:`euler` | | | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | ++------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| |_2| flexcomp |br| |_2| |L| | | .. table:: | +| :ref:`edge | ? | :class: mjcf-attributes | +| ` | | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +| | | | :ref:`equality` | :ref:`solref` | :ref:`solimp` | :ref:`stiffness` | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +| | | | :ref:`damping` | | | | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | ++------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| |_2| flexcomp |br| |_2| |L| | | .. table:: | +| :ref:`contact | ? | :class: mjcf-attributes | +| ` | | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +| | | | :ref:`contype` | :ref:`conaffinity` | :ref:`condim` | :ref:`priority` | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +| | | | :ref:`friction` | :ref:`solmix` | :ref:`solref` | :ref:`solimp` | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +| | | | :ref:`margin` | :ref:`gap` | | | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | ++------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| |_2| flexcomp |br| |_2| |L| | | .. table:: | +| :ref:`pin | \* | :class: mjcf-attributes | +| ` | | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +| | | | :ref:`id` | :ref:`range` | :ref:`grid` | :ref:`gridrange` | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | ++------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| mujoco |br| |L| | | *no attributes* | +| :ref:`deformable` | | | ++------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| |_| deformable |br| |_| |L| | | .. table:: | +| :ref:`flex | \* | :class: mjcf-attributes | +| ` | | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +| | | | :ref:`name` | :ref:`group` | :ref:`dim` | :ref:`radius` | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +| | | | :ref:`material` | :ref:`rgba` | :ref:`flatskin` | :ref:`selfcollide` | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +| | | | :ref:`body` | :ref:`vertex` | :ref:`element` | :ref:`texcoord` | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | ++------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| |_2| flex |br| |_2| |L| | | .. table:: | +| :ref:`contact | ? | :class: mjcf-attributes | +| ` | | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +| | | | :ref:`contype` | :ref:`conaffinity` | :ref:`condim` | :ref:`priority` | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +| | | | :ref:`friction` | :ref:`solmix` | :ref:`solref` | :ref:`solimp` | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +| | | | :ref:`margin` | :ref:`gap` | | | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | ++------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| |_2| flex |br| |_2| |L| | | .. table:: | +| :ref:`edge | ? | :class: mjcf-attributes | +| ` | | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +| | | | :ref:`stiffness` | :ref:`damping` | | | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | ++------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| |_| deformable |br| |_| |L| | | .. table:: | +| :ref:`skin | \* | :class: mjcf-attributes | +| ` | | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +| | | | :ref:`name` | :ref:`file` | :ref:`material` | :ref:`rgba` | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +| | | | :ref:`inflate` | :ref:`vertex` | :ref:`texcoord` | :ref:`face` | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +| | | | :ref:`group` | | | | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | ++------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| |_2| skin |br| |_2| |L| | | .. table:: | +| :ref:`bone | \* | :class: mjcf-attributes | +| ` | | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +| | | | :ref:`body` | :ref:`bindpos` | :ref:`bindquat` | :ref:`vertid` | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +| | | | :ref:`vertweight` | | | | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | ++------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | mujoco |br| |L| | | *no attributes* | | :ref:`contact` | | | +------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -541,6 +641,15 @@ | | | | :ref:`polycoef` | :ref:`active` | :ref:`solref` | :ref:`solimp` | | | | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| |_| equality |br| |_| |L| | | .. table:: | +| :ref:`flex | \* | :class: mjcf-attributes | +| ` | | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +| | | | :ref:`name` | :ref:`class` | :ref:`flex` | :ref:`active` | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +| | | | :ref:`solref` | :ref:`solimp` | | | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | ++------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | mujoco |br| |L| | | *no attributes* | | :ref:`tendon` | | | +------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -1230,11 +1339,13 @@ | :ref:`camera | ? | :class: mjcf-attributes | | ` | | | | | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | -| | | | :ref:`fovy` | :ref:`ipd` | :ref:`pos` | :ref:`quat` | | +| | | | :ref:`fovy` | :ref:`ipd` | :ref:`resolution` | :ref:`pos` | | | | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | -| | | | :ref:`resolution` | :ref:`axisangle` | :ref:`xyaxes` | :ref:`zaxis` | | +| | | | :ref:`quat` | :ref:`axisangle` | :ref:`xyaxes` | :ref:`zaxis` | | | | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | -| | | | :ref:`euler` | :ref:`mode` | :ref:`user` | | | +| | | | :ref:`euler` | :ref:`mode` | :ref:`focal` | :ref:`focalpixel` | | +| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +| | | | :ref:`principal` | :ref:`principalpixel` | :ref:`sensorsize` | :ref:`user` | | | | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ | +------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |_| default |br| |_| |L| | | .. table:: | diff --git a/doc/changelog.rst b/doc/changelog.rst index 77c6fae3..1c5cd20f 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -29,7 +29,27 @@ New features gradient at query points. See the :ref:`documentation` for more details. 3. Added :ref:`mjThreadPool` and :ref:`mjTask` which allow for multi-threaded operations within the MuJoCo engine - pipeline. + pipeline. If engine-internal threading is enabled, the following operations will be multi-threaded: + + - Island constraint resolution, if island discovery is :ref:`enabled` and the + :ref:`CG solver` is selected. The + `22 humanoids `__ model shows a 3x + speedup compared to the single threaded simulation. + - Inertia-related computations and collision detection will happen in parallel. + + Engine-internal threading is a work in progress and currently only available in first-party code via the + :ref:`testspeed` utility, exposed with the ``npoolthread`` flag. + +.. youtube:: ra2bTiZHGlw + :align: right + :width: 240px + +4. Added capability to initialize :ref:`composite` particles with arbitrary positions. + +5. Added `shell `__ passive force plugin: + + - Collisions use spheres located at mesh vertices. + - Stretching as tendon constraints and bending using a constant precomputed Hessian (cotangent operator). General ^^^^^^^ @@ -37,21 +57,21 @@ General .. admonition:: Breaking API changes :class: attention - 4. Removed the macros ``mjMARKSTACK`` and ``mjFREESTACK``. + 6. Removed the macros ``mjMARKSTACK`` and ``mjFREESTACK``. **Migration:** These macros have been replaced by new functions :ref:`mj_markStack` and :ref:`mj_freeStack`. These functions manage the :ref:`mjData stack` in a fully encapsulated way (i.e., without introducing a local variable at the call site). - 5. Changed the function :ref:`mj_stackAlloc` to allocate an arbitrary number of bytes, rather than in multiples of - ``sizeof(mjtNum)``, and added an additional argument for specifying the alignment of the returned pointer. + 7. Renamed ``mj_stackAlloc`` to :ref:`mj_stackAllocNum`. The new function :ref:`mj_stackAllocByte` allocates an + arbitrary number of bytes and has an additional argument for specifying the alignment of the returned pointer. - **Migration:** The functionality for allocating ``mjtNum`` arrays is available via :ref:`mj_stackAllocNum`. + **Migration:** The functionality for allocating ``mjtNum`` arrays is now available via :ref:`mj_stackAllocNum`. - 6. Renamed the ``nstack`` field in :ref:`mjModel` and :ref:`mjData` to ``narena``. Changed ``narena``, ``pstack``, + 8. Renamed the ``nstack`` field in :ref:`mjModel` and :ref:`mjData` to ``narena``. Changed ``narena``, ``pstack``, and ``maxuse_stack`` to count number of bytes rather than number of :ref:`mjtNum` |-| s. - 7. Changed :ref:`mjData.solver`, the array used to collect solver diagnostic information. + 9. Changed :ref:`mjData.solver`, the array used to collect solver diagnostic information. This array of :ref:`mjSolverStat` structs is now of length ``mjNISLAND * mjNSOLVER``, interpreted as as a matrix. Each row of length ``mjNSOLVER`` contains separate solver statistics for each constraint island. If the solver does not use islands, only row 0 is filled. @@ -62,37 +82,101 @@ General - Renamed ``mjData.solver_iter`` to ``solver_niter``. Both this member and ``mjData.solver_nnz`` are now integer vectors of length ``mjNISLAND``. -8. Added a new :ref:`dyntype`, ``filterexact``, which updates first-order filter states with - the exact formula rather than with Euler integration. -9. Added an actuator attribute, :ref:`actearly`, which uses semi-implicit integration for - actuator forces: using the next step's actuator state to compute the current actuator forces at the current timestep. -10. Renamed ``actuatorforcerange`` and ``actuatorforcelimited``, introduced in the previous version to + 10. Removed ``mjOption.collision`` and the associated ``option/collision`` attribute. + + **Migration:** + + - For models which have ``