Report which body has too-small mass/inertia in compilation error.
PiperOrigin-RevId: 776196017 Change-Id: Ib81efb170347a57cdc4b446c14cd7b8f5357958c
This commit is contained in:
committed by
Copybara-Service
parent
afc35451a0
commit
21bae3a388
@@ -529,7 +529,7 @@ TEST_F(MjCMeshTest, TinyInertiaFails) {
|
||||
<mesh name="tiny" vertex="0 0 0 1e-4 0 0 0 1e-4 0 0 0 1e-4"/>
|
||||
</asset>
|
||||
<worldbody>
|
||||
<body>
|
||||
<body name="tiny_body">
|
||||
<freejoint/>
|
||||
<geom type="mesh" mesh="tiny"/>
|
||||
</body>
|
||||
@@ -542,6 +542,7 @@ TEST_F(MjCMeshTest, TinyInertiaFails) {
|
||||
error.data(),
|
||||
HasSubstr(
|
||||
"mass and inertia of moving bodies must be larger than mjMINVAL"));
|
||||
EXPECT_THAT(error.data(), HasSubstr("Element name 'tiny_body'"));
|
||||
}
|
||||
|
||||
TEST_F(MjCMeshTest, FlippedFaceAllowedLegacyInertia) {
|
||||
|
||||
@@ -196,7 +196,7 @@ TEST_F(UserCModelTest, NestedZeroMassBodiesFail) {
|
||||
<worldbody>
|
||||
<body>
|
||||
<geom size="1"/>
|
||||
<body>
|
||||
<body name="bad">
|
||||
<freejoint/>
|
||||
<body>
|
||||
<body>
|
||||
@@ -214,6 +214,7 @@ TEST_F(UserCModelTest, NestedZeroMassBodiesFail) {
|
||||
error,
|
||||
HasSubstr(
|
||||
"mass and inertia of moving bodies must be larger than mjMINVAL"));
|
||||
EXPECT_THAT(error, HasSubstr("Element name 'bad'"));
|
||||
mj_deleteModel(model);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user