Add passive collision mode for flexes.

PiperOrigin-RevId: 801754907
Change-Id: I4147af2ee2596519d42cb9a03cf8d5488f0bc3e8
This commit is contained in:
Alessio Quaglino
2025-09-01 04:13:07 -07:00
committed by Copybara-Service
parent b9900db00e
commit 8acd83f317
17 changed files with 320 additions and 134 deletions
+3 -1
View File
@@ -123,7 +123,7 @@ struct mjContact_ { // result of collision detection functions
int vert[2]; // vertex ids; -1 for geom or flex element
// flag set by mj_setContact or mj_instantiateContact
int exclude; // 0: include, 1: in gap, 2: fused, 3: no dofs
int exclude; // 0: include, 1: in gap, 2: fused, 3: no dofs, 4: passive
// address computed by mj_instantiateContact
int efc_address; // address in efc; -1: not included
@@ -1220,6 +1220,7 @@ struct mjModel_ {
mjtByte* flex_internal; // internal flex collision enabled (nflex x 1)
int* flex_selfcollide; // self collision mode (mjtFlexSelf) (nflex x 1)
int* flex_activelayers; // number of active element layers, 3D only (nflex x 1)
int* flex_passive; // passive collisions enabled (nflex x 1)
// flexes: other properties
int* flex_dim; // 1: lines, 2: triangles, 3: tetrahedra (nflex x 1)
@@ -2104,6 +2105,7 @@ typedef struct mjsFlex_ { // flex specification
mjtByte flatskin; // render flex skin with flat shading
int selfcollide; // mode for flex self collision
int vertcollide; // mode for vertex collision
int passive; // mode for passive collisions
int activelayers; // number of active element layers in 3D
int group; // group for visualizatioh
double edgestiffness; // edge stiffness