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.