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])
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
The camera should not effect the performance, this happens when you create a render product from it. If you want to enable/disable the render product, you can use
set_updates_enabled on the hydra texture:
import omni.replicator.core as rep
rp = rep.create.render_product("/OmniverseKit_Persp", resolution=(1000, 1000))