Disallow using elasticity and edge constraints at the same time.
Fixes #2084. PiperOrigin-RevId: 678614880 Change-Id: I44eead3dc4edf82d725a3063b927a421c660721a
This commit is contained in:
committed by
Copybara-Service
parent
2785dbc0da
commit
1eb6fc2285
@@ -2694,6 +2694,11 @@ void mjXReader::OneFlexcomp(XMLElement* elem, mjsBody* body, const mjVFS* vfs) {
|
||||
ReadAttr(elasticity, "thickness", 1, &dflex.thickness, text);
|
||||
}
|
||||
|
||||
// check errors
|
||||
if (elasticity && fcomp.equality) {
|
||||
throw mjXError(elem, "elasticity and edge constraints cannot both be present");
|
||||
}
|
||||
|
||||
// contact
|
||||
XMLElement* cont = FirstChildElement(elem, "contact");
|
||||
if (cont) {
|
||||
|
||||
Reference in New Issue
Block a user