Remove distance constraints.

- `distance` constraints were not very useful and increased the contact buffer within the constraint solver, violating a core design principle. Therefore they have been removed.
- The enum value `mjEQ_DISTANCE` is retained, but errors will be thrown in the parser and engine if these constraints are selected.

PiperOrigin-RevId: 467050101
Change-Id: Ie72a07e4fe338eea5107004a9fc0f5e47eb0c3b7
This commit is contained in:
Yuval Tassa
2022-08-11 14:30:33 -07:00
committed by Copybara-Service
parent 396fdf00c3
commit c8ff7b3d34
14 changed files with 18 additions and 263 deletions
+1 -7
View File
@@ -1370,13 +1370,7 @@ const char* mj_validateReferences(const mjModel* m) {
}
break;
case mjEQ_DISTANCE:
if (obj1id >= m->ngeom || obj1id < 0) {
return "Invalid model: eq_obj1id out of bounds.";
}
if (obj2id >= m->ngeom || obj2id < 0) {
return "Invalid model: eq_obj2id out of bounds.";
}
break;
return "distance equality constraints are no longer supported";
case mjEQ_WELD:
case mjEQ_CONNECT:
if (obj1id >= m->nbody || obj1id < 0) {