Do not use inertia during mesh compilation.

Fixes #2479.

PiperOrigin-RevId: 735387473
Change-Id: Ib241f2a0efc100bbe2cec24e0399bfcc87268094
This commit is contained in:
Alessio Quaglino
2025-03-10 08:34:38 -07:00
committed by Copybara-Service
parent e7a715497e
commit 14dc6fd33b
4 changed files with 65 additions and 50 deletions
+1 -7
View File
@@ -3,19 +3,13 @@
<mesh name="incomplete_convex" inertia="convex"
vertex="0 0 0 1 0 0 0 1 0 0 0 1"
face="2 0 3 0 1 3 1 2 3" />
<mesh name="incomplete"
vertex="0 0 0 1 0 0 0 1 0 0 0 1"
face="2 0 3 0 1 3 1 2 3"/>
<mesh name="complete"
vertex="0 0 0 1 0 0 0 1 0 0 0 1"
face="2 0 3 0 1 3 1 2 3 1 0 2"/>
</asset>
<worldbody>
<body>
<geom type="mesh" mesh="incomplete_convex" contype="0" conaffinity="0"/>
</body>
<body>
<geom type="mesh" mesh="incomplete"/>
<geom type="mesh" mesh="incomplete_convex"/>
</body>
<body>
<geom type="mesh" mesh="complete"/>
+8 -8
View File
@@ -10,20 +10,20 @@
<worldbody>
<light directional="true" diffuse=".6 .6 .6" specular="0.2 0.2 0.2" pos="0 0 4" dir="0 0 -1"/>
<body pos="-1.5 0 1">
<geom type="mesh" mesh="cube_cup" density="1"/>
<geom type="mesh" mesh="cube_cup" density="2"/>
</body>
<body pos="0 0 1">
<geom type="mesh" mesh="cube_cup_quad" density="1"/>
<geom type="mesh" mesh="cube_cup_quad" density="2"/>
</body>
<body pos="1.5 0 1">
<geom type="mesh" mesh="cube_cup_hi" density="1"/>
<geom type="mesh" mesh="cube_cup_hi" density="2"/>
</body>
<body pos="3 0 1">
<geom type="box" pos="0 0 0.05" size=".5 .5 .05" density="1"/>
<geom type="box" pos="-.45 0 .55" size=".05 .5 .45" density="1"/>
<geom type="box" pos=" .45 0 .55" size=".05 .5 .45" density="1"/>
<geom type="box" pos="0 -.45 .55" size=".4 .05 .45" density="1"/>
<geom type="box" pos="0 .45 .55" size=".4 .05 .45" density="1"/>
<geom type="box" pos="0 0 0.05" size=".5 .5 .05" density="2"/>
<geom type="box" pos="-.45 0 .55" size=".05 .5 .45" density="2"/>
<geom type="box" pos=" .45 0 .55" size=".05 .5 .45" density="2"/>
<geom type="box" pos="0 -.45 .55" size=".4 .05 .45" density="2"/>
<geom type="box" pos="0 .45 .55" size=".4 .05 .45" density="2"/>
</body>
</worldbody>
</mujoco>