-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclass_walk_primitive.html
More file actions
313 lines (302 loc) · 16 KB
/
class_walk_primitive.html
File metadata and controls
313 lines (302 loc) · 16 KB
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>naowalkoptimiser: WalkPrimitive Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>WalkPrimitive Class Reference</h1><!-- doxytag: class="WalkPrimitive" -->
<p><code>#include <<a class="el" href="walkprimitive_8h_source.html">walkprimitive.h</a>></code></p>
<p><a href="class_walk_primitive-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_walk_primitive.html#a1043c465ceb2b9d2face4951f9821d48">WalkPrimitive</a> (<a class="el" href="step_8h.html#afd73f941d60247a511c85ef1e63c989f">StepTypeEnum</a> steptype)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_walk_primitive.html#ae5fa51341276ac97568735a06180ee56">~WalkPrimitive</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_walk_primitive.html#aa8a96fe3516896e8fc6325a1d2ab63e0">getInitialPose</a> (float **positions, float **hardnesses)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_step.html">Step</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_walk_primitive.html#ae7c91ddf241e00769b36bbcd6d7b2382">getStartStep</a> (float direction)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_step.html">Step</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_walk_primitive.html#a935fd3645ebd068a558a390a3d68befc">getStartGStep</a> (float direction)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_step.html">Step</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_walk_primitive.html#a50006bc775851ed938ef3730ab996c67">getForwardStep</a> (<a class="el" href="class_step.html">Step</a> *previousstep, float direction, <a class="el" href="class_walk_primitive.html">WalkPrimitive</a> *forwardprimitives)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_step.html">Step</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_walk_primitive.html#abe93641a711cd34827eb096f75672e1b">getTurnStep</a> (<a class="el" href="class_step.html">Step</a> *previousstep, float direction)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_step.html">Step</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_walk_primitive.html#aca42589832fb603f1cb0c987816e7ca0">getSideStep</a> (<a class="el" href="class_step.html">Step</a> *previousstep, float direction)</td></tr>
<tr><td colspan="2"><h2>Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structprimitive__t.html">primitive_t</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_walk_primitive.html#aa39c659505d12ad4d5cac177b2564f14">Steps</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned char </td><td class="memItemRight" valign="bottom"><a class="el" href="class_walk_primitive.html#adf05f3c63f8a9b4421f391fad1e59517">StepsLength</a></td></tr>
</table>
<hr/><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" id="a1043c465ceb2b9d2face4951f9821d48"></a><!-- doxytag: member="WalkPrimitive::WalkPrimitive" ref="a1043c465ceb2b9d2face4951f9821d48" args="(StepTypeEnum steptype)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">WalkPrimitive::WalkPrimitive </td>
<td>(</td>
<td class="paramtype"><a class="el" href="step_8h.html#afd73f941d60247a511c85ef1e63c989f">StepTypeEnum</a> </td>
<td class="paramname"> <em>steptype</em></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>A Class that encapsulates a walk TYPE.</p>
<p>The central member of this class is Steps. He is an array of several/many <a class="el" href="structprimitive__t.html">primitive_t</a> structures. Each <a class="el" href="structprimitive__t.html">primitive_t</a> contains all of the Steps for a single TYPE + VALUE (ie start, follow, normal, fstop and nstop steps) Each <a class="el" href="class_step.html">Step</a> contains the frames (both position and hardness) for that <a class="el" href="class_step.html">Step</a>.</p>
<p>We access Steps using [0] for WalkForward and WalkBackward, because there is only a single <a class="el" href="structprimitive__t.html">primitive_t</a> [0] or [1] for WalkSideward where '0' will be Left and '1' will be right [(int) StepLeftDirectionToIndex * direction + StepsLeftDirectionToIndexOffset] for WalkArc and WalkTurn</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>steptype,the</em> </td><td>type of primitive (eg. TYPE_FORWARD, TYPE_TURN etc) </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ae5fa51341276ac97568735a06180ee56"></a><!-- doxytag: member="WalkPrimitive::~WalkPrimitive" ref="ae5fa51341276ac97568735a06180ee56" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">WalkPrimitive::~WalkPrimitive </td>
<td>(</td>
<td class="paramname"></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a50006bc775851ed938ef3730ab996c67"></a><!-- doxytag: member="WalkPrimitive::getForwardStep" ref="a50006bc775851ed938ef3730ab996c67" args="(Step *previousstep, float direction, WalkPrimitive *forwardprimitives)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_step.html">Step</a> * WalkPrimitive::getForwardStep </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_step.html">Step</a> * </td>
<td class="paramname"> <em>previousstep</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float </td>
<td class="paramname"> <em>direction</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="class_walk_primitive.html">WalkPrimitive</a> * </td>
<td class="paramname"> <em>forwardprimitives</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns a pointer to the forward step that should follow the previous step </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>previousstep,a</em> </td><td>pointer to the step that has just completed </td></tr>
<tr><td valign="top"></td><td valign="top"><em>direction,for</em> </td><td>WalkArc steps this is the desired arc radius in cm, for WalkForward steps this is ignored </td></tr>
<tr><td valign="top"></td><td valign="top"><em>forwardprimitives,a</em> </td><td>pointer to the <a class="el" href="class_walk_primitive.html">WalkPrimitive</a> containing the WalkForward <a class="el" href="structprimitive__t.html">primitive_t</a> </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="aa8a96fe3516896e8fc6325a1d2ab63e0"></a><!-- doxytag: member="WalkPrimitive::getInitialPose" ref="aa8a96fe3516896e8fc6325a1d2ab63e0" args="(float **positions, float **hardnesses)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void WalkPrimitive::getInitialPose </td>
<td>(</td>
<td class="paramtype">float ** </td>
<td class="paramname"> <em>positions</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float ** </td>
<td class="paramname"> <em>hardnesses</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Updates positions and hardnesses to point to their 'default' values </p>
</div>
</div>
<a class="anchor" id="aca42589832fb603f1cb0c987816e7ca0"></a><!-- doxytag: member="WalkPrimitive::getSideStep" ref="aca42589832fb603f1cb0c987816e7ca0" args="(Step *previousstep, float direction)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_step.html">Step</a> * WalkPrimitive::getSideStep </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_step.html">Step</a> * </td>
<td class="paramname"> <em>previousstep</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float </td>
<td class="paramname"> <em>direction</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<a class="anchor" id="a935fd3645ebd068a558a390a3d68befc"></a><!-- doxytag: member="WalkPrimitive::getStartGStep" ref="a935fd3645ebd068a558a390a3d68befc" args="(float direction)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_step.html">Step</a> * WalkPrimitive::getStartGStep </td>
<td>(</td>
<td class="paramtype">float </td>
<td class="paramname"> <em>direction</em></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns a pointer to the start gstep of THIS primitive </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>direction,a</em> </td><td>positive value will produce g in the left direction and a negative value will produce g in the right direction</td></tr>
</table>
</dd>
</dl>
<p>Important: It is assumed that special gSteps are placed at the end of the Steps array. The second last one is left directed and the last one is right directed. </p>
</div>
</div>
<a class="anchor" id="ae7c91ddf241e00769b36bbcd6d7b2382"></a><!-- doxytag: member="WalkPrimitive::getStartStep" ref="ae7c91ddf241e00769b36bbcd6d7b2382" args="(float direction)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_step.html">Step</a> * WalkPrimitive::getStartStep </td>
<td>(</td>
<td class="paramtype">float </td>
<td class="paramname"> <em>direction</em></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns a pointer to the start step in the specified direction </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>direction,the</em> </td><td>direction to take the start step.</td></tr>
</table>
</dd>
</dl>
<p>For forwards and backwards the direction is ignored, because it has no meaning. For sideward steps only the sign of the direction is used. For a turn the direction is the desired turn angle in radians For an arc the direction is the desired arc radius in cm </p>
</div>
</div>
<a class="anchor" id="abe93641a711cd34827eb096f75672e1b"></a><!-- doxytag: member="WalkPrimitive::getTurnStep" ref="abe93641a711cd34827eb096f75672e1b" args="(Step *previousstep, float direction)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_step.html">Step</a> * WalkPrimitive::getTurnStep </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_step.html">Step</a> * </td>
<td class="paramname"> <em>previousstep</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float </td>
<td class="paramname"> <em>direction</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns a pointer to the turn step that should follow the previous step </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>previousstep,a</em> </td><td>pointer to the step that has just completed </td></tr>
<tr><td valign="top"></td><td valign="top"><em>direction,the</em> </td><td>desired turn angle in radians </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="aa39c659505d12ad4d5cac177b2564f14"></a><!-- doxytag: member="WalkPrimitive::Steps" ref="aa39c659505d12ad4d5cac177b2564f14" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structprimitive__t.html">primitive_t</a>* <a class="el" href="class_walk_primitive.html#aa39c659505d12ad4d5cac177b2564f14">WalkPrimitive::Steps</a></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<a class="anchor" id="adf05f3c63f8a9b4421f391fad1e59517"></a><!-- doxytag: member="WalkPrimitive::StepsLength" ref="adf05f3c63f8a9b4421f391fad1e59517" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned char <a class="el" href="class_walk_primitive.html#adf05f3c63f8a9b4421f391fad1e59517">WalkPrimitive::StepsLength</a></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>/Users/jason/Code/naowalkoptimiser/src/Locomotion/Walk/<a class="el" href="walkprimitive_8h_source.html">walkprimitive.h</a></li>
<li>/Users/jason/Code/naowalkoptimiser/src/Locomotion/Walk/<a class="el" href="walkprimitive_8cpp.html">walkprimitive.cpp</a></li>
</ul>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated on Fri Oct 9 13:42:12 2009 for naowalkoptimiser by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>