Commit 8536091
Keep search-path asset identifiers intact when resolving layer paths (#7484)
# Description
`resolve_paths` passed the result of `Sdf.Layer.ComputeAbsolutePath`
straight to `os.path.relpath`. USD returns *search-path* identifiers
unchanged, so a non-absolute string such as the MDL module `OmniPBR.mdl`
was anchored at the process working directory instead of the layer's
location. `MeshConverter` routes every `--make-instanceable` export
through this helper, so each MDL material in
`Props/instanceable_meshes.usd` pointed at a module that does not exist.
Fixes NVBug 6675386, NVBug 6703374
## 1. Before / after
Converting `cube_multicolor.obj` with `--make-instanceable`, output
under `source/isaaclab_assets/data/Props/CubeMultiColor/`:
| | `info:mdl:sourceAsset` in `Props/instanceable_meshes.usd` |
| --- | --- |
| Before | `@../../../../../../OmniPBR.mdl@` (six levels up = the
process CWD) |
| After | `@OmniPBR.mdl@` |
The renderer then logged `MDLC comp error: C120 could not find module
'::..::..::..::..::..::..::OmniPBR'` and `Unable to find SdrShaderNode`
once per material.
## 2. Verified
QA's exact command (`--make-instanceable --collision-approximation
convexDecomposition --mass 1.0 --visualizer kit,viser,rerun,newton_gl`),
before and after, on the build the reports were filed against:
| Isaac Sim | `MDLC comp error: C120` | `Unable to find SdrShaderNode` |
| --- | --- | --- |
| 6.1.0rc17 (Kit 110.3.0+feature.370106), before | 1 | 6 |
| 6.1.0rc17, after | 0 | 0 |
| 6.0.0-rc.59 (Kit 110.1.1), before | 1 | 6 |
| 6.0.0-rc.59, after | 0 | 0 |
The added unit test fails on `develop`
(`@../../../workspace/isaaclab/OmniPBR.mdl@`) and passes with the fix.
## 3. Design notes
Only paths that `ComputeAbsolutePath` actually resolved to an absolute
location are re-anchored; anything else is returned as authored, for the
renderer's module path to resolve. Genuine relative references still
move with the layer — the added test asserts `@../meshes/mesh.usda@`
alongside the untouched `@OmniPBR.mdl@`.
## Type of change
- Bug fix (non-breaking change which fixes an issue)
## Release backport
- [x] <!-- backport-active-release --> Backport this pull request to the
active release branch after it merges into `develop`
## Checklist
- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have added a changelog fragment under
`source/<pkg>/changelog.d/` for every touched package
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there
(cherry picked from commit d592423)1 parent 21a2e7c commit 8536091
3 files changed
Lines changed: 57 additions & 2 deletions
File tree
- source/isaaclab
- changelog.d
- isaaclab/sim/utils
- test/sim
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
125 | 130 | | |
126 | 131 | | |
127 | 132 | | |
128 | 133 | | |
129 | | - | |
| 134 | + | |
130 | 135 | | |
131 | 136 | | |
132 | 137 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
324 | 367 | | |
325 | 368 | | |
326 | 369 | | |
| |||
0 commit comments