Skip to content

Commit a499b38

Browse files
committed
Version 2.1.1: Binaries for ARM64, proper macOS bundles, minor bugfixes.
Closes #2 Closes #42 Closes #59 PiperOrigin-RevId: 416794598 Change-Id: I1306df1127d6acecf2323873c0da0910f35d31a0
1 parent 4bf5630 commit a499b38

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+6516
-6173
lines changed

doc/APIreference.rst

+4-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
2-
.. include:: includes/macros.rst
3-
.. include:: includes/roles.rst
4-
51
=============
62
API Reference
73
=============
@@ -3205,8 +3201,8 @@ Virtual file system
32053201
| Virtual file system (VFS) functionality was introduced in MuJoCo 1.50. It enables the user to load all necessary files
32063202
in memory, including MJB binary model files, XML files (MJCF, URDF and included files), STL meshes, PNGs for textures
32073203
and height fields, and HF files in our custom height field format. Model and resource files in the VFS can also be
3208-
constructed programmatically (say using an XML library that writes to memory). Once all desired files are in the VFS,
3209-
the user can call :ref:`mj_loadModel` or :ref:`mj_loadXML` with a pointer to the VFS. When
3204+
constructed programmatically (say using a Python library that writes to memory). Once all desired files are in the
3205+
VFS, the user can call :ref:`mj_loadModel` or :ref:`mj_loadXML` with a pointer to the VFS. When
32103206
this pointer is not NULL, the loaders will first check the VFS for any file they are about to load, and only access
32113207
the disk if the file is not found in the VFS. The file names stored in the VFS have their name and extension but the
32123208
path information is stripped; this can be bypassed however by using a custom path symbol in the file names, say
@@ -5254,7 +5250,7 @@ mjui_add
52545250
Add definitions to UI.
52555251

52565252
mjui_addToSection
5257-
~~~~~~~~
5253+
~~~~~~~~~~~~~~~~~
52585254

52595255
.. code-block:: C
52605256
@@ -6426,7 +6422,7 @@ Insertion sort, resulting list is in increasing order.
64266422
.. _mju_insertionSortInt:
64276423

64286424
mju_insertionSortInt
6429-
~~~~~~~~~~~~~~~~~
6425+
~~~~~~~~~~~~~~~~~~~~
64306426

64316427
.. code-block:: C
64326428

doc/XMLreference.rst

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
2-
.. include:: includes/macros.rst
3-
.. include:: includes/roles.rst
4-
51
=============
62
XML Reference
73
=============
@@ -1512,7 +1508,7 @@ any effect. The settings here are global and apply to the entire model.
15121508
hull computation is the slowest operation performed by the compiler). However once model design is finished, this
15131509
feature should be enabled, because the availability of convex hulls substantially speeds up collision detection with
15141510
large meshes.
1515-
:at:`userthread`: :at-val:`[false, true], "true"`
1511+
:at:`usethread`: :at-val:`[false, true], "true"`
15161512
If this attribute is "true", the model compiler will run in multi-threaded mode. Currently multi-threading is only
15171513
used when computing the length ranges of actuators, but in the future additional compiler phases may be
15181514
multi-threaded.

doc/changelog.rst

+109-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,111 @@
1-
.. include:: includes/macros.rst
2-
.. include:: includes/roles.rst
3-
41
=========
52
Changelog
63
=========
74

8-
Version 2.1 (Oct. 18, 2021)
9-
---------------------------
5+
Version 2.1.1 (Dec. 16, 2021)
6+
-----------------------------
7+
8+
API changes
9+
^^^^^^^^^^^
10+
11+
1. Added ``mj_printFormattedModel``, which accepts a format string for floating point numbers, for example to increase
12+
precision.
13+
#. Added ``mj_versionString``, which returns human-readable string that represents the version of the MuJoCo binary.
14+
#. Converted leading underscores to trailing underscores in private instances of API struct definitions, to conform to
15+
reserved identifier directive, see
16+
`C standard: Section 7.1.3 <www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf>`__.
17+
18+
.. attention::
19+
This is a minor breaking change. Code which references private instances will break. To fix, replace leading
20+
underscores with trailing underscores, e.g. ``_mjModel`` |rarr| ``mjModel_``.
21+
22+
General
23+
^^^^^^^
24+
25+
4. Safer string handling: replaced ``strcat``, ``strcpy``, and ``sprintf`` with ``strncat``, ``strncpy``, and
26+
``snprintf`` respectively.
27+
#. Changed indentation from 4 spaces to 2 spaces everywhere.
28+
29+
Bug Fixes
30+
^^^^^^^^^
31+
32+
6. Fixed reading from uninitialized memory in PGS solver.
33+
#. Computed capsule inertias are now exact. Until this change, capsule masses and inertias computed by the
34+
:ref:`compiler <compiler>`'s :at:`inertiafromgeom` mechanism were approximated by a cylinder, formed by the
35+
capsule's cylindrical middle section, extended on both ends by half the capsule radius. Capsule inertias are now
36+
computed with the `Parallel Axis theorem <https://en.wikipedia.org/wiki/Parallel_axis_theorem>`_, applied to the two
37+
hemispherical end-caps.
38+
39+
.. attention::
40+
This is a minor breaking change. Simulation of a model with automatically-computed capsule inertias will be
41+
numerically different, leading to, for example, breakage of golden-value tests.
42+
#. Fixed bug related to :ref:`force <sensor-force>` and :ref:`torque <sensor-torque>` sensors. Until this change, forces
43+
torques reported by F/T sensors ignored out-of-tree constraint wrenches except those produced by contacts. Force and
44+
and torque sensors now correctly take into account the effects of :ref:`connect <equality-connect>` and
45+
:ref:`weld <equality-weld>` constraints.
46+
47+
.. note::
48+
Forces generated by :ref:`spatial tendons <spatial>` which are outside the kinematic tree (i.e. between bodies
49+
which have no ancestral relationship) are still not taken into account by force and torque sensors. This remains a
50+
future work item.
51+
52+
Code samples
53+
^^^^^^^^^^^^
54+
55+
9. ``testspeed``: Added injection of pseudo-random control noise, turned on by default. This is to avoid settling into
56+
some fixed contact configuration and providing an unrealistic timing measure.
57+
#. ``simulate``:
58+
59+
a. Added slower-than-real-time functionality, which is controlled via the '+' and '-' keys.
60+
#. Added sliders for injecting Brownian noise into the controls.
61+
#. Added "Print Camera" button to print an MJCF clause with the pose of the current camera.
62+
#. The camera pose is not reset when reloading the same model file.
63+
64+
Updated dependencies
65+
^^^^^^^^^^^^^^^^^^^^
66+
67+
11. ``TinyXML`` was replaced with ``TinyXML2`` 6.2.0.
68+
#. ``qhull`` was upgraded to version 8.0.2.
69+
#. ``libCCD`` was upgraded to version 1.4.
70+
#. On Linux, ``libstdc++`` was replaced with ``libc++``.
71+
72+
Binary build
73+
^^^^^^^^^^^^
74+
75+
15. MacOS packaging. We now ship Universal binaries that natively support both Apple Silicon and Intel CPUs.
76+
77+
a. MuJoCo library is now packaged as a
78+
`Framework Bundle <https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/FrameworkAnatomy.html>`_,
79+
allowing it to be incorporated more easily into Xcode projects (including Swift projects). Developers are
80+
encouraged to compile and link against MuJoCo using the ``-framework mujoco`` flag, however all header files and
81+
the ``libmujoco.2.1.1.dylib`` library can still be directly accessed inside the framework.
82+
#. Sample applications are now packaged into an Application Bundle called ``MuJoCo.app``. When launched via GUI,
83+
the bundle launches the ``simulate`` executable. Other precompiled sample programs are shipped inside that bundle
84+
(in ``MuJoCo.app/Contents/MacOS``) and can be launched via command line.
85+
#. Binaries are now signed and the disk image is notarized.
86+
87+
#. Windows binaries and libraries are now signed.
88+
#. Link-time optimization is enabled on Linux and macOS, leading to an average of \~20% speedup when benchmarked on
89+
three test models (``cloth.xml``, ``humanoid.xml``, and ``humanoid100.xml``).
90+
#. Linux binaries are now built with LLVM/Clang instead of GCC.
91+
#. An AArch64 (aka ARM64) Linux build is also provided.
92+
#. Private symbols are no longer stripped from shared libraries on Linux and MacOS.
93+
94+
Sample models
95+
^^^^^^^^^^^^^
96+
21. Clean-up of the ``model/`` directory.
97+
98+
a. Rearranged into subdirectories which include all dependencies.
99+
#. Added descriptions in XML comments, cleaned up XMLs.
100+
#. Deleted some composite models: ``grid1``, ``grid1pin``, ``grid2``, ``softcylinder``, ``softellipsoid``.
101+
102+
#. Added descriptive animations in ``docs/images/models/`` :
103+
104+
|humanoid| |particle|
105+
106+
107+
Version 2.1.0 (Oct. 18, 2021)
108+
-----------------------------
10109

11110
New features
12111
^^^^^^^^^^^^
@@ -63,3 +162,8 @@ Earlier Versions
63162
----------------
64163

65164
For changelogs of earlier versions please see `roboti.us <https://www.roboti.us/download.html>`_.
165+
166+
.. |humanoid| image:: images/models/humanoid.gif
167+
:width: 270px
168+
.. |particle| image:: images/models/particle.gif
169+
:width: 270px

doc/conf.py

+6
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@
6060
'index': 'overview.html',
6161
}
6262

63+
rst_prolog = """
64+
.. include:: includes/macros.rst
65+
.. include:: includes/roles.rst
66+
.. include:: <isonum.txt>
67+
"""
68+
6369
# -- Options for autodoc -----------------------------------------------------
6470

6571
autodoc_default_options = {

doc/images/models/flag.gif

1.23 MB
Loading

doc/images/models/hammock.gif

2.29 MB
Loading

doc/images/models/humanoid.gif

3.74 MB
Loading

doc/images/models/humanoid100.gif

2.74 MB
Loading

doc/images/models/particle.gif

2.82 MB
Loading

doc/images/models/softbox.gif

1.68 MB
Loading

0 commit comments

Comments
 (0)