Hi there, here is similar example using multiple camera with writers and annotators.
In the current version one needs to create an annotator for each render product. In the example we have a note about this:
# Create render products
rp1 = rep.create.render_product(str(camera_prim1.GetPrimPath()), resolution=(320, 320))
rp2 = rep.create.render_product(str(camera_prim2.GetPrimPath()), resolution=(640, 640))
rp3 = rep.create.render_product("/OmniverseKit_Persp", (1024, 1024))
# Acess the data through annotators
rgb_annotators = 
for rp in [rp1, rp2, rp3]:
rgb = rep.AnnotatorRegistry.get_annotator("rgb")
# NOTE A list of render products will be supported in the near future, currently only the first render product in the list will be used
# rgb = rep.AnnotatorRegistry.get_annotator("rgb")
# rgb.attach([rp1, rp2, rp3])
@ahaidu Thank you for the reply, i was also wondering if there is the possibility to stop the annotator to get images and depth information. In the application I’m working on, I just need an image at a certain moment.
Should I create a render_product each time I need the observation of the scene? Is there the possibility to stop the annotator? I have’t found an answer in the documentation
you can use annotator.detach() once the annotator is no longer needed
if the camera and the resolution stays the same, you can (and should – since every new render product will use up the GPU load) re-use the existing render product
currently (in version 2022.2.1) any created render product cannot be destroyed on the fly and will add to the gpu load, this should be fixed in the new release. Creating a new stage will however destroy them and release the free the gpu load.