Allow flex sleeping
PiperOrigin-RevId: 917817500 Change-Id: Ia3bd5e52e7c2eaa3f70c81352d82c130b1d357f6
This commit is contained in:
committed by
Copybara-Service
parent
ddc4c54d16
commit
f712eed4ce
@@ -1463,7 +1463,7 @@ int mj_contactJacobian(const mjModel* m, mjData* d, const mjContact* con, int di
|
||||
m->geom_bodyid[con->geom[side]] :
|
||||
m->flex_vertbodyid[m->flex_vertadr[con->flex[side]] + con->vert[side]];
|
||||
}
|
||||
// compute Jacobian differences, skipping common dofs
|
||||
// compute Jacobian differences, skipping common DOFs
|
||||
if (dim > 3) {
|
||||
return mj_jacDifPair(m, d, chain, bid[0], bid[1], con->pos, con->pos,
|
||||
jac1p, jac2p, jacdifp, jac1r, jac2r, jacdifr, mj_isSparse(m), 1);
|
||||
@@ -2492,6 +2492,15 @@ static int mj_nc(const mjModel* m, mjData* d, int* nnz) {
|
||||
mjERROR("contact %d involves sleeping geom %d", i, asleep1 ? g1 : g2);
|
||||
}
|
||||
}
|
||||
|
||||
// check flex contact sides
|
||||
for (int side = 0; side < 2; side++) {
|
||||
if (con->geom[side] >= 0) continue;
|
||||
int b = mj_flexBody(m, con, side);
|
||||
if (d->body_awake[m->body_weldid[b]] == mjS_ASLEEP) {
|
||||
mjERROR("contact %d involves sleeping flex %d", i, con->flex[side]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// compute NV only if nnz requested
|
||||
|
||||
Reference in New Issue
Block a user