-
Notifications
You must be signed in to change notification settings - Fork 0
/
generate_test_qrs_schema.yml
293 lines (277 loc) · 7.51 KB
/
generate_test_qrs_schema.yml
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
# Used for generating QRs in src/generate_test_qrs.py
# Contains information about this schema file
schema_file:
# Version of schema file
# Incremented every merged schema change
version: 4
# Contains all of the variables in the schema/match_collection_qr_schema.yml file
# Each variable has attributes that determine how it is randomly generated
# gen: if True, this variable can be randomly generated, such as amount of pieces scored.
# if False, variable has to be manually added to the QR, such as match numbers
# symbol: the compressed name of the variable. See schema/match_collection_qr_schema.yml for more information.
# type: the data type of the variable, such as int, str, or bool.
# is_random: if True the variable does not depend on team skill level, and the variable is randomly generated between a min and max value.
# if False, the variable is generated based on team skill level, and the list of values is ordered from least skill to most skill.
# values: the list of possible values the variable can be.
# if the type is an int, the list will contain the min and max value
# if the type is a str, the list will contain a list of all possible values.
_list_data_separator: "&"
# Data that is shared between the objective and subjective QRs.
generic_data:
_separator: '$' # Separates key:value pairs
_section_separator: '%' # Separates generic from objective/subjective data
# Must remain constant between versions
schema_version:
gen: False
symbol: A
type: int
match_number:
gen: False
symbol: B
type: int
timestamp:
gen: True
symbol: C
type: int
is_random: True
values: [0000000000, 9999999999]
match_collection_version_number:
gen: False
symbol: D
type: str
scout_name:
gen: True
symbol: E
type: str
is_random: True
values: ["BOB", "MIKE", "BRYAN", "CYAN", "ROHAAN", "JOHN", "TOM", "BOBINA", "ANDY", "ANN", "MICHAEL", "ANNEMARIE", "NOAH", "SUSAN", "CHRIS", "CHRISTOPHER", "JIM", "JIMOTHY"]
alliance_color_is_red:
gen: False
symbol: F
type: bool
# Data specific to objective match collection QR
objective_tim:
_start_character: '+' # First character in QR used to identify QR type
_separator: '$' # Separates key:value pairs
team_number:
gen: False
symbol: Z
type: str
# Used to determine which tablets have not submitted ('Y' in quotes because it's a keyword on its own)
scout_id:
gen: True
symbol: 'Y'
type: int
is_random: True
values: [1, 30]
# str representing where a robot starts in auto (1, 2, 3, or 4)
start_position:
gen: True
symbol: X
type: str
is_random: True
values: ["0", "1", "2", "3"]
timeline:
gen: False
symbol: W
type: list[dict]
has_preload: # bool representing if a robot has a preloaded note
gen: True
symbol: V
type: bool
is_random: True
stage_level_amp:
gen: True
symbol: U
type: str
is_random: True
values: ["O", "F", "N"]
stage_level_source:
gen: True
symbol: T
type: str
is_random: True
values: ["O", "F", "N"]
stage_level_blind:
gen: True
symbol: S
type: str
is_random: True
values: ["O", "F", "N"]
parked:
gen: True
symbol: R
type: bool
is_random: True
# TODO: CREATE TIMELINE SCHEMA
# Timeline is part of objective match collection QR
# Data for an action in the timeline
# First value represents the length, second represents the target type, third represents the position within
# each action
timeline:
# No separators within timeline to reduce QR size. Each action is a fixed 5-character length
time: [3, int, 0] # Encoded in base 10. Always length 3, e.g. '051' for 51 seconds
action_type: [2, "Enum[str]", 1] # Encoded in alphabet base 26. Always length 2, e.g. 'AJ' for the 10th action
# Data specific to subjective match collection QR
# For subjective boolean values that are skill dependant, specify the high skill version in the values section
subjective_aim:
_start_character: '*' # First character in QR used to identify QR type
_separator: '$' # Separates each key:value pair
_team_separator: '#' # Separates each team's section
_alliance_data_separator: '^' # Separates team data from data about the entire alliance
team_number: # The team number
gen: False
symbol: A
type: str
quickness_score: # A ranking value between 1 and 3
gen: True
is_random: False
symbol: B
type: int
values: [1, 2, 3]
field_awareness_score: # A ranking value between 1 and 3
gen: True
is_random: False
symbol: C
type: int
values: [1, 2, 3]
time_left_to_climb: # The time left to climb, when a robot goes to climb
gen: True
is_random: False
symbol: D
type: int
values: [1,2,3]
climb_after: # True if robot climbed after, else False
gen: True
is_random: False
symbol: E
type: bool
values: True
# Contains all the enums and their values
# Action type is a alphabet base 26 string representation
action_type:
score_speaker: AA
score_amp: AB
start_incap: AC
end_incap: AD
auto_intake_spike_1: AE
auto_intake_spike_2: AF
auto_intake_spike_3: AG
auto_intake_center_1: AH
auto_intake_center_2: AI
auto_intake_center_3: AJ
auto_intake_center_4: AK
auto_intake_center_5: AL
auto_intake_other: AM
intake_amp: AN
intake_poach: AO
intake_center: AP
intake_far: AQ
score_amplify: AR
drop: AS
ferry: AT
fail: AU
to_teleop: AV
to_endgame: AW
score_trap: AX
#stores specifics about an action
#Renewable: It can be used more than once per alliance in a match
#Auto: Can be used in auto
#Tele: Can be used in teleop
action_specifics:
score_speaker:
renewable: True
auto: True
tele: True
score_amp:
renewable: True
auto: True
tele: True
start_incap:
renewable: True
auto: False
tele: True
end_incap:
renewable: True
auto: False
tele: True
auto_intake_spike_1:
renewable: False
auto: True
tele: False
auto_intake_spike_2:
renewable: False
auto: True
tele: False
auto_intake_spike_3:
renewable: False
auto: True
tele: False
auto_intake_center_1:
renewable: False
auto: True
tele: False
auto_intake_center_2:
renewable: False
auto: True
tele: False
auto_intake_center_3:
renewable: False
auto: True
tele: False
auto_intake_center_4:
renewable: False
auto: True
tele: False
auto_intake_center_5:
renewable: False
auto: True
tele: False
auto_intake_other:
renewable: True
auto: True
tele: False
intake_amp:
renewable: True
auto: True
tele: True
intake_poach:
renewable: True
auto: True
tele: True
intake_center:
renewable: True
auto: True
tele: True
intake_far:
renewable: True
auto: True
tele: True
score_amplify:
renewable: True
auto: False
tele: True
drop:
renewable: True
auto: True
tele: True
ferry:
renewable: True
auto: True
tele: True
fail:
renewable: True
auto: True
tele: True
to_teleop:
renewable: True
auto: True
tele: False
to_endgame:
renewable: True
auto: False
tele: True
score_trap:
renewable: True
auto: False
tele: True