Code: Select all
import org.opensim.modeling.*
model = Model('C:\Users\Yong Cho\Documents\OpenSim 3.3\Models\Arm26\arm26.osim');
cSet = model.getCoordinateSet()
r_shoulder_elevation = cSet.get(0)
r_elbow_flex = cSet.get(1)
r_shoulder_elevation.setDefaultLocked(1)
r_elbow_flex.setDefaultLocked(1)
body = model.getBodySet().get('r_ulna_radius_hand');
force = PrescribedForce(body);
force.setForceFunctions(Constant(100), Constant(0), Constant(0));
force.setPointFunctions(Constant(0), Constant(-0.180496), Constant(0))
force.setPointIsInGlobalFrame(0);
force.setForceIsInGlobalFrame(0);
model.addForce(force)
initState = model.initSystem()
model.print('C:\Users\Yong Cho\Documents\OSFolder\arm26e2PrescribedForce1.osim');
SetUp File
1. Input
- Used model file created from the above code
- Motion loaded was created from the motion simulation
2. Static Optimization
- Sum of (muscle activation)^2 and use muscle force length velocity was checked
- Step Interval was 1 second
3. TIme
- Time range was from 0 to 3 seconds