How do I wait for frames to render within the Isaac Sim UI

SyntheticDataHelper requires access to the app.update() function. Within the Isaac UI, if this function is called, the whole application hangs. Presumably the ui logic is being processed within the app.update() function itself and I’m creating a deadlock by calling app.update() twice. I have 20 cameras in my scene and I’d like to save each view as a jpeg. So my question is, how do I wait for the render to finish from within the UI so I can do this? I have chosen to create an extension and I wrote all my code in that extension. There is another post somewhere that says to use SyntheticDataHelper, we should be using OmniKitHelper. Using OmniKitHelper makes development really slow. If I make a mistake in the python code, I have to restart and wait for the kit to start all over again. So Id rather find a way to solve this using the extension where hot reloads are possible.

If you are writing an extension you can use asyncio and wait or the next frame to be ready

import asyncio

async def my_task():
	print("my task begin")
	# Wait for next frame to be ready
	print("next frame ready")
        # Write to disk

# Start task

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