-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrfidLocMap.gen
231 lines (193 loc) · 6.31 KB
/
rfidLocMap.gen
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
/*------------------------------------------------------------
*
* -- Module RFIDLOCMAP --
*
* Description: Robot localization and Mapping of new Rfid Tags
* Creation date : Tue Jan 12 09:41:07 2010
* Author: Andres Codas
*
*------------------------------------------------------------*/
module rfidLocMap {
number: 9002;
version: "0.1";
email: "[email protected]";
requires: rfid,rflex;
codels_requires: rfid,rflex;
internal_data: RFIDLOCMAP_STR;
lang: "c++";
};
/*------------------------------------------------------------
* Structures and SDI
*------------------------------------------------------------*/
#include "rfidLocMapStruct.h"
import from rfid {
#include "rfidStruct.h"
#include "server/rfidPosterLibStruct.h"
};
import from rflex {
#include "rflexStruct.h"
#include "rflexConst.h"
#include "server/rflexPosterLibStruct.h"
};
typedef struct RFIDLOCMAP_STR {
POSITION position;
POSITION_ERROR estimationError;
TAG_POSITION_LIST tagsPosition;
int numberParticles;
int padding;
double inertia;
} RFIDLOCMAP_STR;
/*------------------------------------------------------------
* Requests
*------------------------------------------------------------*/
/* */
request ActualizePositions {
doc: "Actualize the robot and tags positions with new measurements";
type: exec;
exec_task: MainTask;
codel_start: rfidLocMapActualizePositionsStart;
codel_inter: rfidLocMapActualizePositionsInter;
fail_reports: RFID_POSTER_NOT_FOUND, RFLEX_POSTER_NOT_FOUND;
interrupt_activity: all ;
};
/* */
request StartRobotParticles {
doc: "Initialize Robot Particles";
type: exec;
exec_task: MainTask;
input: newPosition::position;
codel_start: rfidLocMapStartRobotParticlesStart;
codel_inter: rfidLocMapStartRobotParticlesInter;
interrupt_activity: all;
};
request StartOdometry {
doc: "Set odometry initial Point";
type: exec;
exec_task: MainTask;
input: newPosition::position;
codel_start: rfidLocMapStartOdometryStart;
codel_inter: rfidLocMapStartOdometryInter;
interrupt_activity: all;
};
request StartInput {
doc: "Restart Inputs";
type: exec;
exec_task: MainTask;
codel_start: rfidLocMapStartInputStart;
codel_inter: rfidLocMapStartInputInter;
interrupt_activity: all;
};
request ClearTags {
doc: "Clear Tags";
type: exec;
exec_task: MainTask;
codel_start: rfidLocMapClearTagsStart;
codel_inter: rfidLocMapClearTagsInter;
interrupt_activity: all;
};
/* */
request SetNumberRobotParticles {
doc: "Define number of robot particles Warning!!!... Resets the covariance to 0!!!";
type: exec;
exec_task: MainTask;
input: newNumberParticles::numberParticles;
codel_start: rfidLocMapSetNumberRobotParticlesStart;
codel_inter: rfidLocMapSetNumberRobotParticlesInter;
interrupt_activity: all;
};
/* */
request GetNumberRobotParticles {
doc: "Get number of robot particles";
type: exec;
exec_task: MainTask;
output: outNumberParticles::numberParticles;
codel_start: rfidLocMapGetNumberRobotParticlesStart;
codel_inter: rfidLocMapGetNumberRobotParticlesInter;
interrupt_activity: all;
};
/* */
request SetNumberTagParticles {
doc: "Define number of tag particles";
type: exec;
exec_task: MainTask;
input: newNumberParticles::numberParticles;
codel_start: rfidLocMapSetNumberTagParticlesStart;
codel_inter: rfidLocMapSetNumberTagParticlesInter;
interrupt_activity: all;
};
/* */
request GetNumberTagParticles {
doc: "Get number of tag particles";
type: exec;
exec_task: MainTask;
output: outNumberParticles::numberParticles;
codel_start: rfidLocMapGetNumberTagParticlesStart;
codel_inter: rfidLocMapGetNumberTagParticlesInter;
interrupt_activity: all;
};
/* */
request SetRobotInertia {
doc: "Define the inertia of the robot particles";
type: exec;
exec_task: MainTask;
input: newInertia::inertia;
codel_start: rfidLocMapSetRobotInertiaStart;
codel_inter: rfidLocMapSetRobotInertiaInter;
interrupt_activity: all;
};
/* */
request GetRobotInertia {
doc: "Get the inertia of the robot particles";
type: exec;
exec_task: MainTask;
output: outInertia::inertia;
codel_start: rfidLocMapGetRobotInertiaStart;
codel_inter: rfidLocMapGetRobotInertiaInter;
interrupt_activity: all;
};
/* */
request SetTagInertia {
doc: "Define the inertia of the tag particles";
type: exec;
exec_task: MainTask;
input: newInertia::inertia;
codel_start: rfidLocMapSetTagInertiaStart;
codel_inter: rfidLocMapSetTagInertiaInter;
interrupt_activity: all;
};
/* */
request GetTagInertia {
doc: "Get the inertia of the tag particles";
type: exec;
exec_task: MainTask;
output: outInertia::inertia;
codel_start: rfidLocMapGetTagInertiaStart;
codel_inter: rfidLocMapGetTagInertiaInter;
interrupt_activity: all;
};
/*------------------------------------------------------------
* Posters
*------------------------------------------------------------*/
poster RobotPosition {
update: auto;
data: RobotPosition::position,
covariance::estimationError;
exec_task: MainTask;
};
/* */
poster TagsPosition {
update: auto;
data: TagsPosition::tagsPosition;
exec_task: MainTask;
};
/*------------------------------------------------------------
* Execution Tasks
*------------------------------------------------------------*/
/* */
exec_task MainTask {
period: 5;
delay: 0;
priority: 100;
stack_size: 60000;
c_init_func: rfidLocMapInit;
};