Page 1 of 1

Linux load plugin

Posted: Fri Oct 09, 2020 9:44 am
by fransim
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!

Re: Linux load plugin

Posted: Sat Oct 10, 2020 2:07 am
by mitkof6
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.

Re: Linux load plugin

Posted: Sat Oct 10, 2020 2:13 pm
by aymanh
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

Re: Linux load plugin

Posted: Sun Oct 18, 2020 1:26 pm
by fransim
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')