Remove mjtVisFlag.mjVIS_FLEXBVH and mjvOption.oct_depth

PiperOrigin-RevId: 783355711
Change-Id: I1e11999d5c533925f1d07266aeca95598a5691ba
This commit is contained in:
Yuval Tassa
2025-07-15 09:07:34 -07:00
committed by Copybara-Service
parent 14a8880d0d
commit 5e666635f6
11 changed files with 16 additions and 25 deletions
+5
View File
@@ -14,11 +14,16 @@ General
as input to learning-based agents and in environment logic.
- Removed the SdfLib plugin and the dependency on `SdfLib <https://github.com/UPC-ViRVIG/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<piStages>` function :ref:`mj_makeM`, which
combines the Composite Rigid Body algorithm in :ref:`mj_crb` and additional terms related to
:ref:`tendon armature<tendon-spatial-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<mjtVisFlag>`.
Bug fixes
^^^^^^^^^
-2
View File
@@ -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;
-2
View File
@@ -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;
+1 -1
View File
@@ -22,7 +22,7 @@
<visual>
<map stiffness="100"/>
<!-- The trilinear bounding box is visualized by turning on "Flex Tree" (mjVIS_FLEXBVH).
<!-- The trilinear bounding box is visualized by turning on "Flex Tree" (mjVIS_MESHBVH).
In order to make the visualization clearer,
we make the regular collision BVH visualization invisible: -->
<rgba bv="0 0 0 0" bvactive="0 0 0 0"/>
+3 -4
View File
@@ -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',
+1 -6
View File
@@ -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'),
-1
View File
@@ -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
+1 -1
View File
@@ -47,7 +47,7 @@ class Simulate {
using Clock = std::chrono::steady_clock;
static_assert(std::ratio_less_equal_v<Clock::period, std::milli>);
static constexpr int kMaxGeom = 20000;
static constexpr int kMaxGeom = 100000;
// create object and initialize the simulate ui
Simulate(
-1
View File
@@ -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", ""}
};
+1 -1
View File
@@ -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++) {
+4 -6
View File
@@ -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;
}