Adding New Class and Plugin to OpenSim 4.4

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Nima Heidari
Posts: 5
Joined: Tue Aug 09, 2022 7:18 am

Adding New Class and Plugin to OpenSim 4.4

Post by Nima Heidari » Mon Oct 31, 2022 6:07 am

Dear all,

I want to work on this model:
https://simtk.org/projects/kuo-head-neck

When I want to open the .osim file in OpenSim 4.4, I face the following error:
Object::newInstanceOfType(): object type '{DynamicLigamentForce}' is not a registered Object! It will be ignored.

In the model folder, there is a plugin (osimDynamicLigamentPlugin.dll).
I created a new folder where my OpenSim is installed (C:\OpenSim 4.4), and its name is plugins. I copied the .dll file into it.
When I open my OpenSim in Tools->User Plugins, I can see that my plugin exists. When I click on it, I face the following error:
Error trying to load library osimDynamicLigamentPlugin. Library not loaded.

Can someone help me with what I should do to register DynamicLigamentForce to my OpenSim?
(Just for your information, I am using Windows 10, 64 bit)

Bests,
Nima

Tags:

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

Re: Adding New Class and Plugin to OpenSim 4.4

Post by Ayman Habib » Mon Oct 31, 2022 9:46 am

Hello,

Creating a plugin that loads in the GUI requires that you build it against the same version of the opensim libraries that the GUI is built against, and also that you use the same compiler (in this case VS 2019) and the same settings (Release not Debug). Can you confirm that all these have been followed? There are other things that could be problematic but first let's confirm the above version/compiler questions.

Best regards,
-Ayman

User avatar
Nima Heidari
Posts: 5
Joined: Tue Aug 09, 2022 7:18 am

Re: Adding New Class and Plugin to OpenSim 4.4

Post by Nima Heidari » Wed Nov 02, 2022 12:45 am

Thank you so much,

I have talked with Prof. Musa Audu and Adam Kewley, and based on their suggestions, I opened the .osim file with OpenSim 3.3 with no problem, and it was straightforward.
As I am interested in opening this model in OpenSim 4.4, I will go through creating the plugin that is compatible with OpenSim 4.4

I will give updates here with possible errors.

Bests,
Nima

POST REPLY