Skip to content

Commit df048e5

Browse files
nimrod-gileadisaran-t
authored andcommitted
Update MuJoCo to version 2.1.3.
PiperOrigin-RevId: 436727767 Change-Id: I9b1b0084021e83f790efa46eab9a980cbde4953f
1 parent d1db62c commit df048e5

File tree

9 files changed

+41
-19
lines changed

9 files changed

+41
-19
lines changed

doc/changelog.rst

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,28 @@
22
Changelog
33
=========
44

5+
Version 2.1.3 (Mar. 23, 2022)
6+
-----------------------------
7+
8+
General
9+
^^^^^^^
10+
11+
1. ``simulate`` now support cycling through cameras (with ``[`` and ``]`` keys).
12+
#. ``mjVIS_STATIC`` toggles all static bodies, not just direct children of the world.
13+
14+
Python bindings
15+
^^^^^^^^^^^^^^^
16+
17+
3. Add a ``free()`` method to ``MjrContext``.
18+
#. Enums now support arithmetic and bitwise operations with numbers.
19+
20+
Bug fixes
21+
^^^^^^^^^
22+
23+
5. Fix rendering bug for planes, introduced in 2.1.2. This broke maze environments in
24+
`dm_control <https://github.com/deepmind/dm_control>`_.
25+
26+
527
Version 2.1.2 (Mar. 15, 2022)
628
-----------------------------
729

@@ -76,7 +98,7 @@ General
7698
attribute: ``<geom fluidshape="ellipsoid"/>``. The parameters are described succinctly :ref:`here<geom>`, but we
7799
leave a full description or the model and its parameters to when this feature leaves experimental status.
78100

79-
Bug Fixes
101+
Bug fixes
80102
^^^^^^^^^
81103

82104
16. ``mj_loadXML`` and ``mj_saveLastXML`` are now locale-independent. The Unity plugin should now work correctly for
@@ -247,7 +269,7 @@ License manager
247269
backward compabitibily, but now they do nothing and it is no longer necessary to call them.
248270
#. Removed the remote license certificate functions ``mj_certXXX``.
249271

250-
Earlier Versions
272+
Earlier versions
251273
----------------
252274

253275
For changelogs of earlier versions please see `roboti.us <https://www.roboti.us/download.html>`_.

doc/python.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ DeepMind’s `dm_control <https://github.com/deepmind/dm_control>`__ reinforceme
1818
version 1.0.0 implemented its own MuJoCo bindings based on ``ctypes``) has been updated to depend on the ``mujoco``
1919
package and continues to be supported by DeepMind. Changes in dm_control should be largely transparent to users of
2020
previous versions, however code that depended directly on its low-level API may need to be updated. Consult the
21-
`migration guide <https://github.com/deepmind/dm_control/blob/main/migration_guide_1.0.md>`__ for detail.
21+
`migration guide <https://github.com/deepmind/dm_control/blob/master/migration_guide_1.0.md>`__ for detail.
2222

2323
For mujoco-py users, we include :ref:`notes <PyMjpy_migration>` below to aid migration.
2424

include/mujoco.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ extern "C" {
2424
#endif
2525

2626
// header version; should match the library version as returned by mj_version()
27-
#define mjVERSION_HEADER 212
27+
#define mjVERSION_HEADER 213
2828

2929
// needed to define size_t, fabs and log10
3030
#include "stdlib.h"

python/mujoco/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ include(FindOrFetch)
5555

5656
# ==================== MUJOCO LIBRARY ==========================================
5757
if(NOT TARGET mujoco)
58-
find_library(MUJOCO_LIBRARY mujoco mujoco.2.1.2 HINTS ${MUJOCO_LIBRARY_DIR} REQUIRED)
58+
find_library(MUJOCO_LIBRARY mujoco mujoco.2.1.3 HINTS ${MUJOCO_LIBRARY_DIR} REQUIRED)
5959
find_path(MUJOCO_INCLUDE mujoco.h HINTS ${MUJOCO_INCLUDE_DIR} REQUIRED)
6060
message("MuJoCo is at ${MUJOCO_LIBRARY}")
6161
message("MuJoCo headers are at ${MUJOCO_INCLUDE}")
@@ -152,7 +152,7 @@ else()
152152
GIT_REPO
153153
https://github.com/pybind/pybind11
154154
GIT_TAG
155-
4c4b33f14215f8992e2c67ace2a7a4c114c48bb9
155+
08ea85b0ac0d4d46ac081ff24f481b41322d7159
156156
TARGETS
157157
pybind11::pybind11_headers
158158
EXCLUDE_FROM_ALL

python/mujoco/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@
4141
ctypes.CDLL(os.path.join(os.path.dirname(__file__), libglew_name),
4242
ctypes.RTLD_GLOBAL)
4343
ctypes.CDLL(
44-
os.path.join(os.path.dirname(__file__), 'libmujoco.so.2.1.2'),
44+
os.path.join(os.path.dirname(__file__), 'libmujoco.so.2.1.3'),
4545
ctypes.RTLD_GLOBAL)
4646
else:
4747
ctypes.CDLL(
48-
os.path.join(os.path.dirname(__file__), 'libmujoco_nogl.so.2.1.2'),
48+
os.path.join(os.path.dirname(__file__), 'libmujoco_nogl.so.2.1.3'),
4949
ctypes.RTLD_GLOBAL)
5050
elif _SYSTEM == 'Windows':
5151
if _MUJOCO_GL in _MUJOCO_GL_ENABLE + ('glfw', 'wgl'):

python/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
from setuptools import setup
3131
from setuptools.command import build_ext
3232

33-
__version__ = '2.1.2.post2'
33+
__version__ = '2.1.3'
3434

3535
MUJOCO_CMAKE = 'MUJOCO_CMAKE'
3636
MUJOCO_CMAKE_ARGS = 'MUJOCO_CMAKE_ARGS'

sample/Makefile.macos

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ CFLAGS=-O2 -I$(MUJOCO_INCLUDEDIR) -I$(HOMEBREW)/include -pthread
1010
ALLFLAGS=$(CFLAGS) -L$(MUJOCO_LIBDIR) -L$(HOMEBREW)/lib -std=c++11 -stdlib=libc++
1111

1212
all:
13-
clang++ $(ALLFLAGS) testxml.cc -lmujoco.2.1.2 -o testxml
14-
clang++ $(ALLFLAGS) testspeed.cc -lmujoco.2.1.2 -o testspeed
15-
clang++ $(ALLFLAGS) compile.cc -lmujoco.2.1.2 -o compile
16-
clang++ $(ALLFLAGS) derivative.cc -lmujoco.2.1.2 -o derivative
17-
clang++ $(ALLFLAGS) basic.cc -lmujoco.2.1.2 -lglfw -o basic
18-
clang++ $(ALLFLAGS) record.cc -lmujoco.2.1.2 -lglfw -o record
13+
clang++ $(ALLFLAGS) testxml.cc -lmujoco.2.1.3 -o testxml
14+
clang++ $(ALLFLAGS) testspeed.cc -lmujoco.2.1.3 -o testspeed
15+
clang++ $(ALLFLAGS) compile.cc -lmujoco.2.1.3 -o compile
16+
clang++ $(ALLFLAGS) derivative.cc -lmujoco.2.1.3 -o derivative
17+
clang++ $(ALLFLAGS) basic.cc -lmujoco.2.1.3 -lglfw -o basic
18+
clang++ $(ALLFLAGS) record.cc -lmujoco.2.1.3 -lglfw -o record
1919
clang -c $(CFLAGS) uitools.c
20-
clang++ $(ALLFLAGS) uitools.o simulate.cc -lmujoco.2.1.2 -lglfw -o simulate
20+
clang++ $(ALLFLAGS) uitools.o simulate.cc -lmujoco.2.1.3 -lglfw -o simulate
2121
rm *.o

unity/Runtime/Bindings/MujocoBinaryRetriever.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ static void RegisteredPackagesEventHandler(
3535
if (AssetDatabase.LoadMainAssetAtPath(mujocoPath + "/mujoco.dylib") == null) {
3636
File.Copy(
3737
"/Applications/MuJoCo.app/Contents/Frameworks" +
38-
"/MuJoCo.framework/Versions/Current/libmujoco.2.1.2.dylib",
38+
"/MuJoCo.framework/Versions/Current/libmujoco.2.1.3.dylib",
3939
mujocoPath + "/mujoco.dylib");
4040
AssetDatabase.Refresh();
4141
}
4242
} else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) {
4343
if (AssetDatabase.LoadMainAssetAtPath(mujocoPath + "/libmujoco.so") == null) {
4444
File.Copy(
4545
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) +
46-
"/.mujoco/mujoco-2.1.2/lib/libmujoco_nogl.so.2.1.2",
46+
"/.mujoco/mujoco-2.1.3/lib/libmujoco_nogl.so.2.1.3",
4747
mujocoPath + "/libmujoco.so");
4848
AssetDatabase.Refresh();
4949
}

unity/Runtime/Bindings/MujocoBindings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public static class MujocoLib {
8383
public const int mjMAXLINE = 100;
8484
public const int mjMAXLINEPNT = 1000;
8585
public const int mjMAXPLANEGRID = 200;
86-
public const int mjVERSION_HEADER = 212;
86+
public const int mjVERSION_HEADER = 213;
8787

8888

8989
// ------------------------------------Enums------------------------------------

0 commit comments

Comments
 (0)