Page 1 of 1

Application of external forces on the model

Posted: Tue Aug 20, 2019 3:11 am
by srihari18mcd
How do I apply external loads onto the model without having force plate data(GRF motion file)? I need to perform Static Optimization and look into the muscle activation. Right now I've performed Inverse Kinematics. Is it possible to apply the forces directly to the GUI or should I do it through MATLAB? Also I have a MATLAB code which I picked up from another source which is used to apply Prescribed Forces on specific muscles.

Here's my code :

import org.opensim.modeling.*
model = Model('E:\Study Materials\Master Thesis\Gopi\FBLS Model\FBLSmodel');
body = model.getBodySet().get('humerus_r');
force = PrescribedForce('myForce', body);
force.setForceFunctions(Constant(10), Constant(0), Constant(0));
model.addForce(force);
model.print('E:\Study Materials\Master Thesis\Gopi\FBLS Model\FBLSmodel_withPrescribedForce.osim');

In this code I am applying a force of 10 N on the Right Humerus muscle of the Raabe FBLS model in the global X direction (10,0,0).

Is this code correct? If it is , then how do I incorporate it into my OpenSim model? I am using the Raabe FBLS model for my study.

I have gone through your entire documentation and examples , but they have used the Ground Reaction Force (GRF) motion file everywhere to apply external loads which I don't have right now.

Thanks in advance.