@@ -199,9 +199,6 @@ def filter_collisions(self, global_prim_paths: list[str] | None = None):
199
199
global_prim_paths: A list of global prim paths to enable collisions with.
200
200
Defaults to None, in which case no global prim paths are considered.
201
201
"""
202
- # obtain the current physics scene
203
- physics_scene_prim_path = self .physics_scene_path
204
-
205
202
# validate paths in global prim paths
206
203
if global_prim_paths is None :
207
204
global_prim_paths = []
@@ -215,7 +212,7 @@ def filter_collisions(self, global_prim_paths: list[str] | None = None):
215
212
216
213
# filter collisions within each environment instance
217
214
self .cloner .filter_collisions (
218
- physics_scene_prim_path ,
215
+ self . physics_scene_path ,
219
216
"/World/collisions" ,
220
217
self .env_prim_paths ,
221
218
global_paths = self ._global_prim_paths ,
@@ -236,14 +233,16 @@ def __str__(self) -> str:
236
233
"""
237
234
238
235
@property
239
- def physics_scene_path (self ):
240
- """Search the stage for the physics scene """
236
+ def physics_scene_path (self ) -> str :
237
+ """The path to the USD Physics Scene. """
241
238
if self ._physics_scene_path is None :
242
239
for prim in self .stage .Traverse ():
243
240
if prim .HasAPI (PhysxSchema .PhysxSceneAPI ):
244
- self ._physics_scene_path = prim .GetPrimPath ()
241
+ self ._physics_scene_path = prim .GetPrimPath (). pathString
245
242
carb .log_info (f"Physics scene prim path: { self ._physics_scene_path } " )
246
243
break
244
+ if self ._physics_scene_path is None :
245
+ raise RuntimeError ("No physics scene found! Please make sure one exists." )
247
246
return self ._physics_scene_path
248
247
249
248
@property
0 commit comments