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
Custom Muscle Plugin is displayed/considered as Actuator
Custom Muscle Plugin is displayed/considered as Actuator
- Attachments
-
- OpenSim3.PNG (18.88 KiB) Viewed 283 times
-
- OpenSim2.PNG (43 KiB) Viewed 283 times
-
- OpenSim1.PNG (44.6 KiB) Viewed 283 times
Tags:
- Ayman Habib
- Posts: 2248
- Joined: Fri Apr 01, 2005 12:24 pm
Re: Custom Muscle Plugin is displayed/considered as Actuator
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
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