Move mesh inertia specification from global <compiler> to <asset/mesh>.

Three options:
- Convex: Use convex hull
- Exact: Use exact geometry (requires watertight mesh)
- Legacy: Legacy approximation (deprecated)

Fixes #2152

PiperOrigin-RevId: 688949900
Change-Id: I4537f343db917195c6fd58d517b189d5ee3be1cd
This commit is contained in:
Alessio Quaglino
2024-10-23 07:05:32 -07:00
committed by Copybara-Service
parent 0c97dcf1fd
commit b598d79b3f
19 changed files with 170 additions and 87 deletions
+5 -5
View File
@@ -8914,11 +8914,6 @@ STRUCTS: Mapping[str, StructDecl] = dict([
),
doc='range of geom groups used to compute inertia',
),
StructFieldDecl(
name='exactmeshinertia',
type=ValueType(name='mjtByte'),
doc='if false, use old formula',
),
StructFieldDecl(
name='alignfree',
type=ValueType(name='int'),
@@ -10291,6 +10286,11 @@ STRUCTS: Mapping[str, StructDecl] = dict([
),
doc='rescale mesh',
),
StructFieldDecl(
name='inertia',
type=ValueType(name='mjtMeshInertia'),
doc='inertia type (convex, legacy, exact)',
),
StructFieldDecl(
name='smoothnormal',
type=ValueType(name='mjtByte'),