Custom Muscle Plugin is displayed/considered as Actuator

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Soh Saif
Posts: 5
Joined: Sun Jul 04, 2021 2:49 pm

Custom Muscle Plugin is displayed/considered as Actuator

Post by Soh Saif » Sun May 22, 2022 7:29 am

Hi all,

I managed to create a custom muscle as a plugin, I called it BMillard2012EquilibriumMuscle (as it has most of the Millard2012EquilibriumMuscle behaviour). I successfully loaded it into OpenSim UI and created an .osim file which has a number of muscles of this type.
I noticed that in OpenSim UI the muscles of this type are categorised as Actuator not as Muscle but if I add a Millard2012EquilibriumMuscle muscle, it is categorised as a muscle. Please find the attached screenshot.

I also loaded the plugin into Matlab and started to interact with the model object, but when calling osimModel.getMuscles(), it does not return any muscle of the new type but if I call osimModel.getActuators(), the muscle of the new type are available as Actuator.

Is it the expected behaviour for custom muscle plugin? or have I configured the muscle plugin incorrectly?
I actually need to star the next phase of the project but not sure if the custom model is configured/implemented correctly.
How can validate if the new muscle is correctly implemented? I can access it in C++ and interact with it.

Thank you in advance.

regards,
Soh
Attachments
OpenSim3.PNG
OpenSim3.PNG (18.88 KiB) Viewed 223 times
OpenSim2.PNG
OpenSim2.PNG (43 KiB) Viewed 223 times
OpenSim1.PNG
OpenSim1.PNG (44.6 KiB) Viewed 223 times

Tags:

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

Re: Custom Muscle Plugin is displayed/considered as Actuator

Post by Ayman Habib » Mon May 23, 2022 12:08 pm

Hello,

The model keeps a cache of Muscles (which is a subset of Actuators returned by get/updMuscles() call) for quick access and that's populated based on how you construct the model, but this has no downstream effect on simulations/functionality. I'd double check having the correct class hierarchy since the GUI tries to cast each Force to a Muscle to decide where to show it in the navigator, if that's correct (you subclass Muscle) then you should be good to go.

Hope this helps,
-Ayman

POST REPLY