Hello,
My camera suddenly stopped working. It was working all day but now at the end of the day it stopped working.
I already tested it with some older code and with old usd files but that still does not work.
One thing i notice is that first the camera model was visibile in isaac sim and now it is standard on invisible.
Can anybody help me? I updated cache can this be the consequences of that?
This is the same problem I think but there is no solution: Replicator sometimes seems to break the existing Camera
I get this error:
2023-06-16 13:59:03 [83,075ms] [Error] [omni.graph.core.plugin] Failed to get USD Attribute for /Render/PostProcess/SDGPipeline/RenderProduct_omni_kit_widget_viewport_ViewportTexture_0_LdrColorSDExportRawArray.inputs:cudaStream of type uint64
2023-06-16 13:59:03 [83,075ms] [Error] [omni.graph.core.plugin] Failed to get USD Attribute for /Render/PostProcess/SDGPipeline/RenderProduct_omni_kit_widget_viewport_ViewportTexture_0_LdrColorSDExportRawArray.inputs:exec of type uint (execution)
2023-06-16 13:59:03 [83,075ms] [Error] [omni.graph.core.plugin] Failed to get USD Attribute for /Render/PostProcess/SDGPipeline/RenderProduct_omni_kit_widget_viewport_ViewportTexture_0_LdrColorSDExportRawArray.inputs:renderResults of type uint64
2023-06-16 13:59:03 [83,075ms] [Error] [omni.graph.core.plugin] Failed to get USD Attribute for /Render/PostProcess/SDGPipeline/RenderProduct_omni_kit_widget_viewport_ViewportTexture_0_LdrColorSDExportRawArray.inputs:swhFrameNumber of type uint64
Pieces of my Code:
def _on_click_make_picture(self):
#rgb = self.camera.get_rgba()[:,:,3]
rgb = self.camera.get_current_frame()["rgba"]
depth = self.camera.get_current_frame()["distance_to_camera"]
max_depth = np.max(np.float32(depth))
# Depth works well if the background is not going to infinit make a wall around the robot and it works.
depth = np.nan_to_num(x=depth,nan=max_depth)
depth = (np.float32(depth)/np.max(np.float32(depth)))*255
rgb_image = Image.fromarray(np.uint8(rgb)).convert('RGB')
depth_image = Image.fromarray(np.uint8(depth)).convert('L')
rgb_image.save("/home/vbti/Projects/isaac_sim/part_inspection/extension_tm5_900/isaac_sim_rgb.png")
depth_image.save("/home/vbti/Projects/isaac_sim/part_inspection/extension_tm5_900/isaac_sim_depth.png")
self.camera = Camera(
prim_path=f"{robot_prim_path}/link_6/robot_camera",
frequency=30,
resolution=(1280, 720),
#position=np.array([0,0.072,0.53])
orientation=rot_utils.euler_angles_to_quats(np.array([-90, -90, 0]), degrees=True),
)
# Set camera position and parameters
position_camera = self.camera.get_world_pose()
print(position_camera)
self.camera.set_world_pose([position_camera[0][0],position_camera[0][1]-0.053,position_camera[0][2]+0.072])
self.camera.set_focal_length(0.193)
self.camera.set_horizontal_aperture(0.394)
self.camera.set_vertical_aperture(0.248)
self.camera.set_clipping_range(0.00001,500)
self.camera.set_focus_distance(20)
# Get the joints of the robot
self._articulation = Articulation(robot_prim_path)
# Add user-loaded objects to the World
world = World.instance()
world.scene.add(self._articulation)
self.camera.initialize()
self.camera.add_distance_to_camera_to_frame()
print(self.camera.get_current_frame())