Replicator render product splicing images in half

Hi all, I’m new to Isaac Sim and I am trying to use Replicator and cv2 to generate a video of a camera sweep around an object. However, seemingly at random the camera outputs what appears to be two renders spliced together. Here is the relevant snippet of my code.

    # -Create Camera-
    cam =  world.scene.add(
        Camera(
            prim_path="/World/camera",
            name="Camera",
            frequency=cameraSettings["frequency"],
            resolution=(cameraSettings["resolutionX"], cameraSettings["resolutionY"])
        ))

    cam.set_focus_distance(cameraSettings["focusDistance"])
    cam.set_focal_length(cameraSettings["focalLength"]) 
    cam.set_shutter_properties(cameraSettings["delayOpen"],cameraSettings["delayClose"])

    #--Finish Setup--
    rep.settings.set_render_pathtraced(samples_per_pixel=24)

    render_product  = rep.create.render_product('/World/camera', (cameraSettings["resolutionX"], cameraSettings["resolutionY"]))
    rgb = rep.AnnotatorRegistry.get_annotator("rgb")
    rgb.attach(render_product)

    world.reset()
    #--Simulation Loop--
    while(index < SimulationLength):

            # Camera and object movement code

             rep.orchestrator.step(rt_subframes=12)

            img = rgb.get_data()[:, :, :3] 
            image_rgb = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)

            if(videoName != None):
                # Write the images to a video file

               # Writing the images as stand alone files to ensure the issue isn't with converting to a video file
                cv2.imwrite("~/Test/" + str(index) + ".png", image_rgb) 

            # Rest of the loop
 

I know that Replicator has it’s own camera and Image Writer but I want to make changes to the images before they are written and it’s simple enough to where I don’t want to write my own Image Writer.

Here is what the “spliced” image looks like

Most images render fine like this one

Does the camera try to simulate rolling shutter? That is the only thing that would kind of make sense to me as for why this is occurring. I am using Isaac Sim 2023.1.1

Thank you in advance.

I switched to using Isaac-sim 4.1.0 as I thought the old version might cause issues and I am still encountering the same thing.

I managed to fix it! The issue seems to be a bug with Annotators. I created a custom writer based on This Tutorial and everything started working perfectly.

Hi Kevin, great to hear your writer implementation resolved the issue. Also is always best to work on the latest version of Isaac. From your original code, it seems the render product is not using the camera definitions you set in the previous lines. You may find useful examples on specifying cameras here if you still need them. However, the recommended way to do what you intend is to define that functionality in the writer as you have found in the tutorials. Thanks for posting this and trying the writer tutorial.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.