@@ -199,9 +199,6 @@ def filter_collisions(self, global_prim_paths: list[str] | None = None):
199199 global_prim_paths: A list of global prim paths to enable collisions with.
200200 Defaults to None, in which case no global prim paths are considered.
201201 """
202- # obtain the current physics scene
203- physics_scene_prim_path = self .physics_scene_path
204-
205202 # validate paths in global prim paths
206203 if global_prim_paths is None :
207204 global_prim_paths = []
@@ -215,7 +212,7 @@ def filter_collisions(self, global_prim_paths: list[str] | None = None):
215212
216213 # filter collisions within each environment instance
217214 self .cloner .filter_collisions (
218- physics_scene_prim_path ,
215+ self . physics_scene_path ,
219216 "/World/collisions" ,
220217 self .env_prim_paths ,
221218 global_paths = self ._global_prim_paths ,
@@ -236,14 +233,16 @@ def __str__(self) -> str:
236233 """
237234
238235 @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. """
241238 if self ._physics_scene_path is None :
242239 for prim in self .stage .Traverse ():
243240 if prim .HasAPI (PhysxSchema .PhysxSceneAPI ):
244- self ._physics_scene_path = prim .GetPrimPath ()
241+ self ._physics_scene_path = prim .GetPrimPath (). pathString
245242 carb .log_info (f"Physics scene prim path: { self ._physics_scene_path } " )
246243 break
244+ if self ._physics_scene_path is None :
245+ raise RuntimeError ("No physics scene found! Please make sure one exists." )
247246 return self ._physics_scene_path
248247
249248 @property
0 commit comments