How to get kit handler in extension?

I have my custom extension and it commands robot to move joint. However, when i want to wait until the robot reached target position, the ‘time.sleep’ command makes the simulator stuck. How can i get kit handler and update its frame when I wait for the move joint command to finish?

How to update frame in extension within a running isaac sim environment? Because i dont want to restart a simulator using

 kit = OmniKitHelper()

in python script everytime i test. @sdebnath @Sheikh_Dawood

The easiest way to do this is in an extension to use asyncio to await

import asyncio
import omni

async def next_frame():
    print("frame one")
    print("frame two")


There are also ways to assign callbacks that get called every frame

self._callback_handle =

@Hammad_M I’ve tried the first method and the simulator is still stuck. I hope i can wait until the joints reach target then start the next execution like taking picture,and the simulator is still running rather than stuck in the waiting process. The process is like sim.step() in mujoco-py.

@Hammad_M Could you give a sample for frame update in asyncio way?