Move fullinertia from mjCAlternative to mjCBody.

PiperOrigin-RevId: 604607692
Change-Id: Ic2fcc08b9073d01ab190e7acacc3d827dbdfbca4
This commit is contained in:
Alessio Quaglino
2024-02-06 04:42:02 -08:00
committed by Copybara-Service
parent 01439f28b3
commit 737342bdfe
10 changed files with 82 additions and 72 deletions
+5 -1
View File
@@ -3021,7 +3021,11 @@ void mjXReader::Body(XMLElement* section, mjCBody* pbody, mjCFrame* frame) {
ReadQuat(elem, "quat", pbody->iquat, text);
ReadAttr(elem, "mass", 1, &pbody->mass, text, true);
ReadAttr(elem, "diaginertia", 3, pbody->inertia, text);
ReadAlternative(elem, pbody->ialt);
bool alt = ReadAlternative(elem, pbody->ialt);
bool full = ReadAttr(elem, "fullinertia", 6, pbody->fullinertia, text);
if (alt && full) {
throw mjXError(elem, "multiple orientation specifiers are not allowed");
}
}
// joint sub-element