Omnivese extension not reloading some of my code

I’m writing an omniverse extension that calls code in CuRobo, which I have built and installed from source. When I modify the python code in curobo, isaac sim does not reload the extension. It works fine if I change code within the extension package itself. Can I control the code reloading to fix this?

Hi Peter. Unfortunately, I don’t think this is supported directly. Omniverse Kit uses an OS-dependent mechanism to monitor the contents of the extension directory only. It’s possible to restrict the monitored files further by using the fswatcher.paths parameter in the extension’s TOML file, but because paths are always relative to the extension root, I don’t think it’s possible to give an absolute or relative path to a separate directory.

For development purposes, one option would be to move the cuRobo installation directory into the directory of your extension. (I doubt a symbolic link would work, although a hard link might.) Just be aware that watching large numbers of files might come with some performance overhead, and there’s an upper limit to the number of files that can be watched (controlled by the fs.inotify.max_user_watches kernel parameter in the case of linux).

Another option might be to script your editor to append to (or just touch?) a file in the extension directory whenever you save a cuRobo file.

Finally, there’s always the manual approach of disabling and reenabling the extension in the extension manager to force it to be reloaded.

1 Like

[edited] hardlinks do work, but reloading the extension does not seem to work.

That’s surprising. We’ll see if we can repro internally.

Just to confirm: You’re testing by modifying a python file in cuRobo (e.g., adding a print()), then finding your extension in the Extension manager, toggling it off and back on, and then running your extension but not seeing the effect of your change?

Yes, precisely. And I’ve installed curobo using their isaac sim install instructions. Restarting isaac sim causes the changes to take effect, but that’s horribly slow. Even with a 4090 it takes ~10 seconds for isaac sim to launch.

Hi Team any updates on this thread?
I am facing a similar issue
Setup.
Extension are present at C:/Extensions/
This path is added in extension manager settings.
I try to add print() in windows.py file of my extension.
Trying to reload extension with toggle button. Changes are not reflected.
Onyl after closing and relaunching, changes are reflected.
This is major issue as it blocks from working.
Kit version -107

The extension is loaded fully into memory. Sometimes deactivating it and reactivating it, in realtime, either with code or the Extension Manager, may fail to update correctly. That is fairly normal. My suggestion for developing a custom extension (assuming that is what you are trying to do) is to author through VS Code in realtime, and for actual testing in kit, just use the instant kill of the kit file, by closing the CMD panel in the background, and then quickly reloading. It should only take a matter of seconds.

I am having the same issue and I would not say this “solution” takes only a matter of seconds. Kit takes longer than that to load and then you still have to load the USD file, re set up the layout, etc. Is there a plan for an actual fix to this issue in the future? Working in Kit 108.

I would not say that this is a “bug” that needs fixing. It is just the way kit works. Some extensions can be hot loaded and unloaded. Some are too “core” to do that. So reloading kit is required. That is just the platform.

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