Skip to content

Commit

Permalink
Bump MuJoCo version to 2.3.2.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 507720557
Change-Id: I7a5b577094ac1a7f468a84c484f62f61dc6b409f
  • Loading branch information
quagla authored and copybara-github committed Feb 7, 2023
1 parent 36836d8 commit dd632b7
Show file tree
Hide file tree
Showing 21 changed files with 66 additions and 81 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ set(MSVC_INCREMENTAL_DEFAULT ON)

project(
mujoco
VERSION 2.3.1
VERSION 2.3.2
DESCRIPTION "MuJoCo Physics Simulator"
HOMEPAGE_URL "https://mujoco.org"
)
Expand Down
3 changes: 3 additions & 0 deletions cmake/CheckAvxSupport.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ function(get_avx_compile_options OUTPUT_VAR)

if(MSVC)
set(CMAKE_REQUIRED_FLAGS "/arch:AVX")
elseif(WIN32)
# Abseil LTS 20230125.0 assumes that AVX implies PCLMUL on Windows.
set(CMAKE_REQUIRED_FLAGS "-mavx" "-mpclmul")
else()
set(CMAKE_REQUIRED_FLAGS "-mavx")
endif()
Expand Down
8 changes: 4 additions & 4 deletions cmake/MujocoDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ set(MUJOCO_DEP_VERSION_lodepng
CACHE STRING "Version of `lodepng` to be fetched."
)
set(MUJOCO_DEP_VERSION_tinyxml2
1dee28e51f9175a31955b9791c74c430fe13dc82 # 9.0.0
9a89766acc42ddfa9e7133c7d81a5bda108a0ade
CACHE STRING "Version of `tinyxml2` to be fetched."
)
set(MUJOCO_DEP_VERSION_tinyobjloader
Expand All @@ -39,17 +39,17 @@ set(MUJOCO_DEP_VERSION_qhull
CACHE STRING "Version of `qhull` to be fetched."
)
set(MUJOCO_DEP_VERSION_Eigen3
3bb6a48d8c171cf20b5f8e48bfb4e424fbd4f79e
3460f3558e7b469efb8a225894e21929c8c77629
CACHE STRING "Version of `Eigen3` to be fetched."
)

set(MUJOCO_DEP_VERSION_abseil
8c0b94e793a66495e0b1f34a5eb26bd7dc672db0 # LTS 20220623.1
78be63686ba732b25052be15f8d6dee891c05749 # LTS 20230125.0
CACHE STRING "Version of `abseil` to be fetched."
)

set(MUJOCO_DEP_VERSION_gtest
58d77fa8070e8cec2dc1ed015d66b454c8d78850 # release-1.12.1
b796f7d44681514f58a683a3a71ff17c94edb0c1 # release-1.13.0
CACHE STRING "Version of `gtest` to be fetched."
)

Expand Down
6 changes: 0 additions & 6 deletions cmake/MujocoOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,6 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang
-Wno-stringop-overflow
-Wno-stringop-truncation
)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "15.0.0")
# Needed for https://github.com/abseil/abseil-cpp/issues/1201, until a new
# version of abseil is released with the fix.
set(EXTRA_COMPILE_OPTIONS "${EXTRA_COMPILE_OPTIONS}"
-Wno-deprecated-builtins
)
endif()
endif()

Expand Down
8 changes: 4 additions & 4 deletions dist/mujoco.rc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
1 VERSIONINFO
FILEVERSION 2,3,1,0
PRODUCTVERSION 2,3,1,0
FILEVERSION 2,3,2,0
PRODUCTVERSION 2,3,2,0
FILEOS 0x4
FILETYPE 0x1
{
Expand All @@ -9,9 +9,9 @@ FILETYPE 0x1
BLOCK "040904b0"
{
VALUE "ProductName", "MuJoCo"
VALUE "ProductVersion", "2.3.1"
VALUE "ProductVersion", "2.3.2"
VALUE "FileDescription", "MuJoCo"
VALUE "FileVersion", "2.3.1"
VALUE "FileVersion", "2.3.2"
VALUE "InternalName", "mujoco.dll"
VALUE "OriginalFilename", "mujoco.dll"
VALUE "CompanyName", "DeepMind"
Expand Down
8 changes: 4 additions & 4 deletions dist/simulate.rc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
MUJOCO ICON "mujoco.ico"

1 VERSIONINFO
FILEVERSION 2,3,1,0
PRODUCTVERSION 2,3,1,0
FILEVERSION 2,3,2,0
PRODUCTVERSION 2,3,2,0
FILEOS 0x4
FILETYPE 0x1
{
Expand All @@ -11,9 +11,9 @@ FILETYPE 0x1
BLOCK "040904b0"
{
VALUE "ProductName", "MuJoCo"
VALUE "ProductVersion", "2.3.1"
VALUE "ProductVersion", "2.3.2"
VALUE "FileDescription", "MuJoCo"
VALUE "FileVersion", "2.3.1"
VALUE "FileVersion", "2.3.2"
VALUE "InternalName", "simulate.exe"
VALUE "OriginalFilename", "simulate.exe"
VALUE "CompanyName", "DeepMind"
Expand Down
54 changes: 27 additions & 27 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,55 +2,55 @@
Changelog
=========

Upcoming version (not yet released)
Version 2.3.2 (February 7, 2023)
-----------------------------------

General
^^^^^^^

- A more performant mju_transposeSparse has been implemented that doesn't require dense memory allocation.
For a constraint Jacobian matrix from the
`humanoid100.xml <https://github.com/deepmind/mujoco/blob/main/model/humanoid100/humanoid100.xml>`_ model,
this function is 35% faster.
- The function :ref:`mj_name2id` is now implemented using a hash function instead of a linear search for better
performance.
- Geom names are now parsed from URDF. Any duplicate names are ignored.
- ``mj_printData`` output now contains contacting geom names.
1. A more performant mju_transposeSparse has been implemented that doesn't require dense memory allocation.
For a constraint Jacobian matrix from the
`humanoid100.xml <https://github.com/deepmind/mujoco/blob/main/model/humanoid100/humanoid100.xml>`_ model,
this function is 35% faster.
#. The function :ref:`mj_name2id` is now implemented using a hash function instead of a linear search for better
performance.
#. Geom names are now parsed from URDF. Any duplicate names are ignored.
``mj_printData`` output now contains contacting geom names.

Bug fixes
^^^^^^^^^

- Fixed a bug that for :at:`shellinertia` equal to ``true`` caused the mesh orientation to be overwritten by the
principal components of the shell inertia, while the vertex coordinates are rotated using the volumetric inertia.
Now the volumetric inertia orientation is used also in the shell case.
- Fixed misalignment bug in mesh-to-primitive fitting when using the bounding box fitting option :at:`fitaabb`.
4. Fixed a bug that for :at:`shellinertia` equal to ``true`` caused the mesh orientation to be overwritten by the
principal components of the shell inertia, while the vertex coordinates are rotated using the volumetric inertia.
Now the volumetric inertia orientation is used also in the shell case.
#. Fixed misalignment bug in mesh-to-primitive fitting when using the bounding box fitting option :at:`fitaabb`.

.. image:: images/changelog/meshfit.png
:align: right
:width: 300px

- The ``launch_repl`` functionality in the Python viewer has been fixed.
- Set ``time`` correctly in ``mjd_transitionFD``, to support time-dependent user code.
- Fixed sensor data dimension validation when ``user`` type sensors are present.
- Fixed incorrect plugin error message when a null ``nsensordata`` callback is encountered during model compilation.
- Correctly end the timer (``TM_END``) ``mj_fwdConstraint`` returns early.
- Fixed an infinite loop in ``mj_deleteFileVFS``.
#. The ``launch_repl`` functionality in the Python viewer has been fixed.
#. Set ``time`` correctly in ``mjd_transitionFD``, to support time-dependent user code.
#. Fixed sensor data dimension validation when ``user`` type sensors are present.
#. Fixed incorrect plugin error message when a null ``nsensordata`` callback is encountered during model compilation.
#. Correctly end the timer (``TM_END``) ``mj_fwdConstraint`` returns early.
#. Fixed an infinite loop in ``mj_deleteFileVFS``.

Simulate
^^^^^^^^

- Increased precision of simulate sensor plot y-axis by 1 digit
(`#719 <https://github.com/deepmind/mujoco/issues/719>`_).
- Body labels are now drawn at the body frame rather than inertial frame, unless inertia is being visualised.
12. Increased precision of simulate sensor plot y-axis by 1 digit
(`#719 <https://github.com/deepmind/mujoco/issues/719>`_).
#. Body labels are now drawn at the body frame rather than inertial frame, unless inertia is being visualised.

Plugins
^^^^^^^

- The ``reset`` callback now receives instance-specific ``plugin_state`` and ``plugin_data`` as arguments, rather than
the entire ``mjData``. Since ``reset`` is called inside ``mj_resetData`` before any physics forwarding call has been
made, it is an error to read anything from ``mjData`` at this stage.
- The ``capabilities`` field in ``mjpPlugin`` is renamed ``capabilityflags`` to more clearly indicate that this is a
bit field.
14. The ``reset`` callback now receives instance-specific ``plugin_state`` and ``plugin_data`` as arguments, rather than
the entire ``mjData``. Since ``reset`` is called inside ``mj_resetData`` before any physics forwarding call has been
made, it is an error to read anything from ``mjData`` at this stage.
#. The ``capabilities`` field in ``mjpPlugin`` is renamed ``capabilityflags`` to more clearly indicate that this is a
bit field.


Version 2.3.1 (December 6, 2022)
Expand Down
4 changes: 2 additions & 2 deletions doc/unity.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.3.1.dylib`` (it can be
``/Applications/MuJoCo.app/Contents/Frameworks/mujoco.framework/Versions/Current/libmujoco.2.3.2.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.3.1/lib/libmujoco.so.2.3.1`` and rename it as ``libmujoco.so``.
``~/.mujoco/mujoco-2.3.2/lib/libmujoco.so.2.3.2`` and rename it as ``libmujoco.so``.

Windows
_______
Expand Down
2 changes: 1 addition & 1 deletion include/mujoco/mujoco.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ extern "C" {
#endif

// header version; should match the library version as returned by mj_version()
#define mjVERSION_HEADER 231
#define mjVERSION_HEADER 232

// needed to define size_t, fabs and log10
#include <stdlib.h>
Expand Down
16 changes: 5 additions & 11 deletions python/mujoco/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Cl
add_compile_options(-fdata-sections -ffunction-sections)
endif()

if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "15.0.0")
# Needed for https://github.com/abseil/abseil-cpp/issues/1201, until a new
# version of abseil is released with the fix.
add_compile_options(-Wno-deprecated-builtins)
endif()

include(MujocoLinkOptions)
get_mujoco_extra_link_options(EXTRA_LINK_OPTIONS)
add_link_options(${EXTRA_LINK_OPTIONS})
Expand Down Expand Up @@ -81,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.3.1.dylib)
set(MUJOCO_LIBRARY ${MUJOCO_FRAMEWORK}/mujoco.framework/Versions/A/libmujoco.2.3.2.dylib)
target_compile_options(mujoco INTERFACE -F${MUJOCO_FRAMEWORK})
endif()
endif()

if(NOT MUJOCO_FRAMEWORK)
find_library(MUJOCO_LIBRARY mujoco mujoco.2.3.1 HINTS ${MUJOCO_LIBRARY_DIR} REQUIRED)
find_library(MUJOCO_LIBRARY mujoco mujoco.2.3.2 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}")
Expand Down Expand Up @@ -134,7 +128,7 @@ findorfetch(
GIT_REPO
https://github.com/abseil/abseil-cpp
GIT_TAG
8c0b94e793a66495e0b1f34a5eb26bd7dc672db0 # LTS 20220623.1
78be63686ba732b25052be15f8d6dee891c05749 # LTS 20230125
TARGETS
${MUJOCO_PYTHON_ABSL_TARGETS}
EXCLUDE_FROM_ALL
Expand Down Expand Up @@ -167,7 +161,7 @@ findorfetch(
GIT_REPO
https://gitlab.com/libeigen/eigen
GIT_TAG
3bb6a48d8c171cf20b5f8e48bfb4e424fbd4f79e
3460f3558e7b469efb8a225894e21929c8c77629
TARGETS
Eigen3::Eigen
EXCLUDE_FROM_ALL
Expand All @@ -184,7 +178,7 @@ findorfetch(
GIT_REPO
https://github.com/pybind/pybind11
GIT_TAG
33fb7a6bd849653445b6ae37a8c274d3de9519cc
8ece7d641ca6ce316e59fec6744b8517073bbe32
TARGETS
pybind11::pybind11_headers
EXCLUDE_FROM_ALL
Expand Down
2 changes: 1 addition & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from setuptools import setup
from setuptools.command import build_ext

__version__ = '2.3.1.post1'
__version__ = '2.3.2'

MUJOCO_CMAKE = 'MUJOCO_CMAKE'
MUJOCO_CMAKE_ARGS = 'MUJOCO_CMAKE_ARGS'
Expand Down
2 changes: 1 addition & 1 deletion sample/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ set(MSVC_INCREMENTAL_DEFAULT ON)

project(
mujoco_samples
VERSION 2.3.1
VERSION 2.3.2
DESCRIPTION "MuJoCo samples binaries"
HOMEPAGE_URL "https://mujoco.org"
)
Expand Down
3 changes: 3 additions & 0 deletions sample/cmake/CheckAvxSupport.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ function(get_avx_compile_options OUTPUT_VAR)

if(MSVC)
set(CMAKE_REQUIRED_FLAGS "/arch:AVX")
elseif(WIN32)
# Abseil LTS 20230125.0 assumes that AVX implies PCLMUL on Windows.
set(CMAKE_REQUIRED_FLAGS "-mavx" "-mpclmul")
else()
set(CMAKE_REQUIRED_FLAGS "-mavx")
endif()
Expand Down
6 changes: 0 additions & 6 deletions sample/cmake/SampleOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,6 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang
-Wno-stringop-overflow
-Wno-stringop-truncation
)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "15.0.0")
# Needed for https://github.com/abseil/abseil-cpp/issues/1201, until a new
# version of abseil is released with the fix.
set(EXTRA_COMPILE_OPTIONS "${EXTRA_COMPILE_OPTIONS}"
-Wno-deprecated-builtins
)
endif()
endif()

Expand Down
2 changes: 1 addition & 1 deletion simulate/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ set(MUJOCO_DEP_VERSION_lodepng

project(
mujoco_simulate
VERSION 2.3.1
VERSION 2.3.2
DESCRIPTION "MuJoCo simulate binaries"
HOMEPAGE_URL "https://mujoco.org"
)
Expand Down
3 changes: 3 additions & 0 deletions simulate/cmake/CheckAvxSupport.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ function(get_avx_compile_options OUTPUT_VAR)

if(MSVC)
set(CMAKE_REQUIRED_FLAGS "/arch:AVX")
elseif(WIN32)
# Abseil LTS 20230125.0 assumes that AVX implies PCLMUL on Windows.
set(CMAKE_REQUIRED_FLAGS "-mavx" "-mpclmul")
else()
set(CMAKE_REQUIRED_FLAGS "-mavx")
endif()
Expand Down
6 changes: 0 additions & 6 deletions simulate/cmake/SimulateOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,6 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang
-Wno-stringop-overflow
-Wno-stringop-truncation
)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "15.0.0")
# Needed for https://github.com/abseil/abseil-cpp/issues/1201, until a new
# version of abseil is released with the fix.
set(EXTRA_COMPILE_OPTIONS "${EXTRA_COMPILE_OPTIONS}"
-Wno-deprecated-builtins
)
endif()
endif()

Expand Down
4 changes: 2 additions & 2 deletions src/engine/engine_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
#endif
#endif

#define mjVERSION 231
#define mjVERSIONSTRING "2.3.1"
#define mjVERSION 232
#define mjVERSIONSTRING "2.3.2"

// names of disable flags
const char* mjDISABLESTRING[mjNDISABLE] = {
Expand Down
4 changes: 2 additions & 2 deletions unity/Editor/Bindings/MujocoBinaryRetriever.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ static void RegisteredPackagesEventHandler(
if (AssetDatabase.LoadMainAssetAtPath(mujocoPath + "/mujoco.dylib") == null) {
File.Copy(
"/Applications/MuJoCo.app/Contents/Frameworks" +
"/mujoco.framework/Versions/Current/libmujoco.2.3.1.dylib",
"/mujoco.framework/Versions/Current/libmujoco.2.3.2.dylib",
mujocoPath + "/mujoco.dylib");
AssetDatabase.Refresh();
}
} else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) {
if (AssetDatabase.LoadMainAssetAtPath(mujocoPath + "/libmujoco.so") == null) {
File.Copy(
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) +
"/.mujoco/mujoco-2.3.1/lib/libmujoco.so.2.3.1",
"/.mujoco/mujoco-2.3.2/lib/libmujoco.so.2.3.2",
mujocoPath + "/libmujoco.so");
AssetDatabase.Refresh();
}
Expand Down
2 changes: 1 addition & 1 deletion unity/Runtime/Bindings/MjBindings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public static class MujocoLib {
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 = 231;
public const int mjVERSION_HEADER = 232;


// ------------------------------------Enums------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion unity/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "org.mujoco",
"displayName": "MuJoCo",
"version": "2.3.1",
"version": "2.3.2",
"description": "MuJoCo importer and runtime plug-in",
"dependencies": {},
"author": {
Expand Down

0 comments on commit dd632b7

Please sign in to comment.