From 5a31084ba1f44a9e66ae956f1bf89b4eef50e311 Mon Sep 17 00:00:00 2001 From: Ajay Seth Date: Sun, 8 Mar 2020 13:06:05 +0100 Subject: [PATCH 1/3] Commit of stripped down version of gait model by Lerner that exhibits equilibrium failure of tib_post_r muscle in a specific configuration. --- OpenSim/Actuators/Test/lerner_one_muscle.osim | 3950 +++++++++++++++++ 1 file changed, 3950 insertions(+) create mode 100644 OpenSim/Actuators/Test/lerner_one_muscle.osim diff --git a/OpenSim/Actuators/Test/lerner_one_muscle.osim b/OpenSim/Actuators/Test/lerner_one_muscle.osim new file mode 100644 index 0000000000..dfdd5e3b18 --- /dev/null +++ b/OpenSim/Actuators/Test/lerner_one_muscle.osim @@ -0,0 +1,3950 @@ + + + + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + + + + + + + + + 0 -9.8066499999999994 0 + + Lerner, Z.F., DeMers, M.S., Steele, K.M. Delp S.L., Loan J.P., Hoy M.G., Zajac F.E., Topp E.L., Rosen J.M., Thelen D.G., Anderson F.C., Seth A. + + Notes: Knee mechanism for resolving medial and lateral knee joint contact forces added by Zach Lerner, Matt DeMers, Scott Delp, and Ray Browning; "How Tibiofemoral Alignment Affect Predictions of Medial and Lateral Tibiofemoral Contact Forces" J Biomech 2015. 3D, 23 DOF gait model created by D.G. Thelen, Univ. of Wisconsin-Madison, and Matt DeMers, Katherine Steele, Ajay Seth, Frank C. Anderson, and Scott L. Delp, Stanford University. Lower extremity joint defintions based on Delp et al. (1990). Low back joint and anthropometry based on Anderson and Pandy (1999, 2001). Planar knee model of Yamaguchi and Zajac (1989). DeMers and Steele redefined the planar patella kinematics as a planar joint between the patella and femur instead of constraints between the patella and tibia. Quadriceps wrap through the patell to the tibial tuberocity in place of a separate patellar ligament. Delp, S.L., Loan, J.P., Hoy, M.G., Zajac, F.E., Topp E.L., Rosen, J.M.: An interactive graphics-based model of the lower extremity to study orthopaedic surgical procedures, IEEE Transactions on Biomedical Engineering, vol. 37, pp. 757-767, 1990. Yamaguchi G.T., Zajac F.E.: A planar model of the knee joint to characterize the knee extensor mechanism." J . Biomecl7. vol. 21. pp. 1-10. 1989. Anderson F.C., Pandy M.G.: A dynamic optimization solution for vertical jumping in three dimensions. Computer Methods in Biomechanics and Biomedical Engineering 2:201-231, 1999. Anderson F.C., Pandy M.G.: Dynamic optimization of human walking. Journal of Biomechanical Engineering 123:381-390, 2001. + + meters + + N + + + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + + + + .. + + 1 1 1 + + + + 1 + + 1 1 1 + + + sacrum.vtp + + + + .. + + 1 1 1 + + + + 1 + + 1 1 1 + + + pelvis.vtp + + + + .. + + 1 1 1 + + + + 1 + + 1 1 1 + + + l_pelvis.vtp + + + + + + + + + 11.776999999999999 + + -0.070699999999999999 0 0 + + 0.1028 0.087099999999999997 0.0579 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + + + + .. + + 1 1 1 + + + + 1 + + 1 1 1 + + + femur_r.vtp + + + + + + + + + 9.3013999999999992 + + 0 -0.17000000000000001 0 + + 0.13389999999999999 0.035099999999999999 0.14119999999999999 0 0 0 + + + + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + + + + .. + + 1 1 1 + + + + 1 + + 0 0.59999999999999998 1 + + + fem_cond.vtp + + + + .. + + 0.01 0.01 0 + + -3.1415899999999999 0.0015926499999999999 3.1415899999999999 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + + + + + + + + 0 + + 0 0 0 + + 0 0 0 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + + + + + + + + 0 + + 0 0 0 + + 0 0 0 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + + + + .. + + 0.01 0.01 0.01 + + + + 1 + + 0 0.59999999999999998 1 + + + sphere.vtp + + + + + + + + + 9.9999999999999995e-08 + + 0 0 0 + + 9.9999999999999995e-08 9.9999999999999995e-08 9.9999999999999995e-08 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + + + + .. + + 0.01 0.01 0.01 + + + + 1 + + 0 0.59999999999999998 1 + + + sphere.vtp + + + + + + + + + 9.9999999999999995e-08 + + 0 0 0 + + 9.9999999999999995e-08 9.9999999999999995e-08 9.9999999999999995e-08 0 0 0 + + + + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + + + + .. + + 1 1 1 + + + + 1 + + 0 0.59999999999999998 1 + + + tib_plat.vtp + + + + .. + + 0 -0.044999999999999998 0 + + 3.1415899999999999 0.0015926499999999999 3.1415899999999999 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + + + + + + + + 0 + + 0 0 0 + + 0 0 0 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + + + + .. + + 1 1 1 + + + + 1 + + 1 1 1 + + + tibia_r.vtp + + + + .. + + 1 1 1 + + + + 1 + + 1 1 1 + + + fibula_r.vtp + + + + + + + + + 3.7075 + + 0 -0.1867 0 + + 0.0504 0.0051000000000000004 0.0511 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + + + + .. + + 1 1 1 + + + + 1 + + 1 1 1 + + + pat.vtp + + + + + + + + + 0.10000000000000001 + + 0 0 0 + + 0.001 0.001 0.001 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + + + + .. + + 1 1 1 + + + + 1 + + 1 1 1 + + + talus_rv.vtp + + + + + + + + + 0.10000000000000001 + + 0 0 0 + + 0.001 0.001 0.001 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + + + + .. + + 1 1 1 + + + + 1 + + 1 1 1 + + + foot.vtp + + + + + + + + + 1.25 + + 0.10000000000000001 0.029999999999999999 0 + + 0.0014 0.0038999999999999998 0.0041000000000000003 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + + + + .. + + 1 1 1 + + + + 1 + + 1 1 1 + + + bofoot.vtp + + + + + + + + + 0.21659999999999999 + + 0.034599999999999999 0.0060000000000000001 -0.017500000000000002 + + 0.0001 0.00020000000000000001 0.001 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + + + + .. + + 1 1 1 + + + + 1 + + 1 1 1 + + + l_femur.vtp + + + + + + + + + 9.3013999999999992 + + 0 -0.17000000000000001 0 + + 0.13389999999999999 0.035099999999999999 0.14119999999999999 0 0 0 + + + + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + + + + .. + + 1 1 1 + + + + 1 + + 0 0.59999999999999998 1 + + + fem_cond.vtp + + + + .. + + 0.01 0.01 0 + + -3.1415899999999999 0.0015926499999999999 3.1415899999999999 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + + + + + + + + 0 + + 0 0 0 + + 0 0 0 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + + + + + + + + 0 + + 0 0 0 + + 0 0 0 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + + + + .. + + 0.01 0.01 0.01 + + + + 1 + + 0 0.59999999999999998 1 + + + sphere.vtp + + + + + + + + + 0 + + 0 0 0 + + 0 0 0 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + + + + .. + + 0.01 0.01 0.01 + + + + 1 + + 0 0.59999999999999998 1 + + + sphere.vtp + + + + + + + + + 9.9999999999999995e-08 + + 0 0 0 + + 9.9999999999999995e-08 9.9999999999999995e-08 9.9999999999999995e-08 0 0 0 + + + + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + + + + .. + + 1 1 1 + + + + 1 + + 0 0.59999999999999998 1 + + + tib_plat.vtp + + + + .. + + 0 -0.044999999999999998 0 + + 3.1415899999999999 0.0015926499999999999 3.1415899999999999 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + + + + + + + + 0 + + 0 0 0 + + 0 0 0 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + + + + .. + + 1 1 1 + + + + 1 + + 1 1 1 + + + l_tibia.vtp + + + + .. + + 1 1 1 + + + + 1 + + 1 1 1 + + + l_fibula.vtp + + + + + + + + + 3.7075 + + 0 -0.1867 0 + + 0.0504 0.0051000000000000004 0.0511 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + + + + .. + + 1 1 1 + + + + 1 + + 1 1 1 + + + l_patella.vtp + + + + + + + + + 0.10000000000000001 + + 0 0 0 + + 0.001 0.001 0.001 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + + + + .. + + 1 1 1 + + + + 1 + + 1 1 1 + + + talus_lv.vtp + + + + + + + + + 0.10000000000000001 + + 0 0 0 + + 0.001 0.001 0.001 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + + + + .. + + 1 1 1 + + + + 1 + + 1 1 1 + + + l_foot.vtp + + + + + + + + + 1.25 + + 0.10000000000000001 0.029999999999999999 0 + + 0.0014 0.0038999999999999998 0.0041000000000000003 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + + + + .. + + 1 1 1 + + + + 1 + + 1 1 1 + + + l_bofoot.vtp + + + + + + + + + 0.21659999999999999 + + 0.034599999999999999 0.0060000000000000001 0.017500000000000002 + + 0.0001 0.00020000000000000001 0.001 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + + + + .. + + 1 1 1 + + + + 1 + + 1 1 1 + + + hat_spine.vtp + + + + .. + + 1 1 1 + + + + 1 + + 1 1 1 + + + hat_jaw.vtp + + + + .. + + 1 1 1 + + + + 1 + + 1 1 1 + + + hat_skull.vtp + + + + .. + + 1 1 1 + + + + 1 + + 1 1 1 + + + hat_ribs.vtp + + + + + + + + + 34.236600000000003 + + -0.029999999999999999 0.32000000000000001 0 + + 1.4744999999999999 0.75549999999999995 1.4314 0 0 0 + + + + + + + + + + ground_offset + + pelvis_offset + + + + + 0 + + 0 + + -1.5707963300000001 1.5707963300000001 + + true + + false + + + + false + + + + 0 + + 0 + + -1.5707963300000001 1.5707963300000001 + + true + + false + + + + false + + + + 0 + + 0 + + -1.5707963300000001 1.5707963300000001 + + true + + false + + + + false + + + + 0.12 + + 0 + + -5 5 + + true + + false + + + + false + + + + 0.93000000000000005 + + 0 + + -1 2 + + true + + false + + + + false + + + + 0 + + 0 + + -3 3 + + true + + false + + + + false + + + + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /ground + + 0 0 0 + + 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/pelvis + + 0 0 0 + + 0 0 0 + + + + + + + + pelvis_tilt + + 0 0 1 + + + 1 0 + + + + + pelvis_list + + 1 0 0 + + + 1 0 + + + + + pelvis_rotation + + 0 1 0 + + + 1 0 + + + + + + pelvis_tx + + 1 0 0 + + + 1 0 + + + + + pelvis_ty + + 0 1 0 + + + 1 0 + + + + + pelvis_tz + + 0 0 1 + + + 1 0 + + + + + + + pelvis_offset + + femur_r_offset + + + + + 0 + + 0 + + -2.0943950999999998 2.0943950999999998 + + true + + false + + + + false + + + + 0 + + 0 + + -2.0943950999999998 2.0943950999999998 + + true + + false + + + + false + + + + 0 + + 0 + + -2.0943950999999998 2.0943950999999998 + + true + + false + + + + false + + + + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/pelvis + + -0.070699999999999999 -0.066100000000000006 0.083500000000000005 + + 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/femur_r + + 0 0 0 + + 0 0 0 + + + + + + + + hip_flexion_r + + 0 0 1 + + + 1 0 + + + + + hip_adduction_r + + 1 0 0 + + + 1 0 + + + + + hip_rotation_r + + 0 1 0 + + + 1 0 + + + + + + + + 1 0 0 + + + 0 + + + + + + + 0 1 0 + + + 0 + + + + + + + 0 0 1 + + + 0 + + + + + + + femur_r_offset + + femoral_cond_r_offset + + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/femur_r + + 0 -0.40400000000000003 0 + + + 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/femoral_cond_r + + 0 0 0 + + 0 0 0 + + + + + + femoral_cond_r_offset + + sagittal_articulation_frame_r_offset + + + + + 0 + + 0 + + -2.0943950999999998 0.17453293 + + true + + false + + + + false + + + + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/femoral_cond_r + + 0 0 0 + + 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/sagittal_articulation_frame_r + + 0 0 0 + + 0 0 0 + + + + + + + + knee_angle_r + + 0 0 1 + + + 1 0 + + + + + + + 0 1 0 + + + 0 + + + + + + + 1 0 0 + + + 0 + + + + + + knee_angle_r + + 1 0 0 + + + -2.0944 -1.74533 -1.39626 -1.0472 -0.698132 -0.349066 -0.174533 0.197344 0.337395 0.490178 1.52146 2.0944 + -0.0032 0.00179 0.00411 0.0041 0.00212 -0.001 -0.0031 -0.005227 -0.005435 -0.005574 -0.005435 -0.00525 + + + + + knee_angle_r + + 0 1 0 + + + -2.0944 -1.22173 -0.523599 -0.349066 -0.174533 0.159149 2.0944 + -0.0186 -0.0042 0.005 0.0064 0.0074 0.0087 0.008 + + + + + + + 0 0 1 + + + 0 + + + + + + + sagittal_articulation_frame_r_offset + + med_cond_r_offset + + + + + 0 + + 0 + + -2.0943950999999998 2.0943950999999998 + + true + + false + + + + false + + true + + + + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/sagittal_articulation_frame_r + + + 0 -0.035000000000000003 -0.02 + + 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/med_cond_r + + 0 0 0 + + 0 0 0 + + + + + + + + med_cond_adduction_r + + 1 0 0 + + + 1 0 + + + + + + + 0 1 0 + + + 0 + + + + + + + 0 0 1 + + + 0 + + + + + + + + 1 0 0 + + + 0 + + + + + + + 0 1 0 + + + 0 + + + + + + + 0 0 1 + + + 0 + + + + + + + sagittal_articulation_frame_r_offset + + lat_cond_r_offset + + + + + 0 + + 0 + + -2.0943950999999998 2.0943950999999998 + + true + + false + + + + false + + true + + + + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/sagittal_articulation_frame_r + + + 0 -0.035000000000000003 0.02 + + 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/lat_cond_r + + 0 0 0 + + 0 0 0 + + + + + + + + lat_cond_adduction_r + + 1 0 0 + + + 1 0 + + + + + + + 0 1 0 + + + 0 + + + + + + + 0 0 1 + + + 0 + + + + + + + + 1 0 0 + + + 0 + + + + + + + 0 1 0 + + + 0 + + + + + + + 0 0 1 + + + 0 + + + + + + + med_cond_r_offset + + tibial_plat_r_offset + + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/med_cond_r + + + 0 0.035000000000000003 0.02 + + -0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/tibial_plat_r + + 0 0 0 + + 0 0 0 + + + + + + tibial_plat_r_offset + + tibia_r_offset + + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/tibial_plat_r + + 0 0 0 + + + 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/tibia_r + + 0 0 0 + + 0 0 0 + + + + + + femoral_cond_r_offset + + patella_r_offset + + + + + 0 + + 0 + + -999999.90000000002 999999.90000000002 + + true + + false + + + + false + + + + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/femoral_cond_r + + 0 0 0.0023999999999999998 + + 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/patella_r + + 0 0 0 + + 0 0 0 + + + + + + + + patella_r_constrained_knee_angle + + 0 0 1 + + + -2.0944 -1.45752 -0.526391 0 0.0523599 0.174533 + -1.68636 -1.09112 -0.256161 -0.0012 -0.0187016 -0.1054 + + + + + + + 0 1 0 + + + 0 + + + + + + + 1 0 0 + + + 0 + + + + + + patella_r_constrained_knee_angle + + 1 0 0 + + + -2.0944 -1.91986 -1.5708 -1.39626 -1.0472 -0.698132 -0.349066 -0.174533 0 0.0872665 0.174533 2.0944 + -0.03082 -0.02767 -0.01694 -0.00996 0.00548 0.0215 0.03599 0.04069 0.0451 0.04648 0.04761 0.04648 + + + + + patella_r_constrained_knee_angle + + 0 1 0 + + + -2.0944 -1.91986 -1.5708 -1.39626 -1.0472 -0.698132 -0.349066 -0.174533 0 0.0872665 0.174533 2.0944 + -0.02263 -0.02892 -0.0391 -0.0424 -0.0447 -0.0406 -0.0297 -0.023 -0.0145 -0.0098 -0.005 -0.0098 + + + + + + + 0 0 1 + + + 0 + + + + + + + tibia_r_offset + + talus_r_offset + + + + + 0 + + 0 + + -1.5707963300000001 1.5707963300000001 + + true + + false + + + + false + + + + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/tibia_r + + 0 -0.42999999999999999 0 + + 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/talus_r + + 0 0 0 + + 0 0 0 + + + + + + + + ankle_angle_r + + -0.10501355 -0.17402245 0.97912631999999999 + + + 1 0 + + + + + + + 0 1 0 + + + 0 + + + + + + + 0.97912631999999999 -0 0.10501355 + + + 0 + + + + + + + + 1 0 0 + + + 0 + + + + + + + 0 1 0 + + + 0 + + + + + + + 0 0 1 + + + 0 + + + + + + + talus_r_offset + + calcn_r_offset + + + + + 0 + + 0 + + -1.5707963300000001 1.5707963300000001 + + true + + false + + + + false + + + + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/talus_r + + -0.048770000000000001 -0.041950000000000001 0.00792 + + 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/calcn_r + + 0 0 0 + + 0 0 0 + + + + + + + + subtalar_angle_r + + 0.78717961000000003 0.60474746000000001 -0.12094949000000001 + + + 1 0 + + + + + + + 0 1 0 + + + 0 + + + + + + + -0.12094949000000001 0 -0.78717961000000003 + + + 0 + + + + + + + + 1 0 0 + + + 0 + + + + + + + 0 1 0 + + + 0 + + + + + + + 0 0 1 + + + 0 + + + + + + + calcn_r_offset + + toes_r_offset + + + + + 0 + + 0 + + -1.5707963300000001 1.5707963300000001 + + true + + false + + + + false + + + + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/calcn_r + + 0.17879999999999999 -0.002 0.00108 + + 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/toes_r + + 0 0 0 + + 0 0 0 + + + + + + + + mtp_angle_r + + -0.58095439999999998 0 0.81393610999999999 + + + 1 0 + + + + + + + 0 1 0 + + + 0 + + + + + + + 0.81393610999999999 -0 0.58095439999999998 + + + 0 + + + + + + + + 1 0 0 + + + 0 + + + + + + + 0 1 0 + + + 0 + + + + + + + 0 0 1 + + + 0 + + + + + + + pelvis_offset + + femur_l_offset + + + + + 0 + + 0 + + -2.0943950999999998 2.0943950999999998 + + true + + false + + + + false + + + + 0 + + 0 + + -2.0943950999999998 2.0943950999999998 + + true + + false + + + + false + + + + 0 + + 0 + + -2.0943950999999998 2.0943950999999998 + + true + + false + + + + false + + + + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/pelvis + + -0.070699999999999999 -0.066100000000000006 -0.083500000000000005 + + 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/femur_l + + 0 0 0 + + 0 0 0 + + + + + + + + hip_flexion_l + + 0 0 1 + + + 1 0 + + + + + hip_adduction_l + + -1 0 0 + + + 1 0 + + + + + hip_rotation_l + + 0 -1 0 + + + 1 0 + + + + + + + + 1 0 0 + + + 0 + + + + + + + 0 1 0 + + + 0 + + + + + + + 0 0 1 + + + 0 + + + + + + + femur_l_offset + + femoral_cond_l_offset + + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/femur_l + + 0 -0.40400000000000003 0 + + + -0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/femoral_cond_l + + 0 0 0 + + -0 0 0 + + + + + + femoral_cond_l_offset + + sagittal_articulation_frame_l_offset + + + + + 0 + + 0 + + -2.0943950999999998 0.17453293 + + true + + false + + + + false + + + + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/femoral_cond_l + + 0 0 0 + + 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/sagittal_articulation_frame_l + + 0 0 0 + + 0 0 0 + + + + + + + + knee_angle_l + + 0 0 1 + + + 1 0 + + + + + + + 0 1 0 + + + 0 + + + + + + + 1 0 0 + + + 0 + + + + + + knee_angle_l + + 1 0 0 + + + -2.0944 -1.74533 -1.39626 -1.0472 -0.698132 -0.349066 -0.174533 0.197344 0.337395 0.490178 1.52146 2.0944 + -0.0032 0.00179 0.00411 0.0041 0.00212 -0.001 -0.0031 -0.005227 -0.005435 -0.005574 -0.005435 -0.00525 + + + + + knee_angle_l + + 0 1 0 + + + -2.0944 -1.22173 -0.523599 -0.349066 -0.174533 0.159149 2.0944 + -0.0186 -0.0042 0.005 0.0064 0.0074 0.0087 0.008 + + + + + + + 0 0 1 + + + 0 + + + + + + + sagittal_articulation_frame_l_offset + + med_cond_l_offset + + + + + 0 + + 0 + + -2.0943950999999998 2.0943950999999998 + + true + + false + + + + false + + true + + + + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/sagittal_articulation_frame_l + + + 0 -0.035000000000000003 0.02 + + 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/med_cond_l + + 0 0 0 + + 0 0 0 + + + + + + + + med_cond_adduction_l + + 1 0 0 + + + 1 0 + + + + + + + 0 1 0 + + + 0 + + + + + + + 0 0 1 + + + 0 + + + + + + + + 1 0 0 + + + 0 + + + + + + + 0 1 0 + + + 0 + + + + + + + 0 0 1 + + + 0 + + + + + + + sagittal_articulation_frame_l_offset + + lat_cond_l_offset + + + + + 0 + + 0 + + -2.0943950999999998 2.0943950999999998 + + true + + false + + + + false + + true + + + + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/sagittal_articulation_frame_l + + + 0 -0.035000000000000003 -0.02 + + 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/lat_cond_l + + 0 0 0 + + 0 0 0 + + + + + + + + lat_cond_adduction_l + + 1 0 0 + + + 1 0 + + + + + + + 0 1 0 + + + 0 + + + + + + + 0 0 1 + + + 0 + + + + + + + + 1 0 0 + + + 0 + + + + + + + 0 1 0 + + + 0 + + + + + + + 0 0 1 + + + 0 + + + + + + + med_cond_l_offset + + tibial_plat_l_offset + + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/med_cond_l + + + 0 0.035000000000000003 -0.02 + + -0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/tibial_plat_l + + 0 0 0 + + -0 0 0 + + + + + + tibial_plat_l_offset + + tibia_l_offset + + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/tibial_plat_l + + 0 0 0 + + + -0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/tibia_l + + 0 0 0 + + -0 0 0 + + + + + + femoral_cond_l_offset + + patella_l_offset + + + + + 0 + + 0 + + -999999.90000000002 999999.90000000002 + + true + + false + + + + false + + + + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/femoral_cond_l + + 0 0 -0.0023999999999999998 + + 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/patella_l + + 0 0 0 + + 0 0 0 + + + + + + + + patella_l_constrained_knee_angle + + 0 0 1 + + + -2.0944 -1.45752 -0.526391 0 0.0523599 0.174533 + -1.68636 -1.09112 -0.256161 -0.0012 -0.0187016 -0.1054 + + + + + + + 0 1 0 + + + 0 + + + + + + + 1 0 0 + + + 0 + + + + + + patella_l_constrained_knee_angle + + 1 0 0 + + + -2.0944 -1.91986 -1.5708 -1.39626 -1.0472 -0.698132 -0.349066 -0.174533 0 0.0872665 0.174533 2.0944 + -0.03082 -0.02767 -0.01694 -0.00996 0.00548 0.0215 0.03599 0.04069 0.0451 0.04648 0.04761 0.04648 + + + + + patella_l_constrained_knee_angle + + 0 1 0 + + + -2.0944 -1.91986 -1.5708 -1.39626 -1.0472 -0.698132 -0.349066 -0.174533 0 0.0872665 0.174533 2.0944 + -0.02263 -0.02892 -0.0391 -0.0424 -0.0447 -0.0406 -0.0297 -0.023 -0.0145 -0.0098 -0.005 -0.0098 + + + + + + + 0 0 1 + + + 0 + + + + + + + tibia_l_offset + + talus_l_offset + + + + + 0 + + 0 + + -1.0471975499999999 1.0471975499999999 + + true + + false + + + + false + + + + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/tibia_l + + 0 -0.42999999999999999 0 + + 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/talus_l + + 0 0 0 + + 0 0 0 + + + + + + + + ankle_angle_l + + 0.10501355 -0.17402245 0.97912631999999999 + + + 1 0 + + + + + + + 0 1 0 + + + 0 + + + + + + + 0.97912631999999999 0 -0.10501355 + + + 0 + + + + + + + + 1 0 0 + + + 0 + + + + + + + 0 1 0 + + + 0 + + + + + + + 0 0 1 + + + 0 + + + + + + + talus_l_offset + + calcn_l_offset + + + + + 0 + + 0 + + -1.5707963300000001 1.5707963300000001 + + true + + false + + + + false + + + + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/talus_l + + -0.048770000000000001 -0.041950000000000001 -0.00792 + + 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/calcn_l + + 0 0 0 + + 0 0 0 + + + + + + + + subtalar_angle_l + + -0.78717961000000003 -0.60474746000000001 -0.12094949000000001 + + + 1 0 + + + + + + + 0 1 0 + + + 0 + + + + + + + -0.12094949000000001 0 0.78717961000000003 + + + 0 + + + + + + + + 1 0 0 + + + 0 + + + + + + + 0 1 0 + + + 0 + + + + + + + 0 0 1 + + + 0 + + + + + + + calcn_l_offset + + toes_l_offset + + + + + 0 + + 0 + + -1.0471975499999999 1.0471975499999999 + + true + + false + + + + false + + + + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/calcn_l + + 0.17879999999999999 -0.002 -0.00108 + + 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/toes_l + + 0 0 0 + + 0 0 0 + + + + + + + + mtp_angle_l + + 0.58095439999999998 0 0.81393610999999999 + + + 1 0 + + + + + + + 0 1 0 + + + 0 + + + + + + + 0.81393610999999999 0 -0.58095439999999998 + + + 0 + + + + + + + + 1 0 0 + + + 0 + + + + + + + 0 1 0 + + + 0 + + + + + + + 0 0 1 + + + 0 + + + + + + + pelvis_offset + + torso_offset + + + + + 0 + + 0 + + -1.5707963300000001 1.5707963300000001 + + true + + false + + + + false + + + + 0 + + 0 + + -1.5707963300000001 1.5707963300000001 + + true + + false + + + + false + + + + 0 + + 0 + + -1.5707963300000001 1.5707963300000001 + + true + + false + + + + false + + + + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/pelvis + + -0.1007 0.081500000000000003 0 + + 0 0 0 + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/torso + + 0 0 0 + + 0 0 0 + + + + + + + + lumbar_extension + + 0 0 1 + + + 1 0 + + + + + lumbar_bending + + 1 0 0 + + + 1 0 + + + + + lumbar_rotation + + 0 1 0 + + + 1 0 + + + + + + + + 1 0 0 + + + 0 + + + + + + + 0 1 0 + + + 0 + + + + + + + 0 0 1 + + + 0 + + + + + + + + + + + + + + + + + true + + lat_cond_r_offset + + /bodyset/tibial_plat_r + + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/lat_cond_r + + + 0 0.035000000000000003 -0.02 + + 0 0 0 + + + + + + true + + lat_cond_l_offset + + /bodyset/tibial_plat_l + + + + + + + .. + + 0.20000000000000001 0.20000000000000001 0.20000000000000001 + + + /bodyset/lat_cond_l + + + 0 0.035000000000000003 0.02 + + 0 0 0 + + + + + + true + + + + -2.0944 -1.45752 -0.526391 0 0.0523599 0.174533 + -2.0944 -1.45752 -0.526391 0 0.0523599 0.174533 + + + + knee_angle_r + + patella_r_constrained_knee_angle + + 1 + + + + true + + + + -2.0944 -1.99997 -1.45752 -0.526391 0.0279253 0.174533 + -2.0944 -1.99997 -1.45752 -0.526391 0.0279253 0.174533 + + + + knee_angle_l + + patella_l_constrained_knee_angle + + 1 + + + + + + + + + + true + + + + + + + + /bodyset/tibia_r + + -0.0094000000000000004 -0.1348 0.0019 + + + + /bodyset/tibia_r + + -0.0144 -0.40510000000000002 -0.0229 + + + + /bodyset/calcn_r + + 0.041700000000000001 0.033399999999999999 -0.0286 + + + + /bodyset/calcn_r + + 0.077200000000000005 0.015900000000000001 -0.0281 + + + + + + + + + + + + + 0.80000000000000004 0.10000000000000001 0.10000000000000001 + + + + 1 + + 1588 + + 0.031 + + 0.31 + + 0.20943951 + + 10 + + 0.033000000000000002 + + 0.59999999999999998 + + 0.5 + + 4 + + 0.29999999999999999 + + 1.8 + + 0.01 + + 0.040000000000000001 + + + + + + + + + + + + + + + + From 6348319b894e2f5ce14d5905b94e743ab2ab1110 Mon Sep 17 00:00:00 2001 From: Ajay Seth Date: Sun, 8 Mar 2020 13:32:01 +0100 Subject: [PATCH 2/3] Test case for Thelen2003Muscle equilibrium solve failure. The test increments the activation until the failure occurs and reports muscle fiber and tendon states and corresponding multipliers during before and after each solve attempt. --- OpenSim/Actuators/Test/testMuscles.cpp | 67 ++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/OpenSim/Actuators/Test/testMuscles.cpp b/OpenSim/Actuators/Test/testMuscles.cpp index 01d435200b..28731b24a9 100644 --- a/OpenSim/Actuators/Test/testMuscles.cpp +++ b/OpenSim/Actuators/Test/testMuscles.cpp @@ -100,6 +100,7 @@ void testSchutte1993Muscle(); void testDelp1990Muscle(); void testMuscleEquilibriumSolve(const Model& model, const Storage& statesStore); +void testThelenMuscleEquilibriumInGaitModel(); int main() { @@ -121,6 +122,13 @@ int main() catch (const Exception& e) { e.print(cerr); failures.push_back("testDelp1990Muscle"); } */ + + try { testThelenMuscleEquilibriumInGaitModel(); + cout << "testThelenMuscleEquilibriumInGaitModel passed" << endl; } + catch (const Exception& e) { + e.print(cout); + failures.push_back("testThelenMuscleEquilibriumInGaitModel"); } + try { testRigidTendonMuscle(); cout << "RigidTendonMuscle Test passed" << endl; } catch (const Exception& e) @@ -1115,3 +1123,62 @@ void testMuscleEquilibriumSolve(const Model& model, const Storage& statesStore) } } } + +/** Test case for failure in the equilibrium solve in Thelen2003Muscle. + Model and conditions provided by Scott Uhlrich when initializing the + Lerner et al. knee model during gait. The model has been stripped down to + the single muscle (tib_post_r) where the failure occurs when activation + approaches ~0.8 in specific configuration (angles and velocities). The + failure does not appear to be due to any approaching singularity in afl or + fv multipliers.*/ +void testThelenMuscleEquilibriumInGaitModel() +{ + Model model("lerner_one_muscle.osim"); + const CoordinateSet& coords = model.getCoordinateSet(); + const Muscle& muscle = model.getMuscles().get("tib_post_r"); + + SimTK::State& state = model.initSystem(); + + coords.get("subtalar_angle_r").setValue(state, 0.2581); + coords.get("ankle_angle_r").setValue(state, 0.2207); + coords.get("subtalar_angle_r").setSpeedValue(state, -1.0344); + coords.get("ankle_angle_r").setSpeedValue(state, -2.3226); + + double fm = SimTK::NaN, ft = SimTK::NaN; + + for (int i = 1; i < 10; ++i) { + cout << i << endl; + muscle.setActivation(state, 0.01 * i); // 0.0798916); + model.realizeVelocity(state); + + cout << "Input: act=" << muscle.getActivation(state) + << " fiberlen=" << muscle.getFiberLength(state) + << " afl =" << muscle.getActiveForceLengthMultiplier(state) + << " pfl =" << muscle.getPassiveForceMultiplier(state) + << " fibervel=" << muscle.getFiberVelocity(state) + << " fv =" << muscle.getForceVelocityMultiplier(state) + << " fm =" << muscle.getFiberForceAlongTendon(state) + << " ft =" << muscle.getTendonForce(state) << endl; + + model.equilibrateMuscles(state); + + fm = muscle.getFiberForceAlongTendon(state); + ft = muscle.getTendonForce(state); + + cout << "After: act=" << muscle.getActivation(state) + << " fiberlen=" << muscle.getFiberLength(state) + << " afl =" << muscle.getActiveForceLengthMultiplier(state) + << " pfl =" << muscle.getPassiveForceMultiplier(state) + << " fibervel=" << muscle.getFiberVelocity(state) + << " fv =" << muscle.getForceVelocityMultiplier(state) + << " fm =" << fm + << " ft =" << ft << endl; + + // equilibrium demands tendon and muscle fiber forces are equivalent + ASSERT_EQUAL(ft, fm, SimTK::SqrtEps, __FILE__, __LINE__, + "testThelenMuscleEquilibriumInGaitModel(): " + + muscle.getConcreteClassName() + + " failed to solve for muscle (fiber) and tendon " + "equilibrium. "); + } +} From d07244c1c7cb63b76ee2d7f8ff89aced2920bb2c Mon Sep 17 00:00:00 2001 From: Christopher Dembia Date: Wed, 11 Mar 2020 10:59:00 -0700 Subject: [PATCH 3/3] Remove tabs, fix comment. --- OpenSim/Actuators/Test/testMuscles.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/OpenSim/Actuators/Test/testMuscles.cpp b/OpenSim/Actuators/Test/testMuscles.cpp index 28731b24a9..256d3a5af1 100644 --- a/OpenSim/Actuators/Test/testMuscles.cpp +++ b/OpenSim/Actuators/Test/testMuscles.cpp @@ -123,12 +123,6 @@ int main() { e.print(cerr); failures.push_back("testDelp1990Muscle"); } */ - try { testThelenMuscleEquilibriumInGaitModel(); - cout << "testThelenMuscleEquilibriumInGaitModel passed" << endl; } - catch (const Exception& e) { - e.print(cout); - failures.push_back("testThelenMuscleEquilibriumInGaitModel"); } - try { testRigidTendonMuscle(); cout << "RigidTendonMuscle Test passed" << endl; } catch (const Exception& e) @@ -139,6 +133,12 @@ int main() catch (const Exception& e) { e.print(cout); failures.push_back("testThelen2003Muscle"); } + try { testThelenMuscleEquilibriumInGaitModel(); + cout << "testThelenMuscleEquilibriumInGaitModel passed" << endl; } + catch (const Exception& e) { + e.print(cout); + failures.push_back("testThelenMuscleEquilibriumInGaitModel"); } + try { testMillard2012EquilibriumMuscle(); cout << "Millard2012EquilibriumMuscle Test passed" << endl; }catch (const Exception& e){ @@ -1128,7 +1128,7 @@ void testMuscleEquilibriumSolve(const Model& model, const Storage& statesStore) Model and conditions provided by Scott Uhlrich when initializing the Lerner et al. knee model during gait. The model has been stripped down to the single muscle (tib_post_r) where the failure occurs when activation - approaches ~0.8 in specific configuration (angles and velocities). The + approaches ~0.08 in specific configuration (angles and velocities). The failure does not appear to be due to any approaching singularity in afl or fv multipliers.*/ void testThelenMuscleEquilibriumInGaitModel() @@ -1144,7 +1144,7 @@ void testThelenMuscleEquilibriumInGaitModel() coords.get("subtalar_angle_r").setSpeedValue(state, -1.0344); coords.get("ankle_angle_r").setSpeedValue(state, -2.3226); - double fm = SimTK::NaN, ft = SimTK::NaN; + double fm = SimTK::NaN, ft = SimTK::NaN; for (int i = 1; i < 10; ++i) { cout << i << endl; @@ -1174,7 +1174,7 @@ void testThelenMuscleEquilibriumInGaitModel() << " fm =" << fm << " ft =" << ft << endl; - // equilibrium demands tendon and muscle fiber forces are equivalent + // equilibrium demands tendon and muscle fiber forces are equivalent ASSERT_EQUAL(ft, fm, SimTK::SqrtEps, __FILE__, __LINE__, "testThelenMuscleEquilibriumInGaitModel(): " + muscle.getConcreteClassName() +