-
Notifications
You must be signed in to change notification settings - Fork 0
/
WheelTurnDoubleHand.Main.any
158 lines (125 loc) · 4.57 KB
/
WheelTurnDoubleHand.Main.any
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
#include "PreMainIncludes.any"
Main = {
AnyOperationSequence RunApplication = {
AnyOperation &CalibrationAnal = Main.HumanModel.Calibration.CalibrationSequence;
AnyOperation &InvAnal=Main.Study.InverseDynamics;
};
AnyFolder StrengthParameters={
AnyVar SpecificMuscleTensionSpine= 90; //N/cm^2
AnyVar StrengthIndexLeg= 1;
AnyVar SpecificMuscleTensionShoulderArm= 90; //N/cm^2
};
AnyFolder WinchParameters = {
AnyVec3 Hub = {0.53, 0.08, 0}; // Center of the wheel
AnyVar Rad = 0.25; // Radius of the wheel
// Movement of the wheel
AnyVar Omega = 180; // Wheel angular velocity, degrees/sek
AnyVar M = -20; // Wheel moment
};
AnyFolder SupportParameters = {
AnyVec3 HandRest = {0.4, 0.100, -0.4}; // Rest for the left hand
AnyVar HandRestPitch = 0;
AnyVar HandRestRoll = -40;
AnyVar HandRestYaw = -20;
};
AnyFixedRefFrame GlobalRef = {
Origin ={0,0,0};
AnyDrawRefFrame DrwRef = {
ScaleXYZ={0.05,0.05,0.05};
RGB ={0,0,1};Visible = On;};
AnyRefNode PelvisGroundLock = {
sRel = {0.1,-0.13,0.0};
};
// AnyBody logo
AnyRefNode Logo={
sRel={1.2,-0.1,-0.5};
ARel = RotMat(150*pi/180,y)*RotMat(0*pi/180,x);
AnyDrawSTL Body = {
FileName = "<AMMR_PATH>Body/AAUHuman/ToolBox/DrawObjects/Body-grey.stl";
RGB = Main.DrawSettings.Colors.AnyBodyGrey;
Opacity = 1; ScaleXYZ={0.01,0.01,0.01}*1.5;
};
AnyDrawSTL AnyTechnology = {
FileName = "../../../Body/AAUHuman/ToolBox/DrawObjects/AnyTechnology-red.stl";
RGB = Main.DrawSettings.Colors.AnyBodyRed;
Opacity = 1; ScaleXYZ={0.01,0.01,0.01}*1.5;
};
};
};
#include "DrawSettings.any"
AnyFolder HumanModel={
AnyFolder &Mannequin=.Model.Mannequin;
#include "BodyModel.any"
AnyFolder StrengthParameters={
AnyVar SpecificMuscleTensionSpine= 90; //N/cm^2
AnyVar StrengthIndexLeg= 1;
AnyVar SpecificMuscleTensionShoulderArm= 90; //N/cm^2
};
//Choice of Scaling
#include "<AMMR_PATH>Body\AAUHuman\Scaling\ScalingStandard.any"
Scaling={ };
};
AnyFolder Model = {
AnyFolder &HumanModel=.HumanModel.BodyModel;
#include "Environment.any"
#include "Mannequin.any"
AnyFolder ModelEnvironmentConnection = {
#include "JointsAndDrivers.any"
};
};
AnyBodyStudy Study = {
AnyFolder &Model = .Model;
InverseDynamics.Criterion.Type = MR_MinMaxStrict;// Saeed added
tEnd = 360/.WinchParameters.Omega-1/360; // Always turn one round
Gravity = {0.0, -9.81, 0.0};
nStep=100;
AnyOutputFun AnalysisTime = {
Val = .t;
};
AnyOutputFun MaxAct= { Val = Main.Study.MaxMuscleActivity; };
AnyOutputFun ThoraxExtension = { Val = Main.Model.HumanModel.Interface.Trunk.PelvisThoraxExtension.Pos[0];
};
// InverseDynamics.Criterion.UpperBoundOnOff = Off;// S added
}; // End of study
AnyOptStudy Optimization =
{
// Optimization.Solver=OptFeasibleDirSearch2;
//LogFile = "OptStudy.log";
MaxIterationStep = 100;
// Optimization.ConvergenceObjectiveTol=1e-5;
// Optimization.ConvergenceDesignTol=1e-5;
// Optimization.NumSensitivityPerturbation = 1e-3;
//LogFile = "";
Analysis =
{
Settings =
{
Echo = On;
ModelSceneUpdate = On;
};
AnyOperation &InvStd = Main.Study.InverseDynamics;
};
//MaxIterationStep = 100;
//AnyDesVar & ElboePron = Main.Model.ModelEnvironmentConnection.Drivers.Elbow.Data;
//AnyDesVar &<Insert name1> = <Insert object reference (or full object definition)>; You can make any number of these objects!
// AnyVar slack=180*pi/180;
// AnyVar slack2=10*pi/180;
// AnyVar slack3=5*pi/180;
// #include "HandlePosDesignVars.any"
// #include "ThoraxLateralBendingDesignVars.any"
#include "ThoraxFlexDesignVars.any"
#include "ElbowPronationDesignVarsRight.any"
#include "ElbowPronationDesignVarsLeft.any"
AnyDesMeasure MaxActivityy = {
Val = max(..Study.MaxAct()-1);
Type = LessThanZero;
};
AnyDesMeasure Objective = {
// Val = mean(Main.Study.MaxAct()^2) + 100*max(Main.Study.KinematicError);
Val=(secint(Main.Study.MaxAct()^3,..Study.AnalysisTime()))/..Study.tEnd;
// Val = max(Main.Study.MaxAct());
Type = ObjectiveFun;
};
//AnyDesMeasure &<Insert name1> = <Insert object reference (or full object definition)>; You can make any number of these objects!
};
}; //Main