Resize keyframes also at the start of compilation.
Previously, it was assumed that attaching was the last operation performed on the mjSpec, so keyframes resulted in the incorrect size. In order to prevent information loss, we now only allow the resize function to expand the keyframe array, since attach should never remove a degree of freedom. PiperOrigin-RevId: 804917828 Change-Id: Icfacd207ced1c6aac600d514f8d9065ceff2d347
This commit is contained in:
committed by
Copybara-Service
parent
3b738ebb67
commit
9d5063799f
@@ -464,7 +464,7 @@ TEST_F(KeyframeTest, BadSize) {
|
||||
size_t error_sz = 1024;
|
||||
mjModel* model = LoadModelFromString(xml, error, error_sz);
|
||||
EXPECT_THAT(model, IsNull());
|
||||
EXPECT_THAT(error, HasSubstr("invalid qpos size, expected length 0"));
|
||||
EXPECT_THAT(error, HasSubstr("invalid qpos size, expected 0, got 1"));
|
||||
}
|
||||
|
||||
// ------------- test relative frame sensor compilation-------------------------
|
||||
|
||||
Reference in New Issue
Block a user