Linux load plugin

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Andrew Stolin
Posts: 12
Joined: Thu Mar 05, 2015 9:41 am

Linux load plugin

Post by Andrew Stolin » Fri Oct 09, 2020 9:44 am

Hi,
There's a Windows and a Mac build of the following plugin, but no Linux version ( https://simtk.org/frs/?group_id=986 sources here: https://github.com/opensim-org/Scapulot ... ointPlugin)

Supposing the building it from source is straight forward (bonus point for anyone with a binary), where should we locate the plugin files in Linux (in Windows it's "[INSTALL_DIR] \ plugins") ?

Thanks!

Tags:

User avatar
Dimitar Stanev
Posts: 1096
Joined: Fri Jan 31, 2014 5:14 am

Re: Linux load plugin

Post by Dimitar Stanev » Sat Oct 10, 2020 2:07 am

Hi Andrew,

I have a tutorial example where I extend OpenSim by implementing a hypothetical force component (the same can be done with PrescribedForce):

https://github.com/mitkof6/OpenSim_API_ ... tion_force

After this is compiled and tested, one can load the dynamic library and use the component (e.g., Python, Matlab, command line tools). However, not through the API, but in the .osim file of the model. For this to be exposed to the API, a different approach must be followed.

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

Re: Linux load plugin

Post by Ayman Habib » Sat Oct 10, 2020 2:13 pm

Hi Andrew,

Do you plan to use the plugin in Matlab, python or in a local build of the opensim GUI on linux? The location for windows is only assumed for automatic loading in the GUI, otherwise you specify the location of the shared library on the command line (for command line operation using opensim-cmd) or you can use the instructions on the page below to load plugins in Matlab, python
https://simtk-confluence.stanford.edu/d ... ng+Plugins

Please let us know how it goes,
-Ayman

User avatar
Andrew Stolin
Posts: 12
Joined: Thu Mar 05, 2015 9:41 am

Re: Linux load plugin

Post by Andrew Stolin » Sun Oct 18, 2020 1:26 pm

Thank you both, it worked perfectly after following the instructions at https://github.com/mitkof6/OpenSim_API_ ... tion_force and loading within python with

Code: Select all

lib = opensim.LoadOpenSimLibraryExact('libScapulothoracicJointPlugin40.so')

POST REPLY