Skip to content

Commit fbd6c5c

Browse files
committed
modified for test data
1 parent e281df8 commit fbd6c5c

1 file changed

Lines changed: 75 additions & 16 deletions

File tree

matlab_tool/TEST_plugin.m

Lines changed: 75 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,83 @@
77
import org.opensim.modeling.*;
88

99

10-
osimModel_name = '../_test_data/Arm26/arm26.osim';
11-
IK_mot_file = '../_test_data/Arm26/elbow_flexion.mot';
12-
bodyOfInterest_name = 'r_humerus';
10+
% verification
11+
osimModel_name = '../_test_data/MFD_tests/testModel.osim';
12+
IK_mot_file = '../_test_data/MFD_tests/testKinematics_file.mot';
13+
bodyOfInterest_name = 'MovingBody';
1314
bodyExpressResultsIn_name = [];
14-
effective_attachm = 'true';
15+
effective_attachm = 'false';
1516
test_input = [];
17+
vis_on = 'true';
1618

17-
N_frame_test = 5;
18-
muscleLinesOfActionStruct = muscleForceDirection_plugin(osimModel_name,...
19-
IK_mot_file,...
20-
bodyOfInterest_name,...
21-
bodyExpressResultsIn_name,...
22-
effective_attachm,...
23-
'true',...
24-
[]);
25-
26-
27-
19+
validated_results_folder = '../_test_data/MFD_tests/validated_res';
20+
21+
res_anatAttach_local = getMuscleForceDirection(osimModel_name,...
22+
IK_mot_file,...
23+
bodyOfInterest_name,...
24+
bodyExpressResultsIn_name,...
25+
'false',...
26+
vis_on,...
27+
[]);
28+
29+
% res_effectAttach_local = getMuscleForceDirection(osimModel_name,...
30+
% IK_mot_file,...
31+
% bodyOfInterest_name,...
32+
% bodyExpressResultsIn_name,...
33+
% 'true',...
34+
% vis_on,...
35+
% []);
36+
%
37+
% res_effectAttach_ground = getMuscleForceDirection(osimModel_name,...
38+
% IK_mot_file,...
39+
% bodyOfInterest_name,...
40+
% 'ground',...
41+
% 'true',...
42+
% vis_on,...
43+
% []);
44+
%
45+
% res_anatAttach_ground = getMuscleForceDirection(osimModel_name,...
46+
% IK_mot_file,...
47+
% bodyOfInterest_name,...
48+
% 'ground',...
49+
% 'false',...
50+
% vis_on,...
51+
% []);
52+
53+
54+
res_anatAttach_local
55+
res_anatAttach_ground
56+
res_effectAttach_ground
57+
res_effectAttach_local
58+
59+
res_anatAttach_local_val = sto2Mat(fullfile(validated_results_folder,'LOCAL_ANATOM_MuscleForceDirection_vectors.sto'));
60+
61+
res_anatAttach_ground.rowheaders
62+
res_effectAttach_ground
63+
res_effectAttach_local
64+
%--------------------------------------------------------------------------
65+
% %% test 1: simple arm26 model
66+
% osimModel_name = '../_test_data/Arm26/arm26.osim';
67+
% IK_mot_file = '../_test_data/Arm26/elbow_flexion.mot';
68+
% bodyOfInterest_name = 'r_humerus';
69+
% bodyExpressResultsIn_name = [];
70+
% effective_attachm = 'true';
71+
% test_input = [];
72+
%
73+
%
74+
% N_frame_test = 5;
75+
% muscleLinesOfActionStruct = getMuscleForceDirection(osimModel_name,...
76+
% IK_mot_file,...
77+
% bodyOfInterest_name,...
78+
% bodyExpressResultsIn_name,...
79+
% effective_attachm,...
80+
% 'true',...
81+
% []);
82+
%
83+
%
84+
%--------------------------------------------------------------------------
85+
% %% test 2: gait2392 model
86+
%
2887
% osimModel_name = '../_test_data/gait2392/subject01.osim';
2988
% IK_mot_file = '../_test_data/gait2392/subject01_walk1_ik.mot';
3089
% bodyOfInterest_name = 'femur_r';
@@ -33,7 +92,7 @@
3392
% test_input = [];
3493
%
3594
% N_frame_test = 5;
36-
% muscleLinesOfActionStruct = muscleForceDirection_plugin(osimModel_name,...
95+
% muscleLinesOfActionStruct = getMuscleForceDirection(osimModel_name,...
3796
% IK_mot_file,...
3897
% bodyOfInterest_name,...
3998
% bodyExpressResultsIn_name,...

0 commit comments

Comments
 (0)