How kill subprocess.popen when the stop button is pushed


I have done a hybrid/co-simulation simulation. Motionsolve, Activate and Isaac sim are solving together. Motionsolve & Activate are started with this process = subprocess.Popen(command, shell=True), but I have no idea how kill the the subprocess when the stop button is pushed (omni.kit.commands.execute(‘ToolbarStopButtonClicked’)). I know how this done in Python code, but Omniverse is making this one more difficult. Any ideas ?

Hi @petri.seppanen - Someone from our team will review this question and provide you the answer.

Moving to Omniverse General discussion. Doesn’t seem like Isaac Sim specific issue.

Hello @petri.seppanen! We are looking into this. I’ll post back as soon as I have more information to share!

HI @petri.seppanen. You can register a callback to the TimelineEventType.STOP: omni.timeline — kit-sdk 105.0 documentation

Here’s how to get the timeline event stream: omni.timeline — kit-sdk 105.0 documentation
Registering a callback is similar to this: Events — Omniverse Kit documentation

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