Skip to content

Commit

Permalink
checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Mayankm96 committed Oct 9, 2024
1 parent 49353c3 commit fefda69
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,6 @@ def filter_collisions(self, global_prim_paths: list[str] | None = None):
global_prim_paths: A list of global prim paths to enable collisions with.
Defaults to None, in which case no global prim paths are considered.
"""
# obtain the current physics scene
physics_scene_prim_path = self.physics_scene_path

# validate paths in global prim paths
if global_prim_paths is None:
global_prim_paths = []
Expand All @@ -215,7 +212,7 @@ def filter_collisions(self, global_prim_paths: list[str] | None = None):

# filter collisions within each environment instance
self.cloner.filter_collisions(
physics_scene_prim_path,
self.physics_scene_path,
"/World/collisions",
self.env_prim_paths,
global_paths=self._global_prim_paths,
Expand All @@ -236,14 +233,16 @@ def __str__(self) -> str:
"""

@property
def physics_scene_path(self):
"""Search the stage for the physics scene"""
def physics_scene_path(self) -> str:
"""The path to the USD Physics Scene."""
if self._physics_scene_path is None:
for prim in self.stage.Traverse():
if prim.HasAPI(PhysxSchema.PhysxSceneAPI):
self._physics_scene_path = prim.GetPrimPath()
self._physics_scene_path = prim.GetPrimPath().pathString
carb.log_info(f"Physics scene prim path: {self._physics_scene_path}")
break
if self._physics_scene_path is None:
raise RuntimeError("No physics scene found! Please make sure one exists.")
return self._physics_scene_path

@property
Expand Down

0 comments on commit fefda69

Please sign in to comment.