Disable camera rendering

I used the following code to add a gripper camera on my isaac environment, however i would like to have to possibility to render the camera only when is required (take the image for reinforcement learning observation). Rendering all the camera will slow down the whole application

   stage = get_current_stage()
    camera_path = prim_path + '/panda_hand' + '/gripper_cam'
    camera_prim = UsdGeom.Camera(stage.DefinePrim(camera_path, "Camera"))
    xform_api = UsdGeom.XformCommonAPI(camera_prim)
    xform_api.SetRotate([ 0, 180, 90], UsdGeom.XformCommonAPI.RotationOrderXYZ)
    xform_api.SetTranslate([0.05, 0.0, 0.0])
    camera_prim.GetClippingRangeAttr().Set(Gf.Vec2f(0.001, 1.5+0.5))


1 Like

Hi @user126140 - Someone from our team will review and provide answer to your question.

I have the same issue. Adding cameras to the scene breaks the performance of the whole application. Just by adding one high resolution camera using the camera.py class destroy the performance.

As additional information, i get the image using the replicator and the Annotator, and that’s the slowest part. But i don’t know any alternative way tog et both rgb and depth from the scene