Skip to content

Commit

Permalink
Merge pull request #1046 from StanfordVL/fix/async-rendering
Browse files Browse the repository at this point in the history
toggle async rendering to avoid GUI freezing
  • Loading branch information
wensi-ai authored Dec 4, 2024
2 parents a02bb6e + bc67d79 commit 3b61cd2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions omnigibson/envs/data_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,13 @@ def _optimize_sim_for_data_collection(self, viewport_camera_path):
og.sim.viewer_camera.active_camera_path = viewport_camera_path

# Use asynchronous rendering for faster performance
# We have to do a super hacky workaround to avoid the GUI freezing, which is
# toggling these settings to be True -> False -> True
# Only setting it to True once will actually freeze the GUI for some reason!
lazy.carb.settings.get_settings().set_bool("/app/asyncRendering", True)
lazy.carb.settings.get_settings().set_bool("/app/asyncRenderingLowLatency", True)
lazy.carb.settings.get_settings().set_bool("/app/asyncRendering", False)
lazy.carb.settings.get_settings().set_bool("/app/asyncRenderingLowLatency", False)
lazy.carb.settings.get_settings().set_bool("/app/asyncRendering", True)
lazy.carb.settings.get_settings().set_bool("/app/asyncRenderingLowLatency", True)

Expand Down

0 comments on commit 3b61cd2

Please sign in to comment.