Question:
I’m experiencing a significant FPS drop in Isaac Sim depending on how I create the camera. My goal is to load a USD environment, run the simulation, and capture RGB images along with semantic segmentation.
I’m running a Python script in standalone mode with the following loop:
while simulation_app.is_running() and not self.stop_sim:
# Update the UI of the app and perform the physics step
self.camera.capture_image()
self.world.step(render=True)
When I create the camera using the Replicator API, my FPS drops to around 8 FPS:
# Create a camera using Replicator API
self.camera = rep.create.camera(name="camera")
# Create a render product for the camera
self.render_product = rep.create.render_product(self.camera, self._resolution)
basic_writer = rep.WriterRegistry.get("BasicWriter")
basic_writer.initialize(
output_dir="mypath_to_dir",
rgb=True,
semantic_segmentation=True,
)
# Attach render_product to the writer
basic_writer.attach([self.render_product])
If I switch to using my custom Camera class and manually attach the annotator, my FPS improves significantly to 60 FPS:
self.camera = Camera(
prim_path=self._stage_prim_path,
frequency=self._frequency,
resolution=self._resolution
)
self.render_product = rep.create.render_product(self.camera.prim_path, self._resolution)
self.semseg_anno = rep.AnnotatorRegistry.get_annotator("semantic_segmentation")
self.semseg_anno.attach(self.render_product)
f I only create the camera without using Replicator, I get 100 FPS:
self.camera = Camera(
prim_path=self._stage_prim_path,
frequency=self._frequency,
resolution=self._resolution
)
Question:
Why does using the Replicator API cause such a drastic FPS drop? Is there a way to optimize Replicator-based rendering while maintaining high performance? Any insights or suggestions would be greatly appreciated!
Are there any recommended solutions to obtain annotation data using Replicator without losing FPS?
Thanks!
Same results with Isaac Sim 4.1.0 and Isaac Sim 4.5.0
Ubuntu 22.04
GPUs: 2ADA6000 + 2A5000
CPU: AMD® Ryzen threadripper pro 3975wx 32-cores × 64
RAM: 256 Go