Resizes keyframes before storing them during attach/detach.

Improve keyframe tests.

PiperOrigin-RevId: 685450257
Change-Id: I97aa129c4d7a66f613290605b85657e8081700b6
This commit is contained in:
Alessio Quaglino
2024-10-13 10:01:26 -07:00
committed by Copybara-Service
parent 534aedd47d
commit 52a0149cd1
6 changed files with 199 additions and 67 deletions
+6 -1
View File
@@ -198,7 +198,12 @@ const char* mjs_getError(mjSpec* s) {
int mjs_detachBody(mjSpec* s, mjsBody* b) {
mjCModel* model = static_cast<mjCModel*>(s->element);
mjCBody* body = static_cast<mjCBody*>(b->element);
*model -= *body;
try {
*model -= *body;
} catch (mjCError& e) {
model->SetError(e);
return -1;
}
delete body;
return 0;
}