Throw an error if multiple orientation specifiers are used in the same element.
- Applies to [orientation specifiers](https://mujoco.readthedocs.io/en/latest/modeling.html#frame-orientations) in `body`, `inertial`, `geom`, `site`, `camera`. - Before this change the check was done only for multiple *alternative* specifiers, but not for `quat` and an alternative specifier. - Moved the check from the compiler to the parser. - Added tests. PiperOrigin-RevId: 453201981 Change-Id: I20907361f211dae904e734cd083e9df0efe4f654
This commit is contained in:
committed by
Copybara-Service
parent
652bab3eec
commit
16baac9353
@@ -1120,9 +1120,9 @@ void mjXReader::OneGeom(XMLElement* elem, mjCGeom* pgeom) {
|
||||
ReadAttr(elem, "mass", 1, &pgeom->_mass, text);
|
||||
ReadAttr(elem, "density", 1, &pgeom->density, text);
|
||||
ReadAttr(elem, "fromto", 6, pgeom->fromto, text);
|
||||
ReadAlternative(elem, pgeom->alt);
|
||||
ReadAttr(elem, "pos", 3, pgeom->pos, text);
|
||||
ReadAttr(elem, "quat", 4, pgeom->quat, text);
|
||||
ReadAlternative(elem, pgeom->alt);
|
||||
|
||||
GetXMLPos(elem, pgeom);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user