@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.
Files changed (57) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE +18 -0
  3. package/README.md +24 -0
  4. package/dist/auto.d.ts +1882 -0
  5. package/dist/auto.d.ts.map +1 -0
  6. package/dist/auto.js +236 -0
  7. package/dist/auto.js.map +1 -0
  8. package/dist/common.d.ts +76 -0
  9. package/dist/common.d.ts.map +1 -0
  10. package/dist/common.js +30 -0
  11. package/dist/common.js.map +1 -0
  12. package/dist/expr.d.ts +56 -0
  13. package/dist/expr.d.ts.map +1 -0
  14. package/dist/expr.js +245 -0
  15. package/dist/expr.js.map +1 -0
  16. package/dist/field.d.ts +719 -0
  17. package/dist/field.d.ts.map +1 -0
  18. package/dist/field.js +158 -0
  19. package/dist/field.js.map +1 -0
  20. package/dist/ids.d.ts +62 -0
  21. package/dist/ids.d.ts.map +1 -0
  22. package/dist/ids.js +79 -0
  23. package/dist/ids.js.map +1 -0
  24. package/dist/index.d.ts +17 -0
  25. package/dist/index.d.ts.map +1 -0
  26. package/dist/index.js +17 -0
  27. package/dist/index.js.map +1 -0
  28. package/dist/jsonschema.d.ts +14 -0
  29. package/dist/jsonschema.d.ts.map +1 -0
  30. package/dist/jsonschema.js +31 -0
  31. package/dist/jsonschema.js.map +1 -0
  32. package/dist/link.d.ts +117 -0
  33. package/dist/link.d.ts.map +1 -0
  34. package/dist/link.js +58 -0
  35. package/dist/link.js.map +1 -0
  36. package/dist/migrate.d.ts +2699 -0
  37. package/dist/migrate.d.ts.map +1 -0
  38. package/dist/migrate.js +109 -0
  39. package/dist/migrate.js.map +1 -0
  40. package/dist/parse.d.ts +28 -0
  41. package/dist/parse.d.ts.map +1 -0
  42. package/dist/parse.js +46 -0
  43. package/dist/parse.js.map +1 -0
  44. package/dist/robot.d.ts +2935 -0
  45. package/dist/robot.d.ts.map +1 -0
  46. package/dist/robot.js +231 -0
  47. package/dist/robot.js.map +1 -0
  48. package/dist/waypoints.d.ts +63 -0
  49. package/dist/waypoints.d.ts.map +1 -0
  50. package/dist/waypoints.js +20 -0
  51. package/dist/waypoints.js.map +1 -0
  52. package/json/auto.json +683 -0
  53. package/json/field.json +457 -0
  54. package/json/link.json +110 -0
  55. package/json/robot.json +664 -0
  56. package/json/waypoints.json +50 -0
  57. package/package.json +65 -0
@@ -0,0 +1,664 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://libraries.horizon36596.org/zenith/schema/v1/robot.json",
4
+ "title": "Zenith robot file, formatVersion 1",
5
+ "type": "object",
6
+ "properties": {
7
+ "$schema": {
8
+ "type": "string"
9
+ },
10
+ "formatVersion": {
11
+ "type": "number",
12
+ "const": 1
13
+ },
14
+ "name": {
15
+ "type": "string",
16
+ "minLength": 1
17
+ },
18
+ "frame": {
19
+ "type": "object",
20
+ "properties": {
21
+ "forward": {
22
+ "type": "string",
23
+ "enum": [
24
+ "+x",
25
+ "-x",
26
+ "+y",
27
+ "-y"
28
+ ]
29
+ },
30
+ "left": {
31
+ "type": "string",
32
+ "enum": [
33
+ "+x",
34
+ "-x",
35
+ "+y",
36
+ "-y"
37
+ ]
38
+ },
39
+ "headingZero": {
40
+ "type": "string",
41
+ "enum": [
42
+ "+x",
43
+ "+y"
44
+ ]
45
+ },
46
+ "headingPositive": {
47
+ "type": "string",
48
+ "enum": [
49
+ "ccw",
50
+ "cw"
51
+ ]
52
+ }
53
+ },
54
+ "required": [
55
+ "forward",
56
+ "left",
57
+ "headingZero",
58
+ "headingPositive"
59
+ ],
60
+ "additionalProperties": false
61
+ },
62
+ "footprint": {
63
+ "type": "object",
64
+ "properties": {
65
+ "startIn": {
66
+ "type": "object",
67
+ "properties": {
68
+ "lengthIn": {
69
+ "type": "number",
70
+ "exclusiveMinimum": true,
71
+ "minimum": 0
72
+ },
73
+ "widthIn": {
74
+ "type": "number",
75
+ "exclusiveMinimum": true,
76
+ "minimum": 0
77
+ },
78
+ "provenance": {
79
+ "type": "string",
80
+ "minLength": 1
81
+ }
82
+ },
83
+ "required": [
84
+ "lengthIn",
85
+ "widthIn"
86
+ ],
87
+ "additionalProperties": false
88
+ },
89
+ "expandedIn": {
90
+ "$ref": "#/properties/footprint/properties/startIn"
91
+ },
92
+ "centreOfRotationIn": {
93
+ "type": "object",
94
+ "properties": {
95
+ "xIn": {
96
+ "type": "number"
97
+ },
98
+ "yIn": {
99
+ "type": "number"
100
+ },
101
+ "provenance": {
102
+ "$ref": "#/properties/footprint/properties/startIn/properties/provenance"
103
+ }
104
+ },
105
+ "required": [
106
+ "xIn",
107
+ "yIn"
108
+ ],
109
+ "additionalProperties": false
110
+ },
111
+ "heightIn": {
112
+ "type": "object",
113
+ "properties": {
114
+ "value": {
115
+ "type": "number"
116
+ },
117
+ "provenance": {
118
+ "$ref": "#/properties/footprint/properties/startIn/properties/provenance"
119
+ }
120
+ },
121
+ "required": [
122
+ "value"
123
+ ],
124
+ "additionalProperties": false
125
+ }
126
+ },
127
+ "required": [
128
+ "startIn",
129
+ "expandedIn",
130
+ "centreOfRotationIn"
131
+ ],
132
+ "additionalProperties": false
133
+ },
134
+ "heightIn": {
135
+ "anyOf": [
136
+ {
137
+ "$ref": "#/properties/footprint/properties/heightIn"
138
+ },
139
+ {
140
+ "type": "number",
141
+ "exclusiveMinimum": true,
142
+ "minimum": 0
143
+ }
144
+ ]
145
+ },
146
+ "kinematics": {
147
+ "type": "object",
148
+ "properties": {
149
+ "maxForwardVelInPerS": {
150
+ "$ref": "#/properties/footprint/properties/heightIn"
151
+ },
152
+ "maxStrafeVelInPerS": {
153
+ "$ref": "#/properties/footprint/properties/heightIn"
154
+ },
155
+ "forwardDecelInPerS2": {
156
+ "$ref": "#/properties/footprint/properties/heightIn"
157
+ },
158
+ "strafeDecelInPerS2": {
159
+ "$ref": "#/properties/footprint/properties/heightIn"
160
+ },
161
+ "accelInPerS2": {
162
+ "$ref": "#/properties/footprint/properties/heightIn"
163
+ },
164
+ "maxAngularVelRadPerS": {
165
+ "$ref": "#/properties/footprint/properties/heightIn"
166
+ },
167
+ "defaultPathSpeedFraction": {
168
+ "$ref": "#/properties/footprint/properties/heightIn"
169
+ },
170
+ "settleS": {
171
+ "$ref": "#/properties/footprint/properties/heightIn"
172
+ },
173
+ "strafeFractionWarn": {
174
+ "$ref": "#/properties/footprint/properties/heightIn"
175
+ },
176
+ "strafeFractionThreshold": {
177
+ "$ref": "#/properties/footprint/properties/heightIn"
178
+ },
179
+ "sweepSpeedFraction": {
180
+ "$ref": "#/properties/footprint/properties/heightIn"
181
+ },
182
+ "calibration": {
183
+ "type": "object",
184
+ "properties": {
185
+ "band": {
186
+ "type": "number",
187
+ "exclusiveMinimum": true,
188
+ "minimum": 0
189
+ },
190
+ "samples": {
191
+ "type": "integer",
192
+ "minimum": 0
193
+ },
194
+ "provenance": {
195
+ "$ref": "#/properties/footprint/properties/startIn/properties/provenance"
196
+ }
197
+ },
198
+ "required": [
199
+ "band"
200
+ ],
201
+ "additionalProperties": false
202
+ },
203
+ "follower": {
204
+ "type": "object",
205
+ "properties": {
206
+ "library": {
207
+ "type": "string",
208
+ "enum": [
209
+ "pedro"
210
+ ]
211
+ },
212
+ "version": {
213
+ "type": "string",
214
+ "minLength": 1
215
+ },
216
+ "holdEnd": {
217
+ "type": "boolean"
218
+ },
219
+ "forwardTranslationalPowerPerIn": {
220
+ "$ref": "#/properties/footprint/properties/heightIn"
221
+ },
222
+ "strafeTranslationalPowerPerIn": {
223
+ "$ref": "#/properties/footprint/properties/heightIn"
224
+ },
225
+ "headingPowerPerRad": {
226
+ "$ref": "#/properties/footprint/properties/heightIn"
227
+ },
228
+ "headingStaticPower": {
229
+ "$ref": "#/properties/footprint/properties/heightIn"
230
+ },
231
+ "coastPowerPerInPerS": {
232
+ "$ref": "#/properties/footprint/properties/heightIn"
233
+ },
234
+ "coastFeedforwardPowerPerInPerS": {
235
+ "$ref": "#/properties/footprint/properties/heightIn"
236
+ },
237
+ "brakeFeedforwardPowerPerInPerS": {
238
+ "$ref": "#/properties/footprint/properties/heightIn"
239
+ },
240
+ "maxBrakingPower": {
241
+ "$ref": "#/properties/footprint/properties/heightIn"
242
+ },
243
+ "headingDriveRatio": {
244
+ "$ref": "#/properties/footprint/properties/heightIn"
245
+ },
246
+ "brakeAggression": {
247
+ "$ref": "#/properties/footprint/properties/heightIn"
248
+ },
249
+ "brakeLinearForwardS": {
250
+ "$ref": "#/properties/footprint/properties/heightIn"
251
+ },
252
+ "brakeQuadraticForwardS2PerIn": {
253
+ "$ref": "#/properties/footprint/properties/heightIn"
254
+ },
255
+ "brakeLinearStrafeS": {
256
+ "$ref": "#/properties/footprint/properties/heightIn"
257
+ },
258
+ "brakeQuadraticStrafeS2PerIn": {
259
+ "$ref": "#/properties/footprint/properties/heightIn"
260
+ },
261
+ "headingBrakeLinearS": {
262
+ "$ref": "#/properties/footprint/properties/heightIn"
263
+ },
264
+ "headingBrakeQuadraticS2PerRad": {
265
+ "$ref": "#/properties/footprint/properties/heightIn"
266
+ },
267
+ "endParametricT": {
268
+ "$ref": "#/properties/footprint/properties/heightIn"
269
+ },
270
+ "endHeadingToleranceRad": {
271
+ "$ref": "#/properties/footprint/properties/heightIn"
272
+ },
273
+ "endTranslationalToleranceIn": {
274
+ "$ref": "#/properties/footprint/properties/heightIn"
275
+ },
276
+ "endVelocityToleranceInPerS": {
277
+ "$ref": "#/properties/footprint/properties/heightIn"
278
+ },
279
+ "holdTimeoutS": {
280
+ "$ref": "#/properties/footprint/properties/heightIn"
281
+ },
282
+ "headingDeviationToleranceRad": {
283
+ "$ref": "#/properties/footprint/properties/heightIn"
284
+ },
285
+ "translationalDeviationToleranceIn": {
286
+ "$ref": "#/properties/footprint/properties/heightIn"
287
+ },
288
+ "minCorrectionDistanceIn": {
289
+ "$ref": "#/properties/footprint/properties/heightIn"
290
+ },
291
+ "cosineScale": {
292
+ "anyOf": [
293
+ {
294
+ "type": "boolean"
295
+ },
296
+ {
297
+ "type": "object",
298
+ "properties": {
299
+ "value": {
300
+ "type": "boolean"
301
+ },
302
+ "provenance": {
303
+ "$ref": "#/properties/footprint/properties/startIn/properties/provenance"
304
+ }
305
+ },
306
+ "required": [
307
+ "value"
308
+ ],
309
+ "additionalProperties": false
310
+ }
311
+ ]
312
+ },
313
+ "turnBeforeDriving": {
314
+ "$ref": "#/properties/kinematics/properties/follower/properties/cosineScale"
315
+ }
316
+ },
317
+ "required": [
318
+ "library",
319
+ "version",
320
+ "holdEnd"
321
+ ],
322
+ "additionalProperties": false
323
+ },
324
+ "drivetrain": {
325
+ "type": "object",
326
+ "properties": {
327
+ "trackWidthIn": {
328
+ "$ref": "#/properties/footprint/properties/heightIn"
329
+ },
330
+ "wheelBaseIn": {
331
+ "$ref": "#/properties/footprint/properties/heightIn"
332
+ },
333
+ "wheelResponseRatePerS": {
334
+ "$ref": "#/properties/footprint/properties/heightIn"
335
+ }
336
+ },
337
+ "additionalProperties": false
338
+ }
339
+ },
340
+ "required": [
341
+ "maxForwardVelInPerS",
342
+ "maxStrafeVelInPerS",
343
+ "forwardDecelInPerS2",
344
+ "strafeDecelInPerS2",
345
+ "accelInPerS2",
346
+ "maxAngularVelRadPerS",
347
+ "defaultPathSpeedFraction",
348
+ "follower"
349
+ ],
350
+ "additionalProperties": false
351
+ },
352
+ "mouths": {
353
+ "type": "array",
354
+ "items": {
355
+ "type": "object",
356
+ "properties": {
357
+ "id": {
358
+ "type": "string",
359
+ "minLength": 1
360
+ },
361
+ "side": {
362
+ "type": "string",
363
+ "enum": [
364
+ "FRONT",
365
+ "BACK",
366
+ "LEFT",
367
+ "RIGHT"
368
+ ]
369
+ },
370
+ "offsetIn": {
371
+ "type": "object",
372
+ "properties": {
373
+ "xIn": {
374
+ "type": "number"
375
+ },
376
+ "yIn": {
377
+ "type": "number"
378
+ }
379
+ },
380
+ "required": [
381
+ "xIn",
382
+ "yIn"
383
+ ],
384
+ "additionalProperties": false
385
+ },
386
+ "widthIn": {
387
+ "type": "number",
388
+ "exclusiveMinimum": true,
389
+ "minimum": 0
390
+ },
391
+ "depthIn": {
392
+ "type": "number",
393
+ "exclusiveMinimum": true,
394
+ "minimum": 0
395
+ },
396
+ "provenance": {
397
+ "$ref": "#/properties/footprint/properties/startIn/properties/provenance"
398
+ }
399
+ },
400
+ "required": [
401
+ "id",
402
+ "side",
403
+ "offsetIn",
404
+ "widthIn",
405
+ "depthIn"
406
+ ],
407
+ "additionalProperties": false
408
+ }
409
+ },
410
+ "capacity": {
411
+ "type": "object",
412
+ "properties": {
413
+ "elementKind": {
414
+ "type": "string",
415
+ "minLength": 1
416
+ },
417
+ "max": {
418
+ "type": "integer",
419
+ "minimum": 0
420
+ },
421
+ "provenance": {
422
+ "$ref": "#/properties/footprint/properties/startIn/properties/provenance"
423
+ }
424
+ },
425
+ "required": [
426
+ "elementKind",
427
+ "max"
428
+ ],
429
+ "additionalProperties": false
430
+ },
431
+ "shooter": {
432
+ "type": "object",
433
+ "properties": {
434
+ "kind": {
435
+ "type": "string",
436
+ "minLength": 1
437
+ },
438
+ "turretRangeRad": {
439
+ "type": "object",
440
+ "properties": {
441
+ "minRad": {
442
+ "type": "number"
443
+ },
444
+ "maxRad": {
445
+ "type": "number"
446
+ },
447
+ "provenance": {
448
+ "$ref": "#/properties/footprint/properties/startIn/properties/provenance"
449
+ }
450
+ },
451
+ "required": [
452
+ "minRad",
453
+ "maxRad"
454
+ ],
455
+ "additionalProperties": false
456
+ },
457
+ "cadenceS": {
458
+ "type": "object",
459
+ "additionalProperties": {
460
+ "type": [
461
+ "number",
462
+ "string"
463
+ ]
464
+ }
465
+ },
466
+ "settleS": {
467
+ "$ref": "#/properties/footprint/properties/heightIn"
468
+ }
469
+ },
470
+ "required": [
471
+ "kind"
472
+ ],
473
+ "additionalProperties": true
474
+ },
475
+ "commands": {
476
+ "type": "array",
477
+ "items": {
478
+ "type": "object",
479
+ "properties": {
480
+ "name": {
481
+ "type": "string",
482
+ "minLength": 1
483
+ },
484
+ "summary": {
485
+ "type": "string"
486
+ },
487
+ "params": {
488
+ "type": "object",
489
+ "additionalProperties": {
490
+ "anyOf": [
491
+ {
492
+ "type": "object",
493
+ "properties": {
494
+ "type": {
495
+ "type": "string",
496
+ "const": "integer"
497
+ },
498
+ "min": {
499
+ "type": "number"
500
+ },
501
+ "max": {
502
+ "type": "number"
503
+ },
504
+ "default": {
505
+ "type": "number"
506
+ }
507
+ },
508
+ "required": [
509
+ "type"
510
+ ],
511
+ "additionalProperties": false
512
+ },
513
+ {
514
+ "type": "object",
515
+ "properties": {
516
+ "type": {
517
+ "type": "string",
518
+ "const": "number"
519
+ },
520
+ "min": {
521
+ "type": "number"
522
+ },
523
+ "max": {
524
+ "type": "number"
525
+ },
526
+ "default": {
527
+ "type": "number"
528
+ }
529
+ },
530
+ "required": [
531
+ "type"
532
+ ],
533
+ "additionalProperties": false
534
+ },
535
+ {
536
+ "type": "object",
537
+ "properties": {
538
+ "type": {
539
+ "type": "string",
540
+ "const": "enum"
541
+ },
542
+ "values": {
543
+ "type": "array",
544
+ "items": {
545
+ "type": "string",
546
+ "minLength": 1
547
+ },
548
+ "minItems": 1
549
+ },
550
+ "default": {
551
+ "type": "string"
552
+ }
553
+ },
554
+ "required": [
555
+ "type",
556
+ "values"
557
+ ],
558
+ "additionalProperties": false
559
+ },
560
+ {
561
+ "type": "object",
562
+ "properties": {
563
+ "type": {
564
+ "type": "string",
565
+ "const": "boolean"
566
+ },
567
+ "default": {
568
+ "type": "boolean"
569
+ }
570
+ },
571
+ "required": [
572
+ "type"
573
+ ],
574
+ "additionalProperties": false
575
+ },
576
+ {
577
+ "type": "object",
578
+ "properties": {
579
+ "type": {
580
+ "type": "string",
581
+ "const": "string"
582
+ },
583
+ "default": {
584
+ "type": "string"
585
+ }
586
+ },
587
+ "required": [
588
+ "type"
589
+ ],
590
+ "additionalProperties": false
591
+ }
592
+ ]
593
+ }
594
+ },
595
+ "estimateS": {
596
+ "type": "string"
597
+ },
598
+ "requires": {
599
+ "type": "array",
600
+ "items": {
601
+ "type": "string",
602
+ "minLength": 1
603
+ }
604
+ },
605
+ "stationary": {
606
+ "type": "boolean"
607
+ },
608
+ "movesRobot": {
609
+ "type": "boolean"
610
+ },
611
+ "ledger": {
612
+ "type": "object",
613
+ "additionalProperties": {
614
+ "type": [
615
+ "string",
616
+ "number"
617
+ ]
618
+ }
619
+ }
620
+ },
621
+ "required": [
622
+ "name",
623
+ "estimateS"
624
+ ],
625
+ "additionalProperties": false
626
+ }
627
+ },
628
+ "conditions": {
629
+ "type": "array",
630
+ "items": {
631
+ "type": "object",
632
+ "properties": {
633
+ "name": {
634
+ "type": "string",
635
+ "minLength": 1
636
+ },
637
+ "summary": {
638
+ "type": "string"
639
+ },
640
+ "ledger": {
641
+ "type": "string",
642
+ "enum": [
643
+ "full",
644
+ "empty"
645
+ ]
646
+ }
647
+ },
648
+ "required": [
649
+ "name"
650
+ ],
651
+ "additionalProperties": false
652
+ }
653
+ }
654
+ },
655
+ "required": [
656
+ "formatVersion",
657
+ "name",
658
+ "frame",
659
+ "footprint",
660
+ "kinematics",
661
+ "commands"
662
+ ],
663
+ "additionalProperties": false
664
+ }