I have set up a simulation in Isaac Sim 2022.1.1 where I want to read out camera images. For this I have written a Python class, where first the default viewport window is read out and then the corresponding camera is activated.
#load default viewport:
self.vp_window = omni.kit.viewport_legacy.get_default_viewport_window()
#initialize the syntheticDataHelper:
#initialize the synthetic data helper class --> realsense back
self.vp_window.set_active_camera(self.cameraBackPrimPath)
self.sd_helper_Cam_Back.initialize_async(["rgb", "depth", "depthLinear"], self.vp_window)
#initialize the synthetic data helper class --> realsense front
self.vp_window.set_active_camera(self.cameraFrontPrimPath)
self.sd_helper_Cam_Front.initialize_async(["rgb", "depth", "depthLinear"], self.vp_window)
#initialize the synthetic data helper class --> realsense top
self.vp_window.set_active_camera(self.cameraTopPrimPath)
self.sd_helper_Cam_Top.initialize_async(["rgb", "depth", "depthLinear"], self.vp_window)
In Isaac Sim 2022.1.1 the code works without problems. Now I wanted to switch to the latest version (Isaac Sim 2022.2.0), but the function does not work anymore:
But the function “omni.kit.viewport_legacy.get_default_viewport_window()” returns NoneType and not an IViewportWindow object as in Isaac 2022.1.1.
<omni.kit.viewport_legacy._viewport_legacy.IViewportWindow object at 0x7f5a14c87c30>
Can anyone help me with this problem???