Skip to content

Commit 49e1d65

Browse files
committed
Call create_sdf_shape_view from physx view directly
1 parent a93c29e commit 49e1d65

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

source/isaaclab/isaaclab/sensors/tacsl_sensor/visuotactile_sensor.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
import isaacsim.core.utils.torch as torch_utils
1616
import omni.log
17-
from isaacsim.core.prims import SdfShapePrim
1817
from isaacsim.core.simulation_manager import SimulationManager
1918
from pxr import Usd, UsdGeom, UsdPhysics
2019

@@ -325,13 +324,9 @@ def _create_physx_views(self) -> None:
325324
# Create SDF view for collision detection
326325
num_query_points = self.cfg.tactile_array_size[0] * self.cfg.tactile_array_size[1]
327326
mesh_path_pattern = contact_object_mesh.GetPath().pathString.replace("env_0", "env_*")
328-
self._contact_object_sdf_view = SdfShapePrim(
329-
prim_paths_expr=mesh_path_pattern,
330-
name="contact_object_sdf_view",
331-
num_query_points=num_query_points,
332-
prepare_sdf_schemas=False,
327+
self._contact_object_sdf_view = self._physics_sim_view.create_sdf_shape_view(
328+
mesh_path_pattern, num_query_points
333329
)
334-
self._contact_object_sdf_view.initialize(physics_sim_view=self._physics_sim_view)
335330

336331
# Create rigid body views for contact object and elastomer
337332
body_path_pattern = contact_object_rigid_body.GetPath().pathString.replace("env_0", "env_*")

0 commit comments

Comments
 (0)