Hey guys.
I want to delete some items in the scene without interrupting the step process(in Isaac Sim). I used this API omni.isaac.core.scene.Scene.remove_object()
to delete the items in the scene, but it reported an error and returned
Fatal Python error: Segmentation fault
Isaac Sim Version
4.2.0
4.1.0
4.0.0
2023.1.1
2023.1.0-hotfix.1
Other (please specify):
Isaac Lab Version (if applicable)
1.2
1.1
1.0
Other (please specify): no lab, just sim…
Operating System
Ubuntu 22.04
Ubuntu 20.04
Windows 11
Windows 10
Other (please specify):
GPU Information
- Model: gforce rtx 3060ti
- Driver Version: latest
Topic Description
Detailed Description
We created a robot and added a camera we wrote ourselves. In order to collect point cloud data (when the robot moves), we extended a class based on the isaac camera to get the point cloud data we need (refer to this link)
Before using this camera, we can delete the robot from the scene and select a new robot (different asset) to add to the scene without stopping the simulation context.
But after using this camera, the program will crash directly
Want to know the reason
The Camera we create was like this:
class FineCamera(Camera):
def get_render_product(self):
return self._render_product
def get_view_matrix_ros(self):
"""3D points in World Frame -> 3D points in Camera Ros Frame
Returns:
np.ndarray: the view matrix that transforms 3d points in the world frame to 3d points in the camera axes
with ros camera convention.
"""
R_U_TRANSFORM = np.array([[1, 0, 0, 0], [0, -1, 0, 0], [0, 0, -1, 0], [0, 0, 0, 1]])
width, height = self.get_resolution()
rp = rep.create.render_product(self.prim_path, resolution=(width, height))
_camera_params = rep.annotators.get('CameraParams')
_camera_params.attach(rp)
camera_params = _camera_params.get_data()
try:
world_w_cam_u_T = self._backend_utils.transpose_2d(
self._backend_utils.convert(
np.linalg.inv(camera_params['cameraViewTransform'].reshape(4, 4)),
dtype='float32',
device=self._device,
indexed=True,
))
except np.linalg.LinAlgError:
world_w_cam_u_T = self._backend_utils.transpose_2d(
self._backend_utils.convert(
UsdGeom.Imageable(self.prim).ComputeLocalToWorldTransform(Usd.TimeCode.Default()),
dtype='float32',
device=self._device,
indexed=True,
))
r_u_transform_converted = self._backend_utils.convert(R_U_TRANSFORM,
dtype='float32',
device=self._device,
indexed=True)
return self._backend_utils.matmul(r_u_transform_converted, self._backend_utils.inverse(world_w_cam_u_T))
Steps to Reproduce
- use
camera = FineCamera(prim_path=prim_path, resolution=size)
to bind a usd camera of the robot we loaded. camera.add_distance_to_image_plane_to_frame()
- call
camera.get_pointcloud()
in step(). - use
scene.remove_object()
to remove robot.
Error Messages
Fatal Python error: Segmentation fault
Nothing else…
Screenshots or Videos
Additional Information
What I’ve Tried
I didn’t install gdb in my container, so…
Related Issues
Point clouds generated by Camera.get_pointcloud() are not matched
Additional Context
Maybe these problems are caused by rep? I’m not sure.