...
Once again, make sure the subject01_metabolics.osim model that we were working with in Sections I, II, and III is loaded in the GUI and made current (walk_subject01 should appear in boldface in the Navigator panel). Find the ScriptingShell window and the command prompt >>>. Enter the commands below to create a new model and add a torsional path spring to that model. This time, we'll set all the path spring's properties before we add it to the model instead of using the GUI Property Editor to do so, demonstrating a second modeling workflow.
Code Block | ||
---|---|---|
| ||
# Get a handle to the current model and create a new copy baseModel = getCurrentModel() pathSpringModel = baseModel.clone() pathSpringModel.setName(baseModel.getName() + '_path_spring') # Create the spring we'll add to the model (a PathSpring in OpenSim) name = 'BiarticularSpringDamper' restLength = 0.4 stiffness = 10000.0 dissipation = 0.01 pathSpring = modeling.PathSpring(name,restLength,stiffness,dissipation) # Set geometry path for the path spring to match the gastrocnemius muscle gastroc = pathSpringModel.getMuscles().get('gastroc_r') pathSpring.set_GeometryPath(gastroc.getGeometryPath()) # Add the spring to the model pathSpringModel.addForce(pathSpring) # Load the model in the GUI loadModel(pathSpringModel) # Save the model to a file fullPathName = baseModel.getInputFileName() newName = fullPathName.replace('.osim', '_path_spring.osim') pathSpringModel.print(newName) |
...
V. Simulate Walking with Passive Devices
...
- Umberger, B.R., Gerritsen, K.G.M., Martin, P.E. (2003) A model of human muscle energy expenditure. Computer Methods in Biomechanics and Biomedical Engineering, 6(2):99–111.
- Umberger, B.R. (2010) Stance and swing phase costs in human walking. Journal of the Royal Society Interface, 7(50):1329–1340.
- Uchida, T.K., Hicks, J.L., Dembia, C.L., Delp, S.L. (2016) Stretching your energetic budget: how tendon compliance affects the metabolic cost of running. PLOS ONE, 11(3):e0150378.
...