|
a |
|
b/Application/Examples/StandingPosturePredictionWithLoad/Model/Environment.any |
|
|
1 |
AnyFolder Environment = { |
|
|
2 |
AnyFixedRefFrame GlobalRef = { |
|
|
3 |
Origin = {0.0,0.0,0.0}; |
|
|
4 |
|
|
|
5 |
|
|
|
6 |
AnyRefNode HandPoint ={ |
|
|
7 |
sRel=Main.InputParameters.ObjectPoint; |
|
|
8 |
}; |
|
|
9 |
|
|
|
10 |
AnyRefNode ObjectPoint ={ |
|
|
11 |
sRel=Main.InputParameters.ObjectPoint; |
|
|
12 |
ARel=Main.InputParameters.ObjectOrientation; |
|
|
13 |
}; |
|
|
14 |
|
|
|
15 |
AnyRefNode RightFootPoint ={ |
|
|
16 |
sRel=Main.InputParameters.RightFootPoint; |
|
|
17 |
AnyRefNode RotNode ={ |
|
|
18 |
ARel =RotMat(0.5*pi,x); |
|
|
19 |
}; |
|
|
20 |
}; |
|
|
21 |
|
|
|
22 |
AnyRefNode LeftFootPoint ={ |
|
|
23 |
sRel=Main.InputParameters.LeftFootPoint; |
|
|
24 |
|
|
|
25 |
AnyRefNode RotNode ={ |
|
|
26 |
ARel =RotMat(0.5*pi,x); |
|
|
27 |
}; |
|
|
28 |
|
|
|
29 |
}; |
|
|
30 |
|
|
|
31 |
AnyRefNode FootCenterPoint= { |
|
|
32 |
sRel=0.5*(Main.InputParameters.RightFootPoint+Main.InputParameters.LeftFootPoint); |
|
|
33 |
}; |
|
|
34 |
}; |
|
|
35 |
|
|
|
36 |
//Changes location of box (or object being carried) |
|
|
37 |
AnyDrawWidgetLin DrwWidgetObject = { |
|
|
38 |
RefFrame = &.GlobalRef; |
|
|
39 |
Target = &Main.InputParameters.ObjectPoint; |
|
|
40 |
AxisOnOff = {On,On,On}; |
|
|
41 |
UpdateEvent = OnMouseRelease; |
|
|
42 |
Operation = &Main.WidgetOperation; |
|
|
43 |
MaxDrawSize=0.2; |
|
|
44 |
}; |
|
|
45 |
|
|
|
46 |
//Changes location of right foot |
|
|
47 |
AnyDrawWidgetLin DrwWidgetRightFoot = { |
|
|
48 |
RefFrame = &.GlobalRef; |
|
|
49 |
Target = &Main.InputParameters.RightFootPoint; |
|
|
50 |
AxisOnOff = {On,On,On}; |
|
|
51 |
UpdateEvent = OnMouseRelease; |
|
|
52 |
Operation = &Main.WidgetOperation; |
|
|
53 |
MaxDrawSize=0.2; |
|
|
54 |
}; |
|
|
55 |
|
|
|
56 |
//Changes location of left foot |
|
|
57 |
AnyDrawWidgetLin DrwWidgetLeftFoot = { |
|
|
58 |
RefFrame = &.GlobalRef; |
|
|
59 |
Target = &Main.InputParameters.LeftFootPoint; |
|
|
60 |
AxisOnOff = {On,On,On}; |
|
|
61 |
UpdateEvent = OnMouseRelease; |
|
|
62 |
Operation = &Main.WidgetOperation; |
|
|
63 |
MaxDrawSize=0.2; |
|
|
64 |
}; |
|
|
65 |
|
|
|
66 |
|
|
|
67 |
AnySeg HandSeg ={ |
|
|
68 |
Mass=Main.InputParameters.ObjectWeight; |
|
|
69 |
Jii={0,0,0}; |
|
|
70 |
r0=Main.InputParameters.ObjectPoint; |
|
|
71 |
AnyRefNode RightHandle ={ |
|
|
72 |
sRel =Main.InputParameters.HandPosRight; |
|
|
73 |
}; |
|
|
74 |
|
|
|
75 |
AnyRefNode LeftHandle ={ |
|
|
76 |
sRel =Main.InputParameters.HandPosLeft; |
|
|
77 |
}; |
|
|
78 |
|
|
|
79 |
// Draw a box midway between hands to better visualize object, |
|
|
80 |
AnyRefNode BoxMidpoint = { |
|
|
81 |
sRel = (.LeftHandle.sRel+.RightHandle.sRel)/2; |
|
|
82 |
AnyDrawSurf Box = { |
|
|
83 |
Opacity=0.25; |
|
|
84 |
RGB = {0.65, 0.65, 0.65}; |
|
|
85 |
ScaleXYZ = (0.195)*{1.0, 1.0, 1.0}; |
|
|
86 |
FileName = "..\Input\Box"; |
|
|
87 |
}; |
|
|
88 |
}; |
|
|
89 |
// draw vector showing direction of box weight |
|
|
90 |
AnyDrawVector ObjectWeight = { |
|
|
91 |
Vec = (.Mass*Main.Study.Gravity)/100; //divide by 100 not to have the force too long in view |
|
|
92 |
GlobalCoord = On; |
|
|
93 |
Line.Thickness=0.015; |
|
|
94 |
Line.RGB={1,0,0}; |
|
|
95 |
Line.End.Style = {5}; |
|
|
96 |
Line.End.Thickness = 3*Line.Thickness; |
|
|
97 |
Line.End.Length = 4*Line.Thickness; |
|
|
98 |
Line.Start.Style = {0}; |
|
|
99 |
Line.Start.Thickness = 3*Line.Thickness; |
|
|
100 |
Line.Start.Length = 3*Line.Thickness; |
|
|
101 |
Line.Start.RGB = {1,0,0}; |
|
|
102 |
|
|
|
103 |
}; |
|
|
104 |
}; |
|
|
105 |
|
|
|
106 |
AnyStdJoint jnt ={ |
|
|
107 |
AnyRefFrame &ref=.GlobalRef.HandPoint; //This point is moved by the widget |
|
|
108 |
AnySeg &ref2=.HandSeg; |
|
|
109 |
Constraints.Reaction.Type={Off,Off,Off,Off,Off,Off}; //the human model will need to carry the loads not this connection |
|
|
110 |
}; |
|
|
111 |
|
|
|
112 |
|
|
|
113 |
|
|
|
114 |
|
|
|
115 |
|
|
|
116 |
// Defining Right force plate |
|
|
117 |
|
|
|
118 |
FootPlateConditionalContact RightFootForcePlate ( |
|
|
119 |
NORMAL_DIRECTION = "Z", NUMBER_OF_NODES = 25, |
|
|
120 |
NODES_FOLDER = FootNodes , PLATE_BASE_FRAME = Main.Model.Environment.GlobalRef.RightFootPoint, |
|
|
121 |
GLOBAL_REF = Main.Model.Environment.GlobalRef, |
|
|
122 |
SHOW_TRIGGER_VOLUME = 1) = |
|
|
123 |
|
|
|
124 |
{ |
|
|
125 |
|
|
|
126 |
// Default values for contact model parameters |
|
|
127 |
Settings = |
|
|
128 |
{ |
|
|
129 |
LimitDistLow = -0.02; |
|
|
130 |
LimitDistHigh = 0.12; //This is to have heel contact at lift off |
|
|
131 |
LimitVelHigh = 0.8; |
|
|
132 |
Radius = 0.3; |
|
|
133 |
Strength = 2500; |
|
|
134 |
FrictionCoefficient = 0.95; |
|
|
135 |
ScaleFactor = 1; |
|
|
136 |
ForceVectorDrawScaleFactor = 0.0005; |
|
|
137 |
}; |
|
|
138 |
|
|
|
139 |
CreateFootContactNodes25 FootNodes(foot_ref = Main.HumanModel.BodyModel.Right.Leg.Seg.Foot) = |
|
|
140 |
{ |
|
|
141 |
|
|
|
142 |
}; |
|
|
143 |
|
|
|
144 |
}; |
|
|
145 |
|
|
|
146 |
|
|
|
147 |
|
|
|
148 |
FootPlateConditionalContact LeftFootForcePlate ( |
|
|
149 |
NORMAL_DIRECTION = "Z", NUMBER_OF_NODES = 25, |
|
|
150 |
NODES_FOLDER = FootNodes , PLATE_BASE_FRAME = Main.Model.Environment.GlobalRef.LeftFootPoint, |
|
|
151 |
GLOBAL_REF = Main.Model.Environment.GlobalRef, |
|
|
152 |
|
|
|
153 |
SHOW_TRIGGER_VOLUME = 1) = |
|
|
154 |
|
|
|
155 |
{ |
|
|
156 |
|
|
|
157 |
// Default values for contact model parameters |
|
|
158 |
Settings = |
|
|
159 |
{ |
|
|
160 |
LimitDistLow = -0.02; |
|
|
161 |
LimitDistHigh = 0.12; //This is to have heel contact at lift off |
|
|
162 |
LimitVelHigh = 0.8; |
|
|
163 |
Radius = 0.3; |
|
|
164 |
Strength = 2500; |
|
|
165 |
FrictionCoefficient = 0.95; |
|
|
166 |
ScaleFactor = 1; |
|
|
167 |
ForceVectorDrawScaleFactor = 0.0005; |
|
|
168 |
}; |
|
|
169 |
|
|
|
170 |
CreateFootContactNodes25 FootNodes(foot_ref = Main.HumanModel.BodyModel.Left.Leg.Seg.Foot) = |
|
|
171 |
{ |
|
|
172 |
|
|
|
173 |
}; |
|
|
174 |
|
|
|
175 |
}; |
|
|
176 |
|
|
|
177 |
}; |