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:
committed by
Copybara-Service
parent
396fdf00c3
commit
c8ff7b3d34
@@ -549,7 +549,6 @@ TEST_F(ValidateReferencesTest, EqualityConstraints) {
|
||||
<equality>
|
||||
<connect anchor="0 0 0" body1="body1" />
|
||||
<weld body1="body1" body2="body2" />
|
||||
<distance geom1="geom1" geom2="geom2" />
|
||||
<joint joint1="joint1"/>
|
||||
<joint joint1="joint1" joint2="joint2"/>
|
||||
<tendon tendon1="tendon1"/>
|
||||
@@ -590,18 +589,6 @@ TEST_F(ValidateReferencesTest, EqualityConstraints) {
|
||||
EXPECT_THAT(mj_validateReferences(model), HasSubstr("eq_obj2id"));
|
||||
model->eq_obj2id[1] = model->nbody - 1;
|
||||
|
||||
// distance constraint
|
||||
model->eq_obj1id[2] = -1;
|
||||
EXPECT_THAT(mj_validateReferences(model), HasSubstr("eq_obj1id"));
|
||||
model->eq_obj1id[2] = model->ngeom;
|
||||
EXPECT_THAT(mj_validateReferences(model), HasSubstr("eq_obj1id"));
|
||||
model->eq_obj1id[2] = 1;
|
||||
|
||||
model->eq_obj2id[2] = -1;
|
||||
EXPECT_THAT(mj_validateReferences(model), HasSubstr("eq_obj2id"));
|
||||
model->eq_obj2id[2] = model->ngeom;
|
||||
EXPECT_THAT(mj_validateReferences(model), HasSubstr("eq_obj2id"));
|
||||
model->eq_obj2id[2] = model->ngeom - 1;
|
||||
mj_deleteModel(model);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user