Skip to content

Commit

Permalink
Version 2.1.1: Binaries for ARM64, proper macOS bundles, minor bugfixes.
Browse files Browse the repository at this point in the history
Closes #2
Closes #42
Closes #59

PiperOrigin-RevId: 416794598
Change-Id: I1306df1127d6acecf2323873c0da0910f35d31a0
  • Loading branch information
saran-t committed Dec 16, 2021
1 parent 4bf5630 commit a499b38
Show file tree
Hide file tree
Showing 49 changed files with 6,516 additions and 6,173 deletions.
12 changes: 4 additions & 8 deletions doc/APIreference.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@

.. include:: includes/macros.rst
.. include:: includes/roles.rst

=============
API Reference
=============
Expand Down Expand Up @@ -3205,8 +3201,8 @@ Virtual file system
| Virtual file system (VFS) functionality was introduced in MuJoCo 1.50. It enables the user to load all necessary files
in memory, including MJB binary model files, XML files (MJCF, URDF and included files), STL meshes, PNGs for textures
and height fields, and HF files in our custom height field format. Model and resource files in the VFS can also be
constructed programmatically (say using an XML library that writes to memory). Once all desired files are in the VFS,
the user can call :ref:`mj_loadModel` or :ref:`mj_loadXML` with a pointer to the VFS. When
constructed programmatically (say using a Python library that writes to memory). Once all desired files are in the
VFS, the user can call :ref:`mj_loadModel` or :ref:`mj_loadXML` with a pointer to the VFS. When
this pointer is not NULL, the loaders will first check the VFS for any file they are about to load, and only access
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
path information is stripped; this can be bypassed however by using a custom path symbol in the file names, say
Expand Down Expand Up @@ -5254,7 +5250,7 @@ mjui_add
Add definitions to UI.

mjui_addToSection
~~~~~~~~
~~~~~~~~~~~~~~~~~

.. code-block:: C
Expand Down Expand Up @@ -6426,7 +6422,7 @@ Insertion sort, resulting list is in increasing order.
.. _mju_insertionSortInt:

mju_insertionSortInt
~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~

.. code-block:: C
Expand Down
6 changes: 1 addition & 5 deletions doc/XMLreference.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@

.. include:: includes/macros.rst
.. include:: includes/roles.rst

=============
XML Reference
=============
Expand Down Expand Up @@ -1512,7 +1508,7 @@ any effect. The settings here are global and apply to the entire model.
hull computation is the slowest operation performed by the compiler). However once model design is finished, this
feature should be enabled, because the availability of convex hulls substantially speeds up collision detection with
large meshes.
:at:`userthread`: :at-val:`[false, true], "true"`
:at:`usethread`: :at-val:`[false, true], "true"`
If this attribute is "true", the model compiler will run in multi-threaded mode. Currently multi-threading is only
used when computing the length ranges of actuators, but in the future additional compiler phases may be
multi-threaded.
Expand Down
114 changes: 109 additions & 5 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,111 @@
.. include:: includes/macros.rst
.. include:: includes/roles.rst

=========
Changelog
=========

Version 2.1 (Oct. 18, 2021)
---------------------------
Version 2.1.1 (Dec. 16, 2021)
-----------------------------

API changes
^^^^^^^^^^^

1. Added ``mj_printFormattedModel``, which accepts a format string for floating point numbers, for example to increase
precision.
#. Added ``mj_versionString``, which returns human-readable string that represents the version of the MuJoCo binary.
#. Converted leading underscores to trailing underscores in private instances of API struct definitions, to conform to
reserved identifier directive, see
`C standard: Section 7.1.3 <www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf>`__.

.. attention::
This is a minor breaking change. Code which references private instances will break. To fix, replace leading
underscores with trailing underscores, e.g. ``_mjModel`` |rarr| ``mjModel_``.

General
^^^^^^^

4. Safer string handling: replaced ``strcat``, ``strcpy``, and ``sprintf`` with ``strncat``, ``strncpy``, and
``snprintf`` respectively.
#. Changed indentation from 4 spaces to 2 spaces everywhere.

Bug Fixes
^^^^^^^^^

6. Fixed reading from uninitialized memory in PGS solver.
#. Computed capsule inertias are now exact. Until this change, capsule masses and inertias computed by the
:ref:`compiler <compiler>`'s :at:`inertiafromgeom` mechanism were approximated by a cylinder, formed by the
capsule's cylindrical middle section, extended on both ends by half the capsule radius. Capsule inertias are now
computed with the `Parallel Axis theorem <https://en.wikipedia.org/wiki/Parallel_axis_theorem>`_, applied to the two
hemispherical end-caps.

.. attention::
This is a minor breaking change. Simulation of a model with automatically-computed capsule inertias will be
numerically different, leading to, for example, breakage of golden-value tests.
#. Fixed bug related to :ref:`force <sensor-force>` and :ref:`torque <sensor-torque>` sensors. Until this change, forces
torques reported by F/T sensors ignored out-of-tree constraint wrenches except those produced by contacts. Force and
and torque sensors now correctly take into account the effects of :ref:`connect <equality-connect>` and
:ref:`weld <equality-weld>` constraints.

.. note::
Forces generated by :ref:`spatial tendons <spatial>` which are outside the kinematic tree (i.e. between bodies
which have no ancestral relationship) are still not taken into account by force and torque sensors. This remains a
future work item.

Code samples
^^^^^^^^^^^^

9. ``testspeed``: Added injection of pseudo-random control noise, turned on by default. This is to avoid settling into
some fixed contact configuration and providing an unrealistic timing measure.
#. ``simulate``:

a. Added slower-than-real-time functionality, which is controlled via the '+' and '-' keys.
#. Added sliders for injecting Brownian noise into the controls.
#. Added "Print Camera" button to print an MJCF clause with the pose of the current camera.
#. The camera pose is not reset when reloading the same model file.

Updated dependencies
^^^^^^^^^^^^^^^^^^^^

11. ``TinyXML`` was replaced with ``TinyXML2`` 6.2.0.
#. ``qhull`` was upgraded to version 8.0.2.
#. ``libCCD`` was upgraded to version 1.4.
#. On Linux, ``libstdc++`` was replaced with ``libc++``.

Binary build
^^^^^^^^^^^^

15. MacOS packaging. We now ship Universal binaries that natively support both Apple Silicon and Intel CPUs.

a. MuJoCo library is now packaged as a
`Framework Bundle <https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/FrameworkAnatomy.html>`_,
allowing it to be incorporated more easily into Xcode projects (including Swift projects). Developers are
encouraged to compile and link against MuJoCo using the ``-framework mujoco`` flag, however all header files and
the ``libmujoco.2.1.1.dylib`` library can still be directly accessed inside the framework.
#. Sample applications are now packaged into an Application Bundle called ``MuJoCo.app``. When launched via GUI,
the bundle launches the ``simulate`` executable. Other precompiled sample programs are shipped inside that bundle
(in ``MuJoCo.app/Contents/MacOS``) and can be launched via command line.
#. Binaries are now signed and the disk image is notarized.

#. Windows binaries and libraries are now signed.
#. Link-time optimization is enabled on Linux and macOS, leading to an average of \~20% speedup when benchmarked on
three test models (``cloth.xml``, ``humanoid.xml``, and ``humanoid100.xml``).
#. Linux binaries are now built with LLVM/Clang instead of GCC.
#. An AArch64 (aka ARM64) Linux build is also provided.
#. Private symbols are no longer stripped from shared libraries on Linux and MacOS.

Sample models
^^^^^^^^^^^^^
21. Clean-up of the ``model/`` directory.

a. Rearranged into subdirectories which include all dependencies.
#. Added descriptions in XML comments, cleaned up XMLs.
#. Deleted some composite models: ``grid1``, ``grid1pin``, ``grid2``, ``softcylinder``, ``softellipsoid``.

#. Added descriptive animations in ``docs/images/models/`` :

|humanoid| |particle|


Version 2.1.0 (Oct. 18, 2021)
-----------------------------

New features
^^^^^^^^^^^^
Expand Down Expand Up @@ -63,3 +162,8 @@ Earlier Versions
----------------

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

.. |humanoid| image:: images/models/humanoid.gif
:width: 270px
.. |particle| image:: images/models/particle.gif
:width: 270px
6 changes: 6 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@
'index': 'overview.html',
}

rst_prolog = """
.. include:: includes/macros.rst
.. include:: includes/roles.rst
.. include:: <isonum.txt>
"""

# -- Options for autodoc -----------------------------------------------------

autodoc_default_options = {
Expand Down
Binary file added doc/images/models/flag.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/models/hammock.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/models/humanoid.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/models/humanoid100.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/models/particle.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/models/softbox.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit a499b38

Please sign in to comment.