Multiprocessing support in Isaac Sim

Hello, I’m trying to run multiprocessing in Isaac sim, but it doesn’t seem like it ever starts my process.

I don’t get any errors, it just doesn’t start.

Here is my basic example

import carb
from omni.kit.scripting import BehaviorScript
import multiprocessing


def my_process():
    carb.log_error("Starting my_process")


p = None


class NewScript(BehaviorScript):
    def on_init(self):
        carb.log_error("Starting new_script")
        multiprocessing.set_start_method("spawn")
        global p
        p = multiprocessing.Process(target=my_process)
        p.daemon = True
        p.start()

    def on_destroy(self):
        pass

    def on_play(self):
        if p.is_alive():
            carb.log_error("Process is alive")
        else:
            carb.log_error("Process is dead")

    def on_pause(self):
        pass

    def on_stop(self):
        pass

    def on_update(self, current_time: float, delta_time: float):
        pass

This is with Isaac Sim 4.2 on windows. Is multiprocessing supported?

Did you pip install multiprocessing? Tbh I’m not familiar with it I just used dask and it worked.

Not sure of your application I tried cupy but didn’t get very far. Not sure if your aware but you need to install modules in the Isaac folder if you check the docs.

Hope this helps it’s not my strong point but I did get dask running in an extension and it sped things up