Disable island discovery for models with flexes.

PiperOrigin-RevId: 574244981
Change-Id: I7c08b23cf5f29338a04ec684ad7a0d4d8a0397df
This commit is contained in:
Yuval Tassa
2023-10-17 13:16:36 -07:00
committed by Copybara-Service
parent 18e4e10142
commit d0bdb78207
3 changed files with 3 additions and 2 deletions
+1
View File
@@ -619,6 +619,7 @@ void mj_fwdConstraint(const mjModel* m, mjData* d) {
// check if islands are supported
int islands_supported = mjENABLED(mjENBL_ISLAND) &&
d->nisland > 0 &&
m->opt.solver == mjSOL_CG &&
m->opt.noslip_iterations == 0;
+1 -1
View File
@@ -407,7 +407,7 @@ void mj_island(const mjModel* m, mjData* d) {
int nv = m->nv, nefc = d->nefc, ntree=m->ntree;
// no constraints: quick return
if (!nefc) {
if (!nefc || m->nflex) { // TODO: add flex support to island discovery
d->nisland = 0;
return;
}