diff --git a/doc/changelog.rst b/doc/changelog.rst index 4785c652..495e8f4d 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -14,11 +14,16 @@ General as input to learning-based agents and in environment logic. - Removed the SdfLib plugin and the dependency on `SdfLib `__. SDFs are now supported natively in mjModel. +- Removed ``oct_depth`` from :ref:`mjvOption` (unused). - Inertia computation in MuJoCo C is now performed by a new :ref:`pipeline` function :ref:`mj_makeM`, which combines the Composite Rigid Body algorithm in :ref:`mj_crb` and additional terms related to :ref:`tendon armature`. Code that uses :ref:`mj_crb` to compute the inertia should now use :ref:`mj_makeM` instead. +.. admonition:: Breaking API changes + :class: attention + + - Removed the ``mjVIS_FLEXBVH`` enum value, its functionality is now provided by :ref:`mjVIS_MESHBVH`. Bug fixes ^^^^^^^^^ diff --git a/doc/includes/references.h b/doc/includes/references.h index 961326f8..b554aeb1 100644 --- a/doc/includes/references.h +++ b/doc/includes/references.h @@ -2745,7 +2745,6 @@ typedef enum mjtVisFlag_ { // flags enabling model element visualization mjVIS_FLEXFACE, // flex element faces mjVIS_FLEXSKIN, // flex smooth skin (disables the rest) mjVIS_BODYBVH, // body bounding volume hierarchy - mjVIS_FLEXBVH, // flex bounding volume hierarchy mjVIS_MESHBVH, // mesh bounding volume hierarchy mjVIS_SDFITER, // iterations of SDF gradient descent @@ -2879,7 +2878,6 @@ struct mjvOption_ { // abstract visualization options mjtByte skingroup[mjNGROUP]; // skin visualization by group mjtByte flags[mjNVISFLAG]; // visualization flags (indexed by mjtVisFlag) int bvh_depth; // depth of the bounding volume hierarchy to be visualized - int oct_depth; // depth of the octree to be visualized int flex_layer; // element layer to be visualized for 3D flex }; typedef struct mjvOption_ mjvOption; diff --git a/include/mujoco/mjvisualize.h b/include/mujoco/mjvisualize.h index 2c7fd535..0fce23f9 100644 --- a/include/mujoco/mjvisualize.h +++ b/include/mujoco/mjvisualize.h @@ -130,7 +130,6 @@ typedef enum mjtVisFlag_ { // flags enabling model element visualization mjVIS_FLEXFACE, // flex element faces mjVIS_FLEXSKIN, // flex smooth skin (disables the rest) mjVIS_BODYBVH, // body bounding volume hierarchy - mjVIS_FLEXBVH, // flex bounding volume hierarchy mjVIS_MESHBVH, // mesh bounding volume hierarchy mjVIS_SDFITER, // iterations of SDF gradient descent @@ -292,7 +291,6 @@ struct mjvOption_ { // abstract visualization options mjtByte skingroup[mjNGROUP]; // skin visualization by group mjtByte flags[mjNVISFLAG]; // visualization flags (indexed by mjtVisFlag) int bvh_depth; // depth of the bounding volume hierarchy to be visualized - int oct_depth; // depth of the octree to be visualized int flex_layer; // element layer to be visualized for 3D flex }; typedef struct mjvOption_ mjvOption; diff --git a/model/flex/sphere_trilinear.xml b/model/flex/sphere_trilinear.xml index b90e0267..5a0227c2 100644 --- a/model/flex/sphere_trilinear.xml +++ b/model/flex/sphere_trilinear.xml @@ -22,7 +22,7 @@ - diff --git a/python/mujoco/introspect/enums.py b/python/mujoco/introspect/enums.py index bab08383..f49661bc 100644 --- a/python/mujoco/introspect/enums.py +++ b/python/mujoco/introspect/enums.py @@ -671,10 +671,9 @@ ENUMS: Mapping[str, EnumDecl] = dict([ ('mjVIS_FLEXFACE', 26), ('mjVIS_FLEXSKIN', 27), ('mjVIS_BODYBVH', 28), - ('mjVIS_FLEXBVH', 29), - ('mjVIS_MESHBVH', 30), - ('mjVIS_SDFITER', 31), - ('mjNVISFLAG', 32), + ('mjVIS_MESHBVH', 29), + ('mjVIS_SDFITER', 30), + ('mjNVISFLAG', 31), ]), )), ('mjtRndFlag', diff --git a/python/mujoco/introspect/structs.py b/python/mujoco/introspect/structs.py index 7dea2be0..36984603 100644 --- a/python/mujoco/introspect/structs.py +++ b/python/mujoco/introspect/structs.py @@ -6925,7 +6925,7 @@ STRUCTS: Mapping[str, StructDecl] = dict([ name='flags', type=ArrayType( inner_type=ValueType(name='mjtByte'), - extents=(32,), + extents=(31,), ), doc='visualization flags (indexed by mjtVisFlag)', ), @@ -6934,11 +6934,6 @@ STRUCTS: Mapping[str, StructDecl] = dict([ type=ValueType(name='int'), doc='depth of the bounding volume hierarchy to be visualized', ), - StructFieldDecl( - name='oct_depth', - type=ValueType(name='int'), - doc='depth of the octree to be visualized', - ), StructFieldDecl( name='flex_layer', type=ValueType(name='int'), diff --git a/python/mujoco/structs.cc b/python/mujoco/structs.cc index f9421e50..4501d593 100644 --- a/python/mujoco/structs.cc +++ b/python/mujoco/structs.cc @@ -1110,7 +1110,6 @@ This is useful for example when the MJB is not available as a file on disk.)")); X(label); X(frame); X(bvh_depth); - X(oct_depth); X(flex_layer); #undef X diff --git a/simulate/simulate.h b/simulate/simulate.h index a949615e..91ba5fcc 100644 --- a/simulate/simulate.h +++ b/simulate/simulate.h @@ -47,7 +47,7 @@ class Simulate { using Clock = std::chrono::steady_clock; static_assert(std::ratio_less_equal_v); - static constexpr int kMaxGeom = 20000; + static constexpr int kMaxGeom = 100000; // create object and initialize the simulate ui Simulate( diff --git a/src/engine/engine_vis_init.c b/src/engine/engine_vis_init.c index 04d2079e..cb66d7c4 100644 --- a/src/engine/engine_vis_init.c +++ b/src/engine/engine_vis_init.c @@ -97,7 +97,6 @@ const char* mjVISSTRING[mjNVISFLAG][3] = { {"Flex Face", "0", ""}, {"Flex Skin", "1", ""}, {"Body Tree", "0", "`"}, - {"Flex Tree", "0", ""}, {"Mesh Tree", "0", "\\"}, {"SDF iters", "0", ""} }; diff --git a/src/engine/engine_vis_visualize.c b/src/engine/engine_vis_visualize.c index e6c3e5f7..da42cb4f 100644 --- a/src/engine/engine_vis_visualize.c +++ b/src/engine/engine_vis_visualize.c @@ -687,7 +687,7 @@ void mjv_addGeoms(const mjModel* m, mjData* d, const mjvOption* vopt, // flex BVH category = mjCAT_DECOR; objtype = mjOBJ_UNKNOWN; - if (vopt->flags[mjVIS_FLEXBVH]) { + if (vopt->flags[mjVIS_MESHBVH]) { for (int f=0; f < m->nflex; f++) { if (m->flex_bvhnum[f] && vopt->flexgroup[mjMAX(0, mjMIN(mjNGROUP-1, m->flex_group[f]))]) { for (int i=m->flex_bvhadr[f]; i < m->flex_bvhadr[f]+m->flex_bvhnum[f]; i++) { diff --git a/unity/Runtime/Bindings/MjBindings.cs b/unity/Runtime/Bindings/MjBindings.cs index f6bcfb84..e33bb6df 100644 --- a/unity/Runtime/Bindings/MjBindings.cs +++ b/unity/Runtime/Bindings/MjBindings.cs @@ -643,10 +643,9 @@ public enum mjtVisFlag : int{ mjVIS_FLEXFACE = 26, mjVIS_FLEXSKIN = 27, mjVIS_BODYBVH = 28, - mjVIS_FLEXBVH = 29, - mjVIS_MESHBVH = 30, - mjVIS_SDFITER = 31, - mjNVISFLAG = 32, + mjVIS_MESHBVH = 29, + mjVIS_SDFITER = 30, + mjNVISFLAG = 31, } public enum mjtRndFlag : int{ mjRND_SHADOW = 0, @@ -6130,9 +6129,8 @@ public unsafe struct mjvOption_ { public fixed byte actuatorgroup[6]; public fixed byte flexgroup[6]; public fixed byte skingroup[6]; - public fixed byte flags[32]; + public fixed byte flags[31]; public int bvh_depth; - public int oct_depth; public int flex_layer; }