diff --git a/CMakeLists.txt b/CMakeLists.txt index b98d90b0..f7473cf3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,7 @@ set(MSVC_INCREMENTAL_DEFAULT ON) project( mujoco - VERSION 2.2.2 + VERSION 2.3.0 DESCRIPTION "MuJoCo Physics Simulator" HOMEPAGE_URL "https://mujoco.org" ) diff --git a/dist/mujoco.rc b/dist/mujoco.rc index 67ef8929..ef0c90c7 100644 --- a/dist/mujoco.rc +++ b/dist/mujoco.rc @@ -1,6 +1,6 @@ 1 VERSIONINFO -FILEVERSION 2,2,2,0 -PRODUCTVERSION 2,2,2,0 +FILEVERSION 2,3,0,0 +PRODUCTVERSION 2,3,0,0 FILEOS 0x4 FILETYPE 0x1 { @@ -9,9 +9,9 @@ FILETYPE 0x1 BLOCK "040904b0" { VALUE "ProductName", "MuJoCo" - VALUE "ProductVersion", "2.2.2" + VALUE "ProductVersion", "2.3.0" VALUE "FileDescription", "MuJoCo" - VALUE "FileVersion", "2.2.2" + VALUE "FileVersion", "2.3.0" VALUE "InternalName", "mujoco.dll" VALUE "OriginalFilename", "mujoco.dll" VALUE "CompanyName", "DeepMind" diff --git a/dist/simulate.rc b/dist/simulate.rc index d3744217..07ac04f3 100644 --- a/dist/simulate.rc +++ b/dist/simulate.rc @@ -1,8 +1,8 @@ MUJOCO ICON "mujoco.ico" 1 VERSIONINFO -FILEVERSION 2,2,2,0 -PRODUCTVERSION 2,2,2,0 +FILEVERSION 2,3,0,0 +PRODUCTVERSION 2,3,0,0 FILEOS 0x4 FILETYPE 0x1 { @@ -11,9 +11,9 @@ FILETYPE 0x1 BLOCK "040904b0" { VALUE "ProductName", "MuJoCo" - VALUE "ProductVersion", "2.2.2" + VALUE "ProductVersion", "2.3.0" VALUE "FileDescription", "MuJoCo" - VALUE "FileVersion", "2.2.2" + VALUE "FileVersion", "2.3.0" VALUE "InternalName", "simulate.exe" VALUE "OriginalFilename", "simulate.exe" VALUE "CompanyName", "DeepMind" diff --git a/doc/changelog.rst b/doc/changelog.rst index 2323f8ba..2ed56fc0 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -3,82 +3,81 @@ Changelog ========= -Upcoming version (not yet released) ------------------------------------ +Version 2.3.0 (October 18, 2022) +-------------------------------- General ^^^^^^^ -- The ``contact`` array and arrays prefixed with ``efc_`` in ``mjData`` were moved out of the ``buffer`` into a new - ``arena`` memory space. These arrays are no longer allocated with fixed sizes when ``mjData`` is created. - Instead, the exact memory requirement is determined during each call to :ref:`mj_forward` (specifically, - in :ref:`mj_collision` and :ref:`mj_makeConstraint`) and the arrays are allocated from the ``arena`` space. The - ``stack`` now also shares its available memory with ``arena``. This change reduces the memory footprint of ``mjData`` - in models that do not use the PGS solver, and will allow for significant memory reductions in the future. - See the :ref:`Memory allocation ` section for details. +1. The ``contact`` array and arrays prefixed with ``efc_`` in ``mjData`` were moved out of the ``buffer`` into a new + ``arena`` memory space. These arrays are no longer allocated with fixed sizes when ``mjData`` is created. + Instead, the exact memory requirement is determined during each call to :ref:`mj_forward` (specifically, + in :ref:`mj_collision` and :ref:`mj_makeConstraint`) and the arrays are allocated from the ``arena`` space. The + ``stack`` now also shares its available memory with ``arena``. This change reduces the memory footprint of ``mjData`` + in models that do not use the PGS solver, and will allow for significant memory reductions in the future. + See the :ref:`Memory allocation ` section for details. - .. youtube:: RHnXD6uO3Mg - :align: right - :height: 150px + .. youtube:: RHnXD6uO3Mg + :align: right + :height: 150px -- Added colab notebook tutorial showing how to balance the humanoid on one leg with a Linear Quadratic Regulator. The - notebook uses MuJoCo's native Python bindings, and includes a draft ``Renderer`` class, for easy rendering in Python. - |br| Try it yourself: |LQRopenincolab| +#. Added colab notebook tutorial showing how to balance the humanoid on one leg with a Linear Quadratic Regulator. The + notebook uses MuJoCo's native Python bindings, and includes a draft ``Renderer`` class, for easy rendering in Python. + |br| Try it yourself: |LQRopenincolab| .. |LQRopenincolab| image:: https://colab.research.google.com/assets/colab-badge.svg - :target: https://colab.research.google.com/github/deepmind/mujoco/blob/main/python/LQR.ipynb + :target: https://colab.research.google.com/github/deepmind/mujoco/blob/main/python/LQR.ipynb -- Updates to humanoid model: +#. Updates to humanoid model: + - Added two keyframes (stand-on-one-leg and squat). + - Increased maximum hip flexion angle. + - Added hamstring tendons which couple the hip and knee at high hip flexion angles. + - General cosmetic improvements, including improved use of defaults and better naming scheme. - * Added two keyframes (stand-on-one-leg and squat). - * Increased maximum hip flexion angle. - * Added hamstring tendons which couple the hip and knee at high hip flexion angles. - * General cosmetic improvements, including improved use of defaults and better naming scheme. - -- Added :ref:`mju_boxQP` and allocation function :ref:`mju_boxQPmalloc` for solving the box-constrained - Quadratic Program: +#. Added :ref:`mju_boxQP` and allocation function :ref:`mju_boxQPmalloc` for solving the box-constrained + Quadratic Program: .. math:: x^* = \text{argmin} \; \tfrac{1}{2} x^T H x + x^T g \quad \text{s.t.} \quad l \le x \le u - The algorithm, introduced in `Tassa et al. 2014 `_, - converges after 2-5 Cholesky factorisations, independent of problem size. + The algorithm, introduced in `Tassa et al. 2014 `_, + converges after 2-5 Cholesky factorisations, independent of problem size. -- Added :ref:`mju_mulVecMatVec` to multiply a square matrix :math:`M` with vectors :math:`x` and :math:`y` on both - sides. The function returns :math:`x^TMy`. +#. Added :ref:`mju_mulVecMatVec` to multiply a square matrix :math:`M` with vectors :math:`x` and :math:`y` on both + sides. The function returns :math:`x^TMy`. -- Added new plugin API. Plugins allow developers to extend MuJoCo's capability without modifying core engine code. - The plugin mechanism is intended to replace the existing callbacks, though these will remain for the time being as an - option for simple use cases and backward compatibility. The new mechanism manages stateful plugins and supports - multiple plugins from different sources, allowing MuJoCo extensions to be introduced in a modular fashion, rather than - as global overrides. Note the new mechanism is currently undocumented except in code, as we test it internally. - If you are interested in using the plugin mechanism, please get in touch first. +#. Added new plugin API. Plugins allow developers to extend MuJoCo's capability without modifying core engine code. + The plugin mechanism is intended to replace the existing callbacks, though these will remain for the time being as an + option for simple use cases and backward compatibility. The new mechanism manages stateful plugins and supports + multiple plugins from different sources, allowing MuJoCo extensions to be introduced in a modular fashion, rather + than as global overrides. Note the new mechanism is currently undocumented except in code, as we test it internally. + If you are interested in using the plugin mechanism, please get in touch first. -- Added :at:`assetdir` compiler option, which sets the values of both :at:`meshdir` and :at:`texturedir`. Values in - the latter attributes take precedence over :at:`assetdir`. +#. Added :at:`assetdir` compiler option, which sets the values of both :at:`meshdir` and :at:`texturedir`. Values in + the latter attributes take precedence over :at:`assetdir`. -- Added :at:`realtime` option to :ref:`visual` for starting a simulation at a slower speed. +#. Added :at:`realtime` option to :ref:`visual` for starting a simulation at a slower speed. -- Added new :at:`cable` composite type: +#. Added new :at:`cable` composite type: - * Cable elements are connected with ball joints. - * The `initial` parameter specifies the joint at the starting boundary: :at:`free`, :at:`ball`, or :at:`none`. - * The boundary bodies are exposed with the names :at:`B_left` and :at:`B_right`. - * The vertex initial positions can be specified directly in the XML with the parameter :at:`vertex`. - * The orientation of the body frame **is** the orientation of the material frame of the curve. + - Cable elements are connected with ball joints. + - The `initial` parameter specifies the joint at the starting boundary: :at:`free`, :at:`ball`, or :at:`none`. + - The boundary bodies are exposed with the names :at:`B_left` and :at:`B_right`. + - The vertex initial positions can be specified directly in the XML with the parameter :at:`vertex`. + - The orientation of the body frame **is** the orientation of the material frame of the curve. -- Added new :at:`cable` passive force plugin: +#. Added new :at:`cable` passive force plugin: - * Twist and bending stiffness can be set separately with the parameters :at:`twist` and :at:`bend`. - * The stress-free configuration can be set to be the initial one or flat with the flag :at:`flat`. - * New `cable.xml `_ example - showing the formation of plectoneme. - * New `coil.xml `_ example - showing a curved equilibrium configuration. - * New `belt.xml `_ example - showing interaction between twist and anisotropy. - * Added test using cantilever exact solution. + - Twist and bending stiffness can be set separately with the parameters :at:`twist` and :at:`bend`. + - The stress-free configuration can be set to be the initial one or flat with the flag :at:`flat`. + - New `cable.xml `_ example showing the + formation of plectoneme. + - New `coil.xml `_ example showing a curved + equilibrium configuration. + - New `belt.xml `_ example showing interaction + between twist and anisotropy. + - Added test using cantilever exact solution. .. youtube:: 25kQP671fJE :align: right @@ -94,16 +93,16 @@ General Python bindings ^^^^^^^^^^^^^^^ +11. Added ``id`` and ``name`` properties to + `named accessor `_ objects. + These provide more Pythonic API access to ``mj_name2id`` and ``mj_id2name`` respectively. -- Added ``id`` and ``name`` properties to - `named accessor `_ objects. These provide more - Pythonic API access to ``mj_name2id`` and ``mj_id2name`` respectively. +#. The length of ``MjData.contact`` is now ``ncon`` rather than ``nconmax``, allowing it to be straightforwardly used as + an iterator without needing to check ``ncon``. -- The length of ``MjData.contact`` is now ``ncon`` rather than ``nconmax``, allowing it to be straightforwardly used as - an iterator without needing to check ``ncon``. +#. Fix a memory leak when a Python callable is installed as callback + (`#527 `_). -- Fix a memory leak when a Python callable is installed as callback - (`#527 `_). Version 2.2.2 (September 7, 2022) --------------------------------- diff --git a/doc/unity.rst b/doc/unity.rst index 02873341..59e8827c 100644 --- a/doc/unity.rst +++ b/doc/unity.rst @@ -30,14 +30,14 @@ _____ The MuJoCo app needs to be run at least once before the native library can be used, in order to register the library as a trusted binary. Then, copy the dynamic library file from -``/Applications/MuJoCo.app/Contents/Frameworks/mujoco.framework/Versions/Current/libmujoco.2.2.2.dylib`` (it can be +``/Applications/MuJoCo.app/Contents/Frameworks/mujoco.framework/Versions/Current/libmujoco.2.3.0.dylib`` (it can be found by browsing the contents of ``MuJoCo.app``) and rename it as ``mujoco.dylib``. Linux _____ Expand the ``tar.gz`` archive to ``~/.mujoco``. Then copy the dynamic library from -``~/.mujoco/mujoco-2.2.2/lib/libmujoco.so.2.2.2`` and rename it as ``libmujoco.so``. +``~/.mujoco/mujoco-2.3.0/lib/libmujoco.so.2.3.0`` and rename it as ``libmujoco.so``. Windows _______ diff --git a/include/mujoco/mujoco.h b/include/mujoco/mujoco.h index fc04d8eb..6b97bd38 100644 --- a/include/mujoco/mujoco.h +++ b/include/mujoco/mujoco.h @@ -24,7 +24,7 @@ extern "C" { #endif // header version; should match the library version as returned by mj_version() -#define mjVERSION_HEADER 222 +#define mjVERSION_HEADER 230 // needed to define size_t, fabs and log10 #include diff --git a/python/mujoco/CMakeLists.txt b/python/mujoco/CMakeLists.txt index 9587b31a..c955b787 100644 --- a/python/mujoco/CMakeLists.txt +++ b/python/mujoco/CMakeLists.txt @@ -75,13 +75,13 @@ if(NOT TARGET mujoco) find_path(MUJOCO_FRAMEWORK mujoco.Framework HINTS ${MUJOCO_FRAMEWORK_DIR}) if(MUJOCO_FRAMEWORK) message("MuJoCo framework is at ${MUJOCO_FRAMEWORK}/mujoco.framework") - set(MUJOCO_LIBRARY ${MUJOCO_FRAMEWORK}/mujoco.framework/Versions/A/libmujoco.2.2.2.dylib) + set(MUJOCO_LIBRARY ${MUJOCO_FRAMEWORK}/mujoco.framework/Versions/A/libmujoco.2.3.0.dylib) target_compile_options(mujoco INTERFACE -F${MUJOCO_FRAMEWORK}) endif() endif() if(NOT MUJOCO_FRAMEWORK) - find_library(MUJOCO_LIBRARY mujoco mujoco.2.2.2 HINTS ${MUJOCO_LIBRARY_DIR} REQUIRED) + find_library(MUJOCO_LIBRARY mujoco mujoco.2.3.0 HINTS ${MUJOCO_LIBRARY_DIR} REQUIRED) find_path(MUJOCO_INCLUDE mujoco/mujoco.h HINTS ${MUJOCO_INCLUDE_DIR} REQUIRED) message("MuJoCo is at ${MUJOCO_LIBRARY}") message("MuJoCo headers are at ${MUJOCO_INCLUDE}") diff --git a/python/setup.py b/python/setup.py index febabe1a..15337216 100644 --- a/python/setup.py +++ b/python/setup.py @@ -30,7 +30,7 @@ from setuptools import find_packages from setuptools import setup from setuptools.command import build_ext -__version__ = '2.2.2' +__version__ = '2.3.0' MUJOCO_CMAKE = 'MUJOCO_CMAKE' MUJOCO_CMAKE_ARGS = 'MUJOCO_CMAKE_ARGS' diff --git a/sample/CMakeLists.txt b/sample/CMakeLists.txt index 58974b0c..fcad6762 100644 --- a/sample/CMakeLists.txt +++ b/sample/CMakeLists.txt @@ -24,7 +24,7 @@ set(MSVC_INCREMENTAL_DEFAULT ON) project( mujoco_samples - VERSION 2.2.2 + VERSION 2.3.0 DESCRIPTION "MuJoCo samples binaries" HOMEPAGE_URL "https://mujoco.org" ) diff --git a/simulate/CMakeLists.txt b/simulate/CMakeLists.txt index ae02fdc8..e80e1bc7 100644 --- a/simulate/CMakeLists.txt +++ b/simulate/CMakeLists.txt @@ -29,7 +29,7 @@ set(MUJOCO_DEP_VERSION_lodepng project( mujoco_simulate - VERSION 2.2.2 + VERSION 2.3.0 DESCRIPTION "MuJoCo simulate binaries" HOMEPAGE_URL "https://mujoco.org" ) diff --git a/src/engine/engine_support.c b/src/engine/engine_support.c index 9cf0ebf9..ca52736e 100644 --- a/src/engine/engine_support.c +++ b/src/engine/engine_support.c @@ -35,8 +35,8 @@ #endif #endif -#define mjVERSION 222 -#define mjVERSIONSTRING "2.2.2" +#define mjVERSION 230 +#define mjVERSIONSTRING "2.3.0" // names of disable flags const char* mjDISABLESTRING[mjNDISABLE] = { diff --git a/test/engine/engine_support_test.cc b/test/engine/engine_support_test.cc index 8bb9948c..89bda174 100644 --- a/test/engine/engine_support_test.cc +++ b/test/engine/engine_support_test.cc @@ -155,7 +155,7 @@ TEST_F(JacobianTest, SubtreeJacNoInternalAcc) { using VersionTest = MujocoTest; -const char *const kExpectedVersionString = "2.2.2"; +const char *const kExpectedVersionString = "2.3.0"; TEST_F(VersionTest, MjVersion) { EXPECT_EQ(mj_version(), mjVERSION_HEADER); diff --git a/unity/Editor/Bindings/MujocoBinaryRetriever.cs b/unity/Editor/Bindings/MujocoBinaryRetriever.cs index 67477c54..9e6a4dc6 100644 --- a/unity/Editor/Bindings/MujocoBinaryRetriever.cs +++ b/unity/Editor/Bindings/MujocoBinaryRetriever.cs @@ -37,7 +37,7 @@ public class MujocoBinaryRetriever { if (AssetDatabase.LoadMainAssetAtPath(mujocoPath + "/mujoco.dylib") == null) { File.Copy( "/Applications/MuJoCo.app/Contents/Frameworks" + - "/mujoco.framework/Versions/Current/libmujoco.2.2.2.dylib", + "/mujoco.framework/Versions/Current/libmujoco.2.3.0.dylib", mujocoPath + "/mujoco.dylib"); AssetDatabase.Refresh(); } @@ -45,7 +45,7 @@ public class MujocoBinaryRetriever { if (AssetDatabase.LoadMainAssetAtPath(mujocoPath + "/libmujoco.so") == null) { File.Copy( Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + - "/.mujoco/mujoco-2.2.2/lib/libmujoco.so.2.2.2", + "/.mujoco/mujoco-2.3.0/lib/libmujoco.so.2.3.0", mujocoPath + "/libmujoco.so"); AssetDatabase.Refresh(); } diff --git a/unity/Runtime/Bindings/MujocoBindings.cs b/unity/Runtime/Bindings/MujocoBindings.cs index af7f877e..5d722224 100644 --- a/unity/Runtime/Bindings/MujocoBindings.cs +++ b/unity/Runtime/Bindings/MujocoBindings.cs @@ -100,7 +100,7 @@ public const int mjMAXLINEPNT = 1000; public const int mjMAXPLANEGRID = 200; public const bool THIRD_PARTY_MUJOCO_MJXMACRO_H_ = true; public const bool THIRD_PARTY_MUJOCO_MUJOCO_H_ = true; -public const int mjVERSION_HEADER = 222; +public const int mjVERSION_HEADER = 230; // ------------------------------------Enums------------------------------------ diff --git a/unity/package.json b/unity/package.json index 3e35073b..d51549c3 100644 --- a/unity/package.json +++ b/unity/package.json @@ -1,7 +1,7 @@ { "name": "org.mujoco", "displayName": "MuJoCo", - "version": "2.2.2", + "version": "2.3.0", "description": "MuJoCo importer and runtime plug-in", "dependencies": {}, "author": {