@horizon36596/zenith-schema 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/NOTICE +18 -0
- package/README.md +24 -0
- package/dist/auto.d.ts +1882 -0
- package/dist/auto.d.ts.map +1 -0
- package/dist/auto.js +236 -0
- package/dist/auto.js.map +1 -0
- package/dist/common.d.ts +76 -0
- package/dist/common.d.ts.map +1 -0
- package/dist/common.js +30 -0
- package/dist/common.js.map +1 -0
- package/dist/expr.d.ts +56 -0
- package/dist/expr.d.ts.map +1 -0
- package/dist/expr.js +245 -0
- package/dist/expr.js.map +1 -0
- package/dist/field.d.ts +719 -0
- package/dist/field.d.ts.map +1 -0
- package/dist/field.js +158 -0
- package/dist/field.js.map +1 -0
- package/dist/ids.d.ts +62 -0
- package/dist/ids.d.ts.map +1 -0
- package/dist/ids.js +79 -0
- package/dist/ids.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/jsonschema.d.ts +14 -0
- package/dist/jsonschema.d.ts.map +1 -0
- package/dist/jsonschema.js +31 -0
- package/dist/jsonschema.js.map +1 -0
- package/dist/link.d.ts +117 -0
- package/dist/link.d.ts.map +1 -0
- package/dist/link.js +58 -0
- package/dist/link.js.map +1 -0
- package/dist/migrate.d.ts +2699 -0
- package/dist/migrate.d.ts.map +1 -0
- package/dist/migrate.js +109 -0
- package/dist/migrate.js.map +1 -0
- package/dist/parse.d.ts +28 -0
- package/dist/parse.d.ts.map +1 -0
- package/dist/parse.js +46 -0
- package/dist/parse.js.map +1 -0
- package/dist/robot.d.ts +2935 -0
- package/dist/robot.d.ts.map +1 -0
- package/dist/robot.js +231 -0
- package/dist/robot.js.map +1 -0
- package/dist/waypoints.d.ts +63 -0
- package/dist/waypoints.d.ts.map +1 -0
- package/dist/waypoints.js +20 -0
- package/dist/waypoints.js.map +1 -0
- package/json/auto.json +683 -0
- package/json/field.json +457 -0
- package/json/link.json +110 -0
- package/json/robot.json +664 -0
- package/json/waypoints.json +50 -0
- package/package.json +65 -0
package/json/field.json
ADDED
|
@@ -0,0 +1,457 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://libraries.horizon36596.org/zenith/schema/v1/field.json",
|
|
4
|
+
"title": "Zenith field file, formatVersion 2",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"$schema": {
|
|
8
|
+
"type": "string"
|
|
9
|
+
},
|
|
10
|
+
"formatVersion": {
|
|
11
|
+
"type": "number",
|
|
12
|
+
"const": 2
|
|
13
|
+
},
|
|
14
|
+
"season": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"minLength": 1
|
|
17
|
+
},
|
|
18
|
+
"name": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"minLength": 1
|
|
21
|
+
},
|
|
22
|
+
"frame": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"properties": {
|
|
25
|
+
"origin": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"enum": [
|
|
28
|
+
"centre",
|
|
29
|
+
"corner"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"xAxis": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"minLength": 1
|
|
35
|
+
},
|
|
36
|
+
"yAxis": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"minLength": 1
|
|
39
|
+
},
|
|
40
|
+
"headingZero": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"enum": [
|
|
43
|
+
"+x",
|
|
44
|
+
"+y"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
"headingPositive": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"enum": [
|
|
50
|
+
"ccw",
|
|
51
|
+
"cw"
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"units": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"enum": [
|
|
57
|
+
"in"
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
"canonicalAlliance": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"enum": [
|
|
63
|
+
"RED",
|
|
64
|
+
"BLUE"
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
"mirror": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"enum": [
|
|
70
|
+
"pointSymmetry",
|
|
71
|
+
"mirrorX",
|
|
72
|
+
"mirrorY",
|
|
73
|
+
"none"
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
"view": {
|
|
77
|
+
"type": "object",
|
|
78
|
+
"properties": {
|
|
79
|
+
"audienceAt": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"enum": [
|
|
82
|
+
"bottom",
|
|
83
|
+
"top",
|
|
84
|
+
"left",
|
|
85
|
+
"right"
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"required": [
|
|
90
|
+
"audienceAt"
|
|
91
|
+
],
|
|
92
|
+
"additionalProperties": false
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"required": [
|
|
96
|
+
"origin",
|
|
97
|
+
"xAxis",
|
|
98
|
+
"yAxis",
|
|
99
|
+
"headingZero",
|
|
100
|
+
"headingPositive",
|
|
101
|
+
"units",
|
|
102
|
+
"canonicalAlliance",
|
|
103
|
+
"mirror"
|
|
104
|
+
],
|
|
105
|
+
"additionalProperties": false
|
|
106
|
+
},
|
|
107
|
+
"sizeIn": {
|
|
108
|
+
"type": "object",
|
|
109
|
+
"properties": {
|
|
110
|
+
"xIn": {
|
|
111
|
+
"type": "number",
|
|
112
|
+
"exclusiveMinimum": true,
|
|
113
|
+
"minimum": 0
|
|
114
|
+
},
|
|
115
|
+
"yIn": {
|
|
116
|
+
"type": "number",
|
|
117
|
+
"exclusiveMinimum": true,
|
|
118
|
+
"minimum": 0
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"required": [
|
|
122
|
+
"xIn",
|
|
123
|
+
"yIn"
|
|
124
|
+
],
|
|
125
|
+
"additionalProperties": false
|
|
126
|
+
},
|
|
127
|
+
"image": {
|
|
128
|
+
"type": "object",
|
|
129
|
+
"properties": {
|
|
130
|
+
"src": {
|
|
131
|
+
"type": "string",
|
|
132
|
+
"minLength": 1
|
|
133
|
+
},
|
|
134
|
+
"credit": {
|
|
135
|
+
"type": "string",
|
|
136
|
+
"minLength": 1
|
|
137
|
+
},
|
|
138
|
+
"pxBoundsIn": {
|
|
139
|
+
"anyOf": [
|
|
140
|
+
{
|
|
141
|
+
"type": "string",
|
|
142
|
+
"const": "fullBleed"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"type": "object",
|
|
146
|
+
"properties": {
|
|
147
|
+
"left": {
|
|
148
|
+
"type": "number",
|
|
149
|
+
"minimum": 0
|
|
150
|
+
},
|
|
151
|
+
"top": {
|
|
152
|
+
"type": "number",
|
|
153
|
+
"minimum": 0
|
|
154
|
+
},
|
|
155
|
+
"right": {
|
|
156
|
+
"type": "number",
|
|
157
|
+
"exclusiveMinimum": true,
|
|
158
|
+
"minimum": 0
|
|
159
|
+
},
|
|
160
|
+
"bottom": {
|
|
161
|
+
"type": "number",
|
|
162
|
+
"exclusiveMinimum": true,
|
|
163
|
+
"minimum": 0
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"required": [
|
|
167
|
+
"left",
|
|
168
|
+
"top",
|
|
169
|
+
"right",
|
|
170
|
+
"bottom"
|
|
171
|
+
],
|
|
172
|
+
"additionalProperties": false
|
|
173
|
+
}
|
|
174
|
+
]
|
|
175
|
+
},
|
|
176
|
+
"rotationDeg": {
|
|
177
|
+
"type": "number",
|
|
178
|
+
"enum": [
|
|
179
|
+
0,
|
|
180
|
+
90,
|
|
181
|
+
180,
|
|
182
|
+
270
|
|
183
|
+
]
|
|
184
|
+
},
|
|
185
|
+
"variants": {
|
|
186
|
+
"type": "array",
|
|
187
|
+
"items": {
|
|
188
|
+
"type": "object",
|
|
189
|
+
"properties": {
|
|
190
|
+
"name": {
|
|
191
|
+
"type": "string",
|
|
192
|
+
"minLength": 1
|
|
193
|
+
},
|
|
194
|
+
"src": {
|
|
195
|
+
"type": "string",
|
|
196
|
+
"minLength": 1
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"required": [
|
|
200
|
+
"name",
|
|
201
|
+
"src"
|
|
202
|
+
],
|
|
203
|
+
"additionalProperties": false
|
|
204
|
+
},
|
|
205
|
+
"minItems": 1
|
|
206
|
+
},
|
|
207
|
+
"provenance": {
|
|
208
|
+
"type": "string",
|
|
209
|
+
"minLength": 1
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
"required": [
|
|
213
|
+
"src",
|
|
214
|
+
"credit",
|
|
215
|
+
"pxBoundsIn"
|
|
216
|
+
],
|
|
217
|
+
"additionalProperties": false
|
|
218
|
+
},
|
|
219
|
+
"periods": {
|
|
220
|
+
"type": "object",
|
|
221
|
+
"properties": {
|
|
222
|
+
"autoS": {
|
|
223
|
+
"type": "number",
|
|
224
|
+
"exclusiveMinimum": true,
|
|
225
|
+
"minimum": 0
|
|
226
|
+
},
|
|
227
|
+
"teleopS": {
|
|
228
|
+
"type": "number",
|
|
229
|
+
"exclusiveMinimum": true,
|
|
230
|
+
"minimum": 0
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
"required": [
|
|
234
|
+
"autoS",
|
|
235
|
+
"teleopS"
|
|
236
|
+
],
|
|
237
|
+
"additionalProperties": false
|
|
238
|
+
},
|
|
239
|
+
"obstacles": {
|
|
240
|
+
"type": "array",
|
|
241
|
+
"items": {
|
|
242
|
+
"type": "object",
|
|
243
|
+
"properties": {
|
|
244
|
+
"id": {
|
|
245
|
+
"type": "string",
|
|
246
|
+
"minLength": 1
|
|
247
|
+
},
|
|
248
|
+
"kind": {
|
|
249
|
+
"type": "string",
|
|
250
|
+
"const": "box"
|
|
251
|
+
},
|
|
252
|
+
"minXIn": {
|
|
253
|
+
"type": "number"
|
|
254
|
+
},
|
|
255
|
+
"maxXIn": {
|
|
256
|
+
"type": "number"
|
|
257
|
+
},
|
|
258
|
+
"minYIn": {
|
|
259
|
+
"type": "number"
|
|
260
|
+
},
|
|
261
|
+
"maxYIn": {
|
|
262
|
+
"type": "number"
|
|
263
|
+
},
|
|
264
|
+
"minZIn": {
|
|
265
|
+
"type": "number"
|
|
266
|
+
},
|
|
267
|
+
"maxZIn": {
|
|
268
|
+
"type": "number"
|
|
269
|
+
},
|
|
270
|
+
"solidToRobot": {
|
|
271
|
+
"type": "boolean"
|
|
272
|
+
},
|
|
273
|
+
"provenance": {
|
|
274
|
+
"$ref": "#/properties/image/properties/provenance"
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
"required": [
|
|
278
|
+
"id",
|
|
279
|
+
"kind",
|
|
280
|
+
"minXIn",
|
|
281
|
+
"maxXIn",
|
|
282
|
+
"minYIn",
|
|
283
|
+
"maxYIn",
|
|
284
|
+
"minZIn",
|
|
285
|
+
"maxZIn"
|
|
286
|
+
],
|
|
287
|
+
"additionalProperties": false
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
"zones": {
|
|
291
|
+
"type": "array",
|
|
292
|
+
"items": {
|
|
293
|
+
"type": "object",
|
|
294
|
+
"properties": {
|
|
295
|
+
"id": {
|
|
296
|
+
"type": "string",
|
|
297
|
+
"minLength": 1
|
|
298
|
+
},
|
|
299
|
+
"kind": {
|
|
300
|
+
"type": "string",
|
|
301
|
+
"const": "rect"
|
|
302
|
+
},
|
|
303
|
+
"minXIn": {
|
|
304
|
+
"type": "number"
|
|
305
|
+
},
|
|
306
|
+
"maxXIn": {
|
|
307
|
+
"type": "number"
|
|
308
|
+
},
|
|
309
|
+
"minYIn": {
|
|
310
|
+
"type": "number"
|
|
311
|
+
},
|
|
312
|
+
"maxYIn": {
|
|
313
|
+
"type": "number"
|
|
314
|
+
},
|
|
315
|
+
"rule": {
|
|
316
|
+
"type": "string"
|
|
317
|
+
},
|
|
318
|
+
"appliesInAuto": {
|
|
319
|
+
"type": "boolean"
|
|
320
|
+
},
|
|
321
|
+
"provenance": {
|
|
322
|
+
"$ref": "#/properties/image/properties/provenance"
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
"required": [
|
|
326
|
+
"id",
|
|
327
|
+
"kind",
|
|
328
|
+
"minXIn",
|
|
329
|
+
"maxXIn",
|
|
330
|
+
"minYIn",
|
|
331
|
+
"maxYIn"
|
|
332
|
+
],
|
|
333
|
+
"additionalProperties": false
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
"elements": {
|
|
337
|
+
"type": "array",
|
|
338
|
+
"items": {
|
|
339
|
+
"type": "object",
|
|
340
|
+
"properties": {
|
|
341
|
+
"id": {
|
|
342
|
+
"type": "string",
|
|
343
|
+
"minLength": 1
|
|
344
|
+
},
|
|
345
|
+
"kind": {
|
|
346
|
+
"type": "string",
|
|
347
|
+
"minLength": 1
|
|
348
|
+
},
|
|
349
|
+
"container": {
|
|
350
|
+
"type": [
|
|
351
|
+
"string",
|
|
352
|
+
"null"
|
|
353
|
+
]
|
|
354
|
+
},
|
|
355
|
+
"xIn": {
|
|
356
|
+
"type": "number"
|
|
357
|
+
},
|
|
358
|
+
"yIn": {
|
|
359
|
+
"type": "number"
|
|
360
|
+
},
|
|
361
|
+
"radiusIn": {
|
|
362
|
+
"type": "number"
|
|
363
|
+
},
|
|
364
|
+
"holds": {
|
|
365
|
+
"type": "array",
|
|
366
|
+
"items": {
|
|
367
|
+
"type": "string"
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
"provenance": {
|
|
371
|
+
"$ref": "#/properties/image/properties/provenance"
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
"required": [
|
|
375
|
+
"id",
|
|
376
|
+
"kind"
|
|
377
|
+
],
|
|
378
|
+
"additionalProperties": true
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
"targets": {
|
|
382
|
+
"type": "array",
|
|
383
|
+
"items": {
|
|
384
|
+
"type": "object",
|
|
385
|
+
"properties": {
|
|
386
|
+
"id": {
|
|
387
|
+
"type": "string",
|
|
388
|
+
"minLength": 1
|
|
389
|
+
},
|
|
390
|
+
"kind": {
|
|
391
|
+
"type": "string",
|
|
392
|
+
"minLength": 1
|
|
393
|
+
},
|
|
394
|
+
"provenance": {
|
|
395
|
+
"$ref": "#/properties/image/properties/provenance"
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
"required": [
|
|
399
|
+
"id",
|
|
400
|
+
"kind"
|
|
401
|
+
],
|
|
402
|
+
"additionalProperties": true
|
|
403
|
+
}
|
|
404
|
+
},
|
|
405
|
+
"startRules": {
|
|
406
|
+
"type": "object",
|
|
407
|
+
"properties": {
|
|
408
|
+
"touchingWall": {
|
|
409
|
+
"type": "boolean"
|
|
410
|
+
},
|
|
411
|
+
"ownHalf": {
|
|
412
|
+
"type": "boolean"
|
|
413
|
+
},
|
|
414
|
+
"notInZones": {
|
|
415
|
+
"type": "array",
|
|
416
|
+
"items": {
|
|
417
|
+
"type": "string"
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
"notTouchingContainers": {
|
|
421
|
+
"type": "array",
|
|
422
|
+
"items": {
|
|
423
|
+
"type": "string"
|
|
424
|
+
}
|
|
425
|
+
},
|
|
426
|
+
"holds": {
|
|
427
|
+
"type": "object",
|
|
428
|
+
"additionalProperties": {
|
|
429
|
+
"type": "number"
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
"additionalProperties": true
|
|
434
|
+
},
|
|
435
|
+
"rules": {
|
|
436
|
+
"type": "object",
|
|
437
|
+
"properties": {
|
|
438
|
+
"plugin": {
|
|
439
|
+
"type": "string",
|
|
440
|
+
"minLength": 1
|
|
441
|
+
}
|
|
442
|
+
},
|
|
443
|
+
"required": [
|
|
444
|
+
"plugin"
|
|
445
|
+
],
|
|
446
|
+
"additionalProperties": true
|
|
447
|
+
}
|
|
448
|
+
},
|
|
449
|
+
"required": [
|
|
450
|
+
"formatVersion",
|
|
451
|
+
"season",
|
|
452
|
+
"name",
|
|
453
|
+
"frame",
|
|
454
|
+
"sizeIn"
|
|
455
|
+
],
|
|
456
|
+
"additionalProperties": false
|
|
457
|
+
}
|
package/json/link.json
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://libraries.horizon36596.org/zenith/schema/v1/link.json",
|
|
4
|
+
"title": "Zenith link file, formatVersion 1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"$schema": {
|
|
8
|
+
"type": "string"
|
|
9
|
+
},
|
|
10
|
+
"formatVersion": {
|
|
11
|
+
"type": "number",
|
|
12
|
+
"const": 1
|
|
13
|
+
},
|
|
14
|
+
"autosDir": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"minLength": 1
|
|
17
|
+
},
|
|
18
|
+
"robot": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"minLength": 1
|
|
21
|
+
},
|
|
22
|
+
"field": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"minLength": 1
|
|
25
|
+
},
|
|
26
|
+
"waypoints": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"minLength": 1
|
|
29
|
+
},
|
|
30
|
+
"deploy": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"properties": {
|
|
33
|
+
"kind": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"enum": [
|
|
36
|
+
"androidAssets",
|
|
37
|
+
"directory"
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"dir": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"minLength": 1
|
|
43
|
+
},
|
|
44
|
+
"commandLibrary": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"enum": [
|
|
47
|
+
"solverslib",
|
|
48
|
+
"ivy"
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
"robotClass": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"pattern": "^[A-Za-z_$][A-Za-z0-9_$]*(\\.[A-Za-z_$][A-Za-z0-9_$]*)*$"
|
|
54
|
+
},
|
|
55
|
+
"preselectTeleOp": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"minLength": 1
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"required": [
|
|
61
|
+
"kind",
|
|
62
|
+
"dir"
|
|
63
|
+
],
|
|
64
|
+
"additionalProperties": false
|
|
65
|
+
},
|
|
66
|
+
"sim": {
|
|
67
|
+
"type": "object",
|
|
68
|
+
"properties": {
|
|
69
|
+
"command": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"minLength": 1
|
|
72
|
+
},
|
|
73
|
+
"trace": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"minLength": 1
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"required": [
|
|
79
|
+
"command",
|
|
80
|
+
"trace"
|
|
81
|
+
],
|
|
82
|
+
"additionalProperties": false
|
|
83
|
+
},
|
|
84
|
+
"codegen": {
|
|
85
|
+
"type": "object",
|
|
86
|
+
"properties": {
|
|
87
|
+
"package": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"minLength": 1
|
|
90
|
+
},
|
|
91
|
+
"dir": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"minLength": 1
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"required": [
|
|
97
|
+
"package",
|
|
98
|
+
"dir"
|
|
99
|
+
],
|
|
100
|
+
"additionalProperties": false
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"required": [
|
|
104
|
+
"formatVersion",
|
|
105
|
+
"autosDir",
|
|
106
|
+
"robot",
|
|
107
|
+
"field"
|
|
108
|
+
],
|
|
109
|
+
"additionalProperties": false
|
|
110
|
+
}
|