Add vertex-based flex constraints (dim=2).
PiperOrigin-RevId: 859552050 Change-Id: I61d4b9dc40f041c5b930e5f8810a803e8bccb87a
This commit is contained in:
committed by
Copybara-Service
parent
2cc2e579f1
commit
54dd623650
@@ -308,6 +308,8 @@ struct mjData_ {
|
||||
mjtNum* flexelem_aabb; // flex element bounding boxes (center, size) (nflexelem x 6)
|
||||
mjtNum* flexedge_J; // flex edge Jacobian (nJfe x 1)
|
||||
mjtNum* flexedge_length; // flex edge lengths (nflexedge x 1)
|
||||
mjtNum* flexvert_J; // flex vertex Jacobian (nJfv x 2)
|
||||
mjtNum* flexvert_length; // flex vertex lengths (nflexvert x 2)
|
||||
mjtNum* bvh_aabb_dyn; // global bounding box (center, size) (nbvhdynamic x 6)
|
||||
|
||||
// computed by mj_fwdPosition/mj_tendon
|
||||
|
||||
@@ -702,6 +702,7 @@ struct mjModel_ {
|
||||
int nflexevpair; // number of element-vertex pairs in all flexes
|
||||
int nflextexcoord; // number of vertices with texture coordinates
|
||||
int nJfe; // number of non-zeros in sparse flexedge Jacobian matrix
|
||||
int nJfv; // number of non-zeros in sparse flexvert Jacobian matrix
|
||||
int nmesh; // number of meshes
|
||||
int nmeshvert; // number of vertices in all meshes
|
||||
int nmeshnormal; // number of normals in all meshes
|
||||
@@ -996,12 +997,13 @@ struct mjModel_ {
|
||||
mjtNum* flexedge_length0; // edge lengths in qpos0 (nflexedge x 1)
|
||||
mjtNum* flexedge_invweight0; // edge inv. weight in qpos0 (nflexedge x 1)
|
||||
mjtNum* flex_radius; // radius around primitive element (nflex x 1)
|
||||
mjtNum* flex_size; // vertex bounding box half sizes in qpos0 (nflex x 3)
|
||||
mjtNum* flex_stiffness; // finite element stiffness matrix (nflexelem x 21)
|
||||
mjtNum* flex_bending; // bending stiffness (nflexedge x 17)
|
||||
mjtNum* flex_damping; // Rayleigh's damping coefficient (nflex x 1)
|
||||
mjtNum* flex_edgestiffness; // edge stiffness (nflex x 1)
|
||||
mjtNum* flex_edgedamping; // edge damping (nflex x 1)
|
||||
mjtByte* flex_edgeequality; // is edge equality constraint defined (nflex x 1)
|
||||
int* flex_edgeequality; // 0: none, 1: edges, 2: vertices (nflex x 1)
|
||||
mjtByte* flex_rigid; // are all vertices in the same body (nflex x 1)
|
||||
mjtByte* flexedge_rigid; // are both edge vertices in same body (nflexedge x 1)
|
||||
mjtByte* flex_centered; // are all vertex coordinates (0,0,0) (nflex x 1)
|
||||
@@ -1011,6 +1013,9 @@ struct mjModel_ {
|
||||
int* flexedge_J_rownnz; // number of non-zeros in Jacobian row (nflexedge x 1)
|
||||
int* flexedge_J_rowadr; // row start address in colind array (nflexedge x 1)
|
||||
int* flexedge_J_colind; // column indices in sparse Jacobian (nJfe x 1)
|
||||
int* flexvert_J_rownnz; // number of non-zeros in Jacobian row (nflexvert x 2)
|
||||
int* flexvert_J_rowadr; // row start address in colind array (nflexvert x 2)
|
||||
int* flexvert_J_colind; // column indices in sparse Jacobian (nJfv x 2)
|
||||
float* flex_rgba; // rgba when material is omitted (nflex x 4)
|
||||
float* flex_texcoord; // vertex texture coordinates (nflextexcoord x 2)
|
||||
|
||||
|
||||
@@ -438,6 +438,7 @@ typedef struct mjsFlex_ { // flex specification
|
||||
// other properties
|
||||
int dim; // element dimensionality
|
||||
double radius; // radius around primitive element
|
||||
double size[3]; // vertex bounding box half sizes in qpos0
|
||||
mjtByte internal; // enable internal collisions
|
||||
mjtByte flatskin; // render flex skin with flat shading
|
||||
int selfcollide; // mode for flex self collision
|
||||
|
||||
@@ -97,6 +97,7 @@
|
||||
X( nflexevpair ) \
|
||||
X( nflextexcoord ) \
|
||||
X( nJfe ) \
|
||||
X( nJfv ) \
|
||||
X( nmesh ) \
|
||||
X( nmeshvert ) \
|
||||
X( nmeshnormal ) \
|
||||
@@ -386,12 +387,13 @@
|
||||
X ( mjtNum, flexedge_length0, nflexedge, 1 ) \
|
||||
X ( mjtNum, flexedge_invweight0, nflexedge, 1 ) \
|
||||
X ( mjtNum, flex_radius, nflex, 1 ) \
|
||||
X ( mjtNum, flex_size, nflex, 3 ) \
|
||||
X ( mjtNum, flex_stiffness, nflexelem, 21 ) \
|
||||
X ( mjtNum, flex_bending, nflexedge, 17 ) \
|
||||
X ( mjtNum, flex_damping, nflex, 1 ) \
|
||||
X ( mjtNum, flex_edgestiffness, nflex, 1 ) \
|
||||
X ( mjtNum, flex_edgedamping, nflex, 1 ) \
|
||||
X ( mjtByte, flex_edgeequality, nflex, 1 ) \
|
||||
X ( int, flex_edgeequality, nflex, 1 ) \
|
||||
X ( mjtByte, flex_rigid, nflex, 1 ) \
|
||||
X ( mjtByte, flexedge_rigid, nflexedge, 1 ) \
|
||||
X ( mjtByte, flex_centered, nflex, 1 ) \
|
||||
@@ -401,6 +403,9 @@
|
||||
X ( int, flexedge_J_rownnz, nflexedge, 1 ) \
|
||||
X ( int, flexedge_J_rowadr, nflexedge, 1 ) \
|
||||
X ( int, flexedge_J_colind, nJfe, 1 ) \
|
||||
X ( int, flexvert_J_rownnz, nflexvert, 2 ) \
|
||||
X ( int, flexvert_J_rowadr, nflexvert, 2 ) \
|
||||
X ( int, flexvert_J_colind, nJfv, 2 ) \
|
||||
X ( float, flex_rgba, nflex, 4 ) \
|
||||
X ( float, flex_texcoord, nflextexcoord, 2 )
|
||||
|
||||
@@ -736,6 +741,8 @@
|
||||
X ( mjtNum, flexelem_aabb, nflexelem, 6 ) \
|
||||
X ( mjtNum, flexedge_J, nJfe, 1 ) \
|
||||
X ( mjtNum, flexedge_length, nflexedge, 1 ) \
|
||||
X ( mjtNum, flexvert_J, nJfv, 2 ) \
|
||||
X ( mjtNum, flexvert_length, nflexvert, 2 ) \
|
||||
X ( mjtNum, bvh_aabb_dyn, nbvhdynamic, 6 ) \
|
||||
X ( int, ten_wrapadr, ntendon, 1 ) \
|
||||
X ( int, ten_wrapnum, ntendon, 1 ) \
|
||||
|
||||
Reference in New Issue
Block a user