Enable compiler asset cache for public use, and add changelog entry.
PiperOrigin-RevId: 631352810 Change-Id: If6208327499e3e4bd37cbb2a1b0cdcfb912c1056
This commit is contained in:
committed by
Copybara-Service
parent
a40de1b230
commit
ad0459680d
+23
-21
@@ -14,50 +14,52 @@ General
|
|||||||
|
|
||||||
1. Added the :ref:`replicate<replicate>` to MJCF, a :ref:`meta-element<meta-element>` which permits to repeat a subtree
|
1. Added the :ref:`replicate<replicate>` to MJCF, a :ref:`meta-element<meta-element>` which permits to repeat a subtree
|
||||||
with incremental translational and rotational offsets.
|
with incremental translational and rotational offsets.
|
||||||
2. Added ``mjModel.mesh_scale``: the scaling applied to asset vertices, as specified in the
|
2. Enabled an internal cache in the MuJoCo compiler resulting in recompilation speedup. Currently, processed
|
||||||
|
textures, hfields, and OBJ meshes are cached. Support for Unity environments is not yet available.
|
||||||
|
3. Added ``mjModel.mesh_scale``: the scaling applied to asset vertices, as specified in the
|
||||||
:ref:`scale<asset-mesh-scale>` attribute.
|
:ref:`scale<asset-mesh-scale>` attribute.
|
||||||
3. Added visual properties which are ignored by the native renderer, but can be used by external renderers:
|
4. Added visual properties which are ignored by the native renderer, but can be used by external renderers:
|
||||||
|
|
||||||
- :ref:`light/bulbradius<body-light-bulbradius>` attribute and corresponding ``mjModel.light_bulbradius`` field.
|
- :ref:`light/bulbradius<body-light-bulbradius>` attribute and corresponding ``mjModel.light_bulbradius`` field.
|
||||||
- :ref:`material/metallic<asset-material-metallic>` attribute and corresponding ``mjModel.material_metallic`` field.
|
- :ref:`material/metallic<asset-material-metallic>` attribute and corresponding ``mjModel.material_metallic`` field.
|
||||||
- :ref:`material/roughness<asset-material-roughness>` attribute and corresponding ``mjModel.material_roughness``
|
- :ref:`material/roughness<asset-material-roughness>` attribute and corresponding ``mjModel.material_roughness``
|
||||||
field.
|
field.
|
||||||
4. The type of the ``size`` argument of :ref:`mj_stackAllocNum` and :ref:`mj_stackAllocInt` was changed from ``int``
|
5. The type of the ``size`` argument of :ref:`mj_stackAllocNum` and :ref:`mj_stackAllocInt` was changed from ``int``
|
||||||
to ``size_t``.
|
to ``size_t``.
|
||||||
5. Added support for gmsh format version 2.2 surface meshes in :ref:`flexcomp<body-flexcomp-file>`.
|
6. Added support for gmsh format version 2.2 surface meshes in :ref:`flexcomp<body-flexcomp-file>`.
|
||||||
|
|
||||||
MJX
|
MJX
|
||||||
^^^
|
^^^
|
||||||
.. admonition:: Breaking API changes
|
.. admonition:: Breaking API changes
|
||||||
:class: attention
|
:class: attention
|
||||||
|
|
||||||
6. Removed deprecated ``mjx.device_get_into`` and ``mjx.device_put`` functions as they lack critical new
|
7. Removed deprecated ``mjx.device_get_into`` and ``mjx.device_put`` functions as they lack critical new
|
||||||
functionality.
|
functionality.
|
||||||
|
|
||||||
**Migration:** Use ``mjx.get_data_into`` instead of ``mjx.device_get_into``, and ``mjx.put_data`` instead of
|
**Migration:** Use ``mjx.get_data_into`` instead of ``mjx.device_get_into``, and ``mjx.put_data`` instead of
|
||||||
``mjx.device_put``.
|
``mjx.device_put``.
|
||||||
|
|
||||||
7. Added cylinder plane collisions.
|
8. Added cylinder plane collisions.
|
||||||
8. Added ``efc_type`` to ``mjx.Data`` and ``dim``, ``efc_address`` to ``mjx.Contact``.
|
9. Added ``efc_type`` to ``mjx.Data`` and ``dim``, ``efc_address`` to ``mjx.Contact``.
|
||||||
9. Added ``geom`` to ``mjx.Contact`` and marked ``geom1``, ``geom2`` deprecated.
|
10. Added ``geom`` to ``mjx.Contact`` and marked ``geom1``, ``geom2`` deprecated.
|
||||||
10. Added ``ne``, ``nf``, ``nl``, ``nefc``, and ``ncon`` to ``mjx.Data`` to match ``mujoco.MjData``.
|
11. Added ``ne``, ``nf``, ``nl``, ``nefc``, and ``ncon`` to ``mjx.Data`` to match ``mujoco.MjData``.
|
||||||
11. Given the above added fields, removed ``mjx.get_params``, ``mjx.ncon``, and ``mjx.count_constraints``.
|
12. Given the above added fields, removed ``mjx.get_params``, ``mjx.ncon``, and ``mjx.count_constraints``.
|
||||||
12. Changed the way meshes are organized on device to speed up collision detection when a mesh is replicated for many
|
13. Changed the way meshes are organized on device to speed up collision detection when a mesh is replicated for many
|
||||||
geoms.
|
geoms.
|
||||||
13. Fixed a bug where capsules might be ignored in broadphase colliision checking.
|
14. Fixed a bug where capsules might be ignored in broadphase colliision checking.
|
||||||
14. Added cylinder collisions using SDFs.
|
15. Added cylinder collisions using SDFs.
|
||||||
15. Added support for all :ref:`condim <coContact>`: 1, 3, 4, 6.
|
16. Added support for all :ref:`condim <coContact>`: 1, 3, 4, 6.
|
||||||
16. Add support functions for ``id2name`` and ``name2id``, MJX versions of :ref:`mj_id2name` and :ref:`mj_name2id`.
|
17. Add support functions for ``id2name`` and ``name2id``, MJX versions of :ref:`mj_id2name` and :ref:`mj_name2id`.
|
||||||
17. Added support for :ref:`gravcomp<body-gravcomp>` and :ref:`actuatorgravcomp<body-joint-actuatorgravcomp>`.
|
18. Added support for :ref:`gravcomp<body-gravcomp>` and :ref:`actuatorgravcomp<body-joint-actuatorgravcomp>`.
|
||||||
18. Fixed a bug in ``mjx.ray`` for sometimes allowed negative distances for ray-mesh tests.
|
19. Fixed a bug in ``mjx.ray`` for sometimes allowed negative distances for ray-mesh tests.
|
||||||
|
|
||||||
Bug fixes
|
Bug fixes
|
||||||
^^^^^^^^^
|
^^^^^^^^^
|
||||||
19. Defaults of lights were not being saved, now fixed.
|
20. Defaults of lights were not being saved, now fixed.
|
||||||
20. Prevent overwriting of frame names by body names when saving an XML. Bug introduced in 3.1.4.
|
21. Prevent overwriting of frame names by body names when saving an XML. Bug introduced in 3.1.4.
|
||||||
21. Fixed bug in Python binding of :ref:`mj_saveModel`: ``buffer`` argument was documented as optional but was actually
|
22. Fixed bug in Python binding of :ref:`mj_saveModel`: ``buffer`` argument was documented as optional but was actually
|
||||||
not optional.
|
not optional.
|
||||||
22. Fixed bug that prevented memory allocations larger than 2.15 GB.
|
23. Fixed bug that prevented memory allocations larger than 2.15 GB.
|
||||||
|
|
||||||
|
|
||||||
Version 3.1.4 (April 10th, 2024)
|
Version 3.1.4 (April 10th, 2024)
|
||||||
|
|||||||
+11
-1
@@ -29,6 +29,9 @@
|
|||||||
#include "user/user_cache.h"
|
#include "user/user_cache.h"
|
||||||
#include "xml/xml_util.h"
|
#include "xml/xml_util.h"
|
||||||
|
|
||||||
|
// global cache size in bytes (default 500MB)
|
||||||
|
static constexpr std::size_t kGlobalCacheSize = 500 * (1 << 20);
|
||||||
|
|
||||||
|
|
||||||
// prepend prefix
|
// prepend prefix
|
||||||
template <typename T>
|
template <typename T>
|
||||||
@@ -698,5 +701,12 @@ void mj_setCacheSize(mjCache cache, std::size_t size) {
|
|||||||
|
|
||||||
|
|
||||||
mjCache mj_globalCache() {
|
mjCache mj_globalCache() {
|
||||||
return NULL; // currently disabled
|
// mjCCache is not trivially destructible and so the global cache needs to
|
||||||
|
// allocated on the heap
|
||||||
|
if constexpr (kGlobalCacheSize) {
|
||||||
|
static mjCCache* cache = new(std::nothrow) mjCCache(kGlobalCacheSize);
|
||||||
|
return (mjCache) cache;
|
||||||
|
} else {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user