FastAPI + Python Standalone?


I’m trying to make a simple FastAPI server so I can interact with the python standalone launched version of an Isaac Sim instance. My goal is to be able to send images and other commands to and from the simulation.

I’d like to use something lightweight like FastAPI but am not sure if it is possible.

I have followed the basic livestream standalone example:

This works as intended.

But have wrapped it in a class where effectively the entirety of that script runs when MySimClass.start() is called.

In FastAPI I have a simple route that does just that:"/test")
async def test():
    return True

When I launch the simulation via FastAPI I see the simulation initialize in the terminal as expected. However, when I go to the streaming client the entire window is grey and I do not know why this is.

Any thoughts? I understand that Omniverse/Isaac has some deep async complexity that the general advice is to not get into, so then my basic question is how can I simply achieve my original goal: to be able to send images and other commands to and from the simulation.


@Raffaello tagging you from the live stream :)

1 Like

Following up on this, it’s unclear to me how to send asynchronous commands when using the standalone workflow.

A simple example is I have 4 objects on a table and I would like to via command randomize the position of the objects (without killing and relaunching the sim).

I would prefer to expose a randomize function via FastAPI but am open to other methods.

inception tagging the program for help getting support