OpenSIM GUI command line parameters and/or IPC

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Marcos Alfredo Núñez
Posts: 22
Joined: Thu Sep 01, 2016 1:41 pm

OpenSIM GUI command line parameters and/or IPC

Post by Marcos Alfredo Núñez » Thu May 10, 2018 10:29 am

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.

User avatar
Ayman Habib
Posts: 2238
Joined: Fri Apr 01, 2005 12:24 pm

Re: OpenSIM GUI command line parameters and/or IPC

Post by Ayman Habib » Thu May 10, 2018 10:34 am

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

User avatar
Marcos Alfredo Núñez
Posts: 22
Joined: Thu Sep 01, 2016 1:41 pm

Re: OpenSIM GUI command line parameters and/or IPC

Post by Marcos Alfredo Núñez » Thu May 10, 2018 11:05 am

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.

POST REPLY