Page 1 of 1

OpenSIM GUI command line parameters and/or IPC

Posted: Thu May 10, 2018 10:29 am
by manunez
Hi! I was looking for a way to call OpenSIM's GUI from an external script. Something along the lines of:

Code: Select all

opensim64.exe --load-model MyModel.osim --load-motion walking.mot
Is something like this included in OpenSIM 3.3?

On a related question, is there any IPC method to do this with the application already running? Say writing a command to a named pipe, or a socket.

Re: OpenSIM GUI command line parameters and/or IPC

Posted: Thu May 10, 2018 10:34 am
by aymanh
Hi Marcos,

Since the application is designed as a Desktop application, it doesn't have this built in functionality. You can write a script, invoke it from the application to load whatever models and motions you want if that's helpful.

Some context may help us workout a reasonable workflow, so please let us know.

Best regards,
-Ayman

Re: OpenSIM GUI command line parameters and/or IPC

Posted: Thu May 10, 2018 11:05 am
by manunez
Hi again Ayman!

I'm doing a simple GUI in Python that plots some muscle lengths taken from a gait2392 model. Alongside this muscle lengths I plot some OpenSIM's joint angles against our gaitlab's joint angles. Usually, they match pretty good, which gives me confidence on said muscle lengths. However, there's no lack of "wait, what?" moments, often scaling related. I wanted to include an "Open in OpenSIM..." button in my GUI, which would open the desktop app with the scaled model and the motion file loaded, ready to investigate the problem.

Now that I think about it, this behaviour could be achieved by executing a jython script within OpenSIM as soon as it's opened. Is there a way to do this?

What's your take on this? I really appreciate your advice.

Best regards,

Marcos N.