Commit d9bdc7f
Refactors the doc on Schema for Lab 3.0, and adds MuJoCo gravcomp (#5276)
# Description
Adds Newton-native and MuJoCo-specific schema cfg classes to
`isaaclab_newton.sim.schemas`,
following the base/subclass framework from #5275. All new cfgs use the
per-declaring-class
MRO routing in `_apply_namespaced_schemas` — no backend-specific
branching in any writer.
Depends on #5275.
## New cfgs
### MuJoCo (Newton MuJoCo kernel, `mjc:*` namespace)
| Class | Field | USD attribute | Applied schema |
|---|---|---|---|
| `MujocoRigidBodyPropertiesCfg` | `gravcomp` | `mjc:gravcomp` | None
(raw attr) |
| `MujocoJointDrivePropertiesCfg` | `actuatorgravcomp` |
`mjc:actuatorgravcomp` | `MjcJointAPI` |
Body-level `gravcomp` must be set for joint-level `actuatorgravcomp` to
have any effect.
The spawner auto-enables `MujocoRigidBodyPropertiesCfg(gravcomp=1.0)`
when joint-level
actuator gravcomp is requested without body-level gravcomp.
### Newton-native (`newton:*` namespace)
| Class | Fields | USD attributes | Applied schema |
|---|---|---|---|
| `NewtonCollisionPropertiesCfg` | `contact_margin`, `contact_gap` |
`newton:contactMargin`, `newton:contactGap` | `NewtonCollisionAPI` |
| `NewtonMeshCollisionPropertiesCfg` | `max_hull_vertices` |
`newton:maxHullVertices` | `NewtonMeshCollisionAPI` |
| `NewtonMaterialPropertiesCfg` | `torsional_friction`,
`rolling_friction` | `newton:torsionalFriction`,
`newton:rollingFriction` | `NewtonMaterialAPI` |
| `NewtonArticulationRootPropertiesCfg` | `self_collision_enabled` |
`newton:selfCollisionEnabled` | `NewtonArticulationRootAPI` |
## Design constraints
Same single-cfg-per-spawner-slot rule as #5275. Newton cfgs subclass the
same base classes
as PhysX cfgs; each declares `_usd_namespace`/`_usd_applied_schema`
(ClassVar) and fields
that auto-camelCase to their USD attr names. Per-declaring-class MRO
routing handles mixed
PhysX+Newton cfg hierarchies correctly.
## Field renames (with deprecation aliases through 5.0)
| Old | New | Reason |
|---|---|---|
| `gravity_compensation_scale` | `gravcomp` | Single word identity:
`gravcomp` → `mjc:gravcomp` |
| `gravity_compensation` | `actuatorgravcomp` | Single word identity:
`actuatorgravcomp` → `mjc:actuatorgravcomp` |
## Type of change
- New feature (non-breaking)
Forwarding shims on `isaaclab.sim.schemas` keep existing imports
working.
Deprecation aliases keep old field names working through 5.0.
## Test plan
- [x] MuJoCo tests: `mjc:gravcomp` / `mjc:actuatorgravcomp` written when
set, not written when None
- [x] Newton collision, material, articulation-root: attrs written,
schemas applied only when non-None
- [x] Deprecation alias tests for renamed fields
- [x] `test_schemas.py` 46/46 pass — no regressions
- [x] Pre-commit clean
## Supersedes
Together with #5275, supersedes #4847 and #5203.
---------
Co-authored-by: Kelly Guo <kellyg@nvidia.com>
Co-authored-by: Antoine RICHARD <antoiner@nvidia.com>1 parent dd5a21a commit d9bdc7f
22 files changed
Lines changed: 1565 additions & 41 deletions
File tree
- docs/source
- api
- lab_newton
- lab_physx
- lab
- migration
- overview/core-concepts
- source
- isaaclab_newton
- changelog.d
- isaaclab_newton/sim/schemas
- test/sim
- isaaclab
- changelog.d
- isaaclab/sim
- schemas
- spawners
- from_files
- materials
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| 164 | + | |
164 | 165 | | |
165 | 166 | | |
166 | 167 | | |
| |||
171 | 172 | | |
172 | 173 | | |
173 | 174 | | |
| 175 | + | |
174 | 176 | | |
175 | 177 | | |
176 | 178 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
7 | 13 | | |
8 | 14 | | |
9 | 15 | | |
10 | | - | |
11 | | - | |
12 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
13 | 21 | | |
14 | | - | |
15 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
16 | 29 | | |
17 | 30 | | |
18 | 31 | | |
| |||
28 | 41 | | |
29 | 42 | | |
30 | 43 | | |
| 44 | + | |
| 45 | + | |
31 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
32 | 50 | | |
33 | 51 | | |
34 | 52 | | |
35 | 53 | | |
36 | | - | |
| 54 | + | |
37 | 55 | | |
38 | 56 | | |
39 | 57 | | |
40 | 58 | | |
41 | 59 | | |
42 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
43 | 67 | | |
44 | 68 | | |
45 | 69 | | |
46 | | - | |
| 70 | + | |
47 | 71 | | |
48 | 72 | | |
49 | 73 | | |
50 | 74 | | |
51 | 75 | | |
52 | 76 | | |
53 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
54 | 83 | | |
55 | 84 | | |
56 | 85 | | |
57 | | - | |
| 86 | + | |
58 | 87 | | |
59 | 88 | | |
60 | 89 | | |
61 | 90 | | |
62 | 91 | | |
63 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
64 | 98 | | |
65 | 99 | | |
66 | 100 | | |
| |||
74 | 108 | | |
75 | 109 | | |
76 | 110 | | |
77 | | - | |
| 111 | + | |
78 | 112 | | |
79 | 113 | | |
80 | 114 | | |
81 | 115 | | |
82 | 116 | | |
83 | | - | |
84 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
85 | 124 | | |
86 | | - | |
| 125 | + | |
87 | 126 | | |
88 | 127 | | |
89 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
90 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
91 | 157 | | |
92 | 158 | | |
93 | 159 | | |
| |||
Lines changed: 88 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
7 | 49 | | |
8 | 50 | | |
9 | 51 | | |
| |||
18 | 60 | | |
19 | 61 | | |
20 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
21 | 136 | | |
22 | 137 | | |
23 | 138 | | |
| |||
0 commit comments