Repository navigation
Conversation
Greptile SummaryThis PR relaxes the prim-existence check in The logic change itself is straightforward and intentional. The new path (no check when spawn is None) is an explicit opt-out that matches the stated use-case. Issues identified:
Confidence Score: 4/5
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["AssetBase.__init__"] --> B{"cfg.spawn is not None?"}
B -- Yes --> C["Resolve check_path\n(spawn_path or prim_path)"]
C --> D["Call cfg.spawn.func(check_path, ...)"]
D --> E["find_matching_prims(check_path)"]
E --> F{"len == 0?"}
F -- Yes --> G["raise RuntimeError"]
F -- No --> H["_register_callbacks()"]
B -- No --> I["check_path = cfg.prim_path\n(unused / dead code)"]
I --> H
Last reviewed commit: baedf12 |
| else: | ||
| # asset should already exist at prim_path | ||
| # asset should exist at run time | ||
| check_path = self.cfg.prim_path |
There was a problem hiding this comment.
Dead code in else branch.
check_path is assigned at line 91 but is never read after this point — the prim-existence check has been moved inside the if block, so nothing downstream consumes check_path when spawn is None. This is dead code and should be removed to keep the intent clear.
| else: | |
| # asset should already exist at prim_path | |
| # asset should exist at run time | |
| check_path = self.cfg.prim_path | |
| else: | |
| # asset should exist at run time | |
| pass |
Additional Comments (1)
The |
Description
Allows looser check on asset spawning, if spawn path is None, we just assume user will handle the spawning them selfs.
Fixes # (issue)
Type of change
Screenshots
Please attach before and after screenshots of the change if applicable.
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there