Skip to content

Commit 2e2cf9d

Browse files
DeepMindcopybara-github
authored andcommitted
Compute moment of inertia for concave and boundary meshes. Resolve #338.
- Mesh inertias can now be computed exactly for well-formed (no holes) non-convex meshes. - To activate this feature, set `<compiler exactmeshinertia="true">` (defaults to `false`). This default may change in the future. - Added `<geom shellinertia="true/false">` (defaults to `false`). When true, geom inertia is computed assuming all the mass is concentrated on the surface, and `density` is interpreted as surface density (mass/area). Currently only mesh geoms are supported. PiperOrigin-RevId: 464368395 Change-Id: I02fd611f8bb3fedd2aee08673a47955bf7d27068
1 parent 10991d9 commit 2e2cf9d

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

dm_control/mjcf/schema.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<attribute name="fusestatic" type="keyword" valid_values="false true"/>
2323
<attribute name="inertiafromgeom" type="keyword" valid_values="false true auto"/>
2424
<attribute name="inertiagrouprange" type="array" array_type="int" array_size="2"/>
25+
<attribute name="exactmeshinertia" type="keyword" valid_values="false true"/>
2526
</attributes>
2627
<children>
2728
<element name="lengthrange">
@@ -268,6 +269,7 @@
268269
<attribute name="friction" type="array" array_type="float" array_size="3"/>
269270
<attribute name="mass" type="float"/>
270271
<attribute name="density" type="float"/>
272+
<attribute name="shellinertia" type="keyword" valid_values="false true"/>
271273
<attribute name="solmix" type="float"/>
272274
<attribute name="solref" type="array" array_type="float" array_size="2"/>
273275
<attribute name="solimp" type="array" array_type="float" array_size="5"/>
@@ -555,6 +557,7 @@
555557
<attribute name="friction" type="array" array_type="float" array_size="3"/>
556558
<attribute name="mass" type="float"/>
557559
<attribute name="density" type="float"/>
560+
<attribute name="shellinertia" type="keyword" valid_values="false true"/>
558561
<attribute name="solmix" type="float"/>
559562
<attribute name="solref" type="array" array_type="float" array_size="2"/>
560563
<attribute name="solimp" type="array" array_type="float" array_size="5"/>
@@ -895,6 +898,7 @@
895898
<attribute name="friction" type="array" array_type="float" array_size="3"/>
896899
<attribute name="mass" type="float"/>
897900
<attribute name="density" type="float"/>
901+
<attribute name="shellinertia" type="keyword" valid_values="false true"/>
898902
<attribute name="solmix" type="float"/>
899903
<attribute name="solref" type="array" array_type="float" array_size="2"/>
900904
<attribute name="solimp" type="array" array_type="float" array_size="5"/>
@@ -1036,6 +1040,7 @@
10361040
<attribute name="friction" type="array" array_type="float" array_size="3"/>
10371041
<attribute name="mass" type="float"/>
10381042
<attribute name="density" type="float"/>
1043+
<attribute name="shellinertia" type="keyword" valid_values="false true"/>
10391044
<attribute name="solmix" type="float"/>
10401045
<attribute name="solref" type="array" array_type="float" array_size="2"/>
10411046
<attribute name="solimp" type="array" array_type="float" array_size="5"/>
@@ -1142,6 +1147,7 @@
11421147
<attribute name="friction" type="array" array_type="float" array_size="3"/>
11431148
<attribute name="mass" type="float"/>
11441149
<attribute name="density" type="float"/>
1150+
<attribute name="shellinertia" type="keyword" valid_values="false true"/>
11451151
<attribute name="solmix" type="float"/>
11461152
<attribute name="solref" type="array" array_type="float" array_size="2"/>
11471153
<attribute name="solimp" type="array" array_type="float" array_size="5"/>
@@ -1283,6 +1289,7 @@
12831289
<attribute name="friction" type="array" array_type="float" array_size="3"/>
12841290
<attribute name="mass" type="float"/>
12851291
<attribute name="density" type="float"/>
1292+
<attribute name="shellinertia" type="keyword" valid_values="false true"/>
12861293
<attribute name="solmix" type="float"/>
12871294
<attribute name="solref" type="array" array_type="float" array_size="2"/>
12881295
<attribute name="solimp" type="array" array_type="float" array_size="5"/>

0 commit comments

Comments
 (0)