diff --git a/README.md b/README.md index ee7c1e03..487b8d7d 100644 --- a/README.md +++ b/README.md @@ -59,10 +59,6 @@ Documentation of the core codebase is currently partially included in files. Che * **Nithilan Kalidoss** - *Initial work* - [nithilan4](https://github.com/nithilan4) See also the list of [contributors](https://github.com/HuskieRobotics/SPOT/contributors) who participated in this project. -* **Maaz Zubair** - *Maintanence* - [maaz-zubair-99](https://github.com/maaz-zubair-99) -* **Faiz Muhammad** - *Maintanence* - [faizmuhammad12](https://github.com/faizmuhammad12) -* **Emma Shipley** - *Maintanence* - [emmashipley](https://github.com/emmashipley) - ## License -This project is licensed under the Apache License 2.0 - see the [LICENSE.md](LICENSE) file for details +This project is licensed under the Apache License 2.0 - see the [LICENSE.md](LICENSE) file for details \ No newline at end of file diff --git a/config/analysis-modules.json b/config/analysis-modules.json index 2dddec53..9a20c941 100644 --- a/config/analysis-modules.json +++ b/config/analysis-modules.json @@ -1,224 +1,522 @@ [ { - "view": "team", - "module": "HeatmapScatterPlot", - "name": "Shot Plot", - "position": "main", - "options": { - "coordinatePath": "other.pos", - "aggregatedActionsPath": "aggregatedActions", - "actionGroups": [ - { - "name": "Shots", - "actions": ["upperHub", "lowerHub", "miss"] - } - ], - "actionLabels": { - "upperHub": "Upper", - "lowerHub": "Lower", - "miss": "Miss" - }, - "imgPath": "img/field.svg" - } + "view":"team", + "module":"Stats", + "position":"side", + "name":"Charging Dock Averages", + "options": { + "list":[ + { + "name":"Attempts", + "path":"averages.chargingDock", + "decimals":2, + "sort":1 + }, + { + "name":"Docked", + "path":"averages.platformDocked", + "decimals":2, + "sort":1 + }, + { + "name":"Engaged", + "path":"averages.platformEngaged", + "decimals":2, + "sort":1 + }, + { + "name":"Left", + "path":"averages.platformLeave", + "decimals":2, + "sort":1 + }, + { + "name":"Fell", + "path":"averages.platformFall", + "decimals":2, + "sort":1 + }, + { + "name":"Engage Time", + "path":"dockCycle.averageTime", + "decimals":2, + "sort":-1, + "multiplier":0.001, + "unit":" sec" + } + ] + } }, - { - "view": "team", - "module": "HeatmapScatterPlot", - "name": "Pickup Plot", - "position": "main", - "options": { - "coordinatePath": "other.pos", - "aggregatedActionsPath": "aggregatedActions", - "actionGroups": [ - { - "name": "Pickups", - "actions": ["groundPickup"] - } - ], - "actionLabels": { - "groundPickup": "Ground" - }, - "imgPath": "img/field.svg" + { + "view":"team", + "module":"Stats", + "position":"side", + "name":"Cycle Times", + "options":{ + "list":[ + { + "name":"Overall", + "path":"cycle.averageTime", + "decimals":2, + "sort":-1, + "multiplier":0.001, + "unit":" sec" + },{ + "name":"Cone", + "path":"coneCycle.averageTime", + "decimals":2, + "sort":-1, + "multiplier":0.001, + "unit":" sec" + }, + { + "name":"Cube", + "path":"cubeCycle.averageTime", + "decimals":2, + "sort":-1, + "multiplier":0.001, + "unit":" sec" + } + ] + } + }, + { + "view":"team", + "module": "Pie", + "position":"main", + "name":"Avg Cone Pickups", + "options":{ + "slices":[ + { + "name":"Grid", + "path":"averages.conePickupGrid" + }, + { + "name":"Community", + "path":"averages.conePickupCommunity" + }, + { + "name":"Floor", + "path":"averages.conePickupFloor" + }, + { + "name":"Chute", + "path":"averages.conePickupChute" + }, + { + "name":"Shelf", + "path":"averages.conePickupShelf" } - }, - { - "view": "team", - "module": "PerformanceTimePlot", - "name": "Performance Over Time", - "position": "main", - "options": { - "trackedStats": [ - "scores.auto", - "scores.teleop", - "scores.endgame", - "scores.all", - "accuracy" - ] + ] + } + }, + { + "view":"team", + "module": "Pie", + "position":"main", + "name":"Avg Cube Pickups", + "options":{ + "slices":[ + { + "name":"Grid", + "path":"averages.cubePickupGrid" + }, + { + "name":"Community", + "path":"averages.cubePickupCommunity" + }, + { + "name":"Floor", + "path":"averages.cubePickupFloor" + }, + { + "name":"Chute", + "path":"averages.cubePickupChute" + }, + { + "name":"Shelf", + "path":"averages.cubePickupShelf" } - }, - { - "view": "team", - "module": "Stats", - "position": "side", - "name": "Team Stats", - "options": { - "list": [ - { - "name": "Initiation Cross", - "path": "averages.tarmacCrossTime", - "multiplier": -0.001, - "addend": 150, - "decimals": 2, - "hideIfValue": 150, - "sort": -1, - "unit": "s in" - }, - { - "name": "Climb Start Time", - "path": "averages.startClimbTime", - "multiplier": 0.001, - "decimals": 2, - "hideIfValue": 0, - "sort": -1, - "unit": "s to end" - }, - { - "name": "Climb End Time", - "path": "averages.endClimbTime", - "multiplier": 0.001, - "decimals": 2, - "hideIfValue": 0, - "sort": -1, - "unit": "s to end" - }, - { - "name": "Climb Duration", - "path": "averages.climbDuration", - "multiplier": 0.001, - "decimals": 2, - "hideIfValue": 0, - "sort": -1, - "unit": "s" - }, - { - "name": "Time Per Ball", - "path": "timePerBall", - "multiplier": 0.001, - "decimals": 2, - "hideIfValue": 0, - "sort": -1, - "unit": "s" - }, - { - "name": "Accuracy", - "path": "accuracy", - "multiplier": 100, - "decimals": 1, - "sort": 1, - "unit": "%" - }, - { - "name": "Average Auto Points", - "path": "averageScores.auto", - "decimals": 2, - "sort": 1 - }, - { - "name": "Average Climb Points", - "path": "averageScores.endgame", - "decimals": 2, - "sort": 1 - }, - { - "name": "Average Points", - "path": "averageScores.all", - "decimals": 2, - "sort": 1 - }, - { - "name": "Average Upper Hub Shots", - "path": "averages.upperHub", - "decimals": 2, - "sort": 1 - }, - { - "name": "Average Lower Hub Shots", - "path": "averages.lowerHub", - "decimals": 2, - "sort": 1 - }, - { - "name": "Average Misses", - "path": "averages.miss", - "decimals": 2, - "sort": -1 - } - ] + ] + } + }, + { + "view":"team", + "module":"Grid", + "position":"main", + "name":"Avg Auto Placements", + "options":{ + "rows":3, + "cols":9, + "decimals":2, + "min":0, + "max":1, + "cells":[ + { + "x":1, + "y":1, + "path":"avgAuto.placement31", + "hex":"#f2d53e" + + }, + { + "x":2, + "y":1, + "path":"avgAuto.placement32", + "hex":"#a65de4" + }, + { + "x":3, + "y":1, + "path":"avgAuto.placement33", + "hex":"#f2d53e" + }, + { + "x":4, + "y":1, + "path":"avgAuto.placement34", + "hex":"#f2d53e" + }, + { + "x":5, + "y":1, + "path":"avgAuto.placement35", + "hex":"#a65de4" + }, + { + "x":6, + "y":1, + "path":"avgAuto.placement36", + "hex":"#f2d53e" + }, + { + "x":7, + "y":1, + "path":"avgAuto.placement37", + "hex":"#f2d53e" + }, + { + "x":8, + "y":1, + "path":"avgAuto.placement38", + "hex":"#a65de4" + }, + { + "x":9, + "y":1, + "path":"avgAuto.placement39", + "hex":"#f2d53e" + }, + { + "x":1, + "y":2, + "path":"avgAuto.placement21", + "hex":"#f2d53e" + }, + { + "x":2, + "y":2, + "path":"avgAuto.placement22", + "hex":"#a65de4" + }, + { + "x":3, + "y":2, + "path":"avgAuto.placement23", + "hex":"#f2d53e" + }, + { + "x":4, + "y":2, + "path":"avgAuto.placement24", + "hex":"#f2d53e" + }, + { + "x":5, + "y":2, + "path":"avgAuto.placement25", + "hex":"#a65de4" + }, + { + "x":6, + "y":2, + "path":"avgAuto.placement26", + "hex":"#f2d53e" + }, + { + "x":7, + "y":2, + "path":"avgAuto.placement27", + "hex":"#f2d53e" + }, + { + "x":8, + "y":2, + "path":"avgAuto.placement28", + "hex":"#a65de4" + }, + { + "x":9, + "y":2, + "path":"avgAuto.placement29", + "hex":"#f2d53e" + }, + { + "x":1, + "y":3, + "path":"avgAuto.placement11", + "hex":"#888888" + }, + { + "x":2, + "y":3, + "path":"avgAuto.placement12", + "hex":"#888888" + }, + { + "x":3, + "y":3, + "path":"avgAuto.placement13", + "hex":"#888888" + }, + { + "x":4, + "y":3, + "path":"avgAuto.placement14", + "hex":"#888888" + }, + { + "x":5, + "y":3, + "path":"avgAuto.placement15", + "hex":"#888888" + }, + { + "x":6, + "y":3, + "path":"avgAuto.placement16", + "hex":"#888888" + }, + { + "x":7, + "y":3, + "path":"avgAuto.placement17", + "hex":"#888888" + }, + { + "x":8, + "y":3, + "path":"avgAuto.placement18", + "hex":"#888888" + }, + { + "x":9, + "y":3, + "path":"avgAuto.placement19", + "hex":"#888888" } - }, + ] + } + }, { - "view": "team", - "module": "Pie", - "position": "main", - "name": "Climb Distribution", - "options": { - "slices": [ - { - "name": "No Climb", - "path": "climbLevels.noClimb" - }, - { - "name": "Fall", - "path": "climbLevels.climbF" - }, - { - "name": "Low Rung", - "path": "climbLevels.climb1" - }, - { - "name": "Mid Rung", - "path": "climbLevels.climb2" - }, - { - "name": "High Rung", - "path": "climbLevels.climb3" - }, - { - "name": "Traversal Rung", - "path": "climbLevels.climb4" - } - ] + "view":"team", + "module":"Grid", + "position":"main", + "name":"Avg Teleop Placements", + "options":{ + "rows":3, + "cols":9, + "min":0, + "max":1, + "decimals":2, + "cells":[ + { + "x":1, + "y":1, + "path":"avgTeleop.placement31", + "hex":"#f2d53e" + + }, + { + "x":2, + "y":1, + "path":"avgTeleop.placement32", + "hex":"#a65de4" + }, + { + "x":3, + "y":1, + "path":"avgTeleop.placement33", + "hex":"#f2d53e" + }, + { + "x":4, + "y":1, + "path":"avgTeleop.placement34", + "hex":"#f2d53e" + }, + { + "x":5, + "y":1, + "path":"avgTeleop.placement35", + "hex":"#a65de4" + }, + { + "x":6, + "y":1, + "path":"avgTeleop.placement36", + "hex":"#f2d53e" + }, + { + "x":7, + "y":1, + "path":"avgTeleop.placement37", + "hex":"#f2d53e" + }, + { + "x":8, + "y":1, + "path":"avgTeleop.placement38", + "hex":"#a65de4" + }, + { + "x":9, + "y":1, + "path":"avgTeleop.placement39", + "hex":"#f2d53e" + }, + { + "x":1, + "y":2, + "path":"avgTeleop.placement21", + "hex":"#f2d53e" + }, + { + "x":2, + "y":2, + "path":"avgTeleop.placement22", + "hex":"#a65de4" + }, + { + "x":3, + "y":2, + "path":"avgTeleop.placement23", + "hex":"#f2d53e" + }, + { + "x":4, + "y":2, + "path":"avgTeleop.placement24", + "hex":"#f2d53e" + }, + { + "x":5, + "y":2, + "path":"avgTeleop.placement25", + "hex":"#a65de4" + }, + { + "x":6, + "y":2, + "path":"avgTeleop.placement26", + "hex":"#f2d53e" + }, + { + "x":7, + "y":2, + "path":"avgTeleop.placement27", + "hex":"#f2d53e" + }, + { + "x":8, + "y":2, + "path":"avgTeleop.placement28", + "hex":"#a65de4" + }, + { + "x":9, + "y":2, + "path":"avgTeleop.placement29", + "hex":"#f2d53e" + }, + { + "x":1, + "y":3, + "path":"avgTeleop.placement11", + "hex":"#888888" + }, + { + "x":2, + "y":3, + "path":"avgTeleop.placement12", + "hex":"#888888" + }, + { + "x":3, + "y":3, + "path":"avgTeleop.placement13", + "hex":"#888888" + }, + { + "x":4, + "y":3, + "path":"avgTeleop.placement14", + "hex":"#888888" + }, + { + "x":5, + "y":3, + "path":"avgTeleop.placement15", + "hex":"#888888" + }, + { + "x":6, + "y":3, + "path":"avgTeleop.placement16", + "hex":"#888888" + }, + { + "x":7, + "y":3, + "path":"avgTeleop.placement17", + "hex":"#888888" + }, + { + "x":8, + "y":3, + "path":"avgTeleop.placement18", + "hex":"#888888" + }, + { + "x":9, + "y":3, + "path":"avgTeleop.placement19", + "hex":"#888888" } - }, + ] + } + }, { - "view": "team", - "module": "Pie", - "position": "main", - "name": "Shot Distribution", - "options": { - "slices": [ - { - "name": "Upper Hub", - "path": "counts.upperHub" - }, - { - "name": "Lower Hub", - "path": "counts.lowerHub" - }, - { - "name": "Miss", - "path": "counts.miss" - } - ] - } + "view": "team", + "module": "PerformanceTimePlot", + "name": "Scores Over Time", + "position": "main", + "options": { + "trackedStats": [ + "scores.auto", + "scores.teleop", + "scores.dock", + "scores.total" + ] + } }, - { + { "view": "match", "module": "SingleDisplay", "name": "Alliance Score", "position": "main", "options": { - "path": "averageScores.all", + "path": "averageScores.total", "aggrMethod": "sum", "decimals": 2 } @@ -237,192 +535,429 @@ { "view": "match", "module": "ColumnDisplay", - "name": "Climb Points", - "position": "main", - "options": { - "path": "averageScores.endgame", - "sort": 1, - "decimals": 1 - } - }, - { - "view": "match", - "module": "ColumnDisplay", - "name": "Possible Climbs", - "position": "main", - "options": { - "string": true, - "path": "possibleClimbs" - } - }, - { - "view": "match", - "module": "ColumnDisplay", - "name": "Climb Time", - "position": "main", - "options": { - "path": "averages.climbDuration", - "multiplier": 0.001, - "decimals": 2, - "hideIfValue": 0, - "sort": -1, - "unit": "s" - } - }, - { - "view": "match", - "module": "ColumnDisplay", - "name": "Total Points", + "name": "Dock Points", "position": "main", "options": { - "path": "averageScores.all", + "path": "averageScores.dock", "sort": 1, "decimals": 1 } }, - { - "view": "match", - "module": "ColumnDisplay", - "name": "Time Per Ball", - "position": "main", - "options": { - "path": "timePerBall", - "multiplier": 0.001, - "decimals": 2, - "hideIfValue": 0, - "sort": -1, - "unit": "s" - } - }, - { - "view": "match", - "module": "ColumnDisplay", - "name": "Accuracy", - "position": "main", - "options": { - "path": "accuracy", - "sort": 1, - "decimals": 1, - "multiplier": 100, - "unit": "%" - } - }, - { - "view": "match", - "module": "ColumnDisplay", - "name": "Possible Shots", - "position": "main", - "options": { - "string": true, - "path": "possibleShots" - } - }, - { - "view": "match", - "module": "ColumnDisplay", - "name": "Drivetrain", - "position": "main", - "options": { - "string": true, - "path": "manual.drivetrain" - } - }, - { - "view": "match", - "module": "HeatmapScatterPlot", - "name": "Alliance Shot Plot", - "position": "main", - "options": { - "coordinatePath": "other.pos", - "aggregatedActionsPath": "aggregatedActions", - "actionGroups": [ - { - "name": "Shots", - "actions": ["upperHub", "lowerHub", "miss"] - } - ], - "actionLabels": { - "upperHub": "Upper", - "lowerHub": "Lower", - "miss": "Miss" - }, - "imgPath": "img/field.svg" + + { + "view":"match", + "module": "Pie", + "position":"main", + "name":"Avg Cone Pickups", + "options":{ + "slices":[ + { + "name":"Grid", + "path":"averages.conePickupGrid" + }, + { + "name":"Community", + "path":"averages.conePickupCommunity" + }, + { + "name":"Floor", + "path":"averages.conePickupFloor" + }, + { + "name":"Chute", + "path":"averages.conePickupChute" + }, + { + "name":"Shelf", + "path":"averages.conePickupShelf" } - }, - { - "view": "match", - "module": "HeatmapScatterPlot", - "name": "Alliance Pickup Plot", - "position": "main", - "options": { - "coordinatePath": "other.pos", - "aggregatedActionsPath": "aggregatedActions", - "actionGroups": [ - { - "name": "Pickups", - "actions": ["groundPickup"] - } - ], - "actionLabels": { - "groundPickup": "Ground" - }, - "imgPath": "img/field.svg" + ] + } + }, + { + "view":"match", + "module": "Pie", + "position":"main", + "name":"Avg Cube Pickups", + "options":{ + "slices":[ + { + "name":"Grid", + "path":"averages.cubePickupGrid" + }, + { + "name":"Community", + "path":"averages.cubePickupCommunity" + }, + { + "name":"Floor", + "path":"averages.cubePickupFloor" + }, + { + "name":"Chute", + "path":"averages.cubePickupChute" + }, + { + "name":"Shelf", + "path":"averages.cubePickupShelf" } - }, - { - "view": "match", - "module": "Stats", - "position": "side", - "name": "Alliance Stats", - "options": { - "list": [ - { - "name": "Expected Auto Points", - "path": "averageScores.auto", - "decimals": 2, - "aggrMethod": "sum" - }, - { - "name": "Expected Teleop Points", - "path": "averageScores.teleop", - "decimals": 2, - "aggrMethod": "sum" - }, - { - "name": "Expected Climb Points", - "path": "averageScores.endgame", - "decimals": 2, - "aggrMethod": "sum" - }, - { - "name": "Expected Score", - "path": "averageScores.all", - "decimals": 2, - "aggrMethod": "sum" - } - ] + ] + } + }, + { + "view":"match", + "module":"Grid", + "position":"main", + "name":"Avg Auto Placements", + "options":{ + "rows":3, + "cols":9, + "decimals":2, + "min":0, + "max":1, + "cells":[ + { + "x":1, + "y":1, + "path":"avgAuto.placement31", + "hex":"#f2d53e" + + }, + { + "x":2, + "y":1, + "path":"avgAuto.placement32", + "hex":"#a65de4" + }, + { + "x":3, + "y":1, + "path":"avgAuto.placement33", + "hex":"#f2d53e" + }, + { + "x":4, + "y":1, + "path":"avgAuto.placement34", + "hex":"#f2d53e" + }, + { + "x":5, + "y":1, + "path":"avgAuto.placement35", + "hex":"#a65de4" + }, + { + "x":6, + "y":1, + "path":"avgAuto.placement36", + "hex":"#f2d53e" + }, + { + "x":7, + "y":1, + "path":"avgAuto.placement37", + "hex":"#f2d53e" + }, + { + "x":8, + "y":1, + "path":"avgAuto.placement38", + "hex":"#a65de4" + }, + { + "x":9, + "y":1, + "path":"avgAuto.placement39", + "hex":"#f2d53e" + }, + { + "x":1, + "y":2, + "path":"avgAuto.placement21", + "hex":"#f2d53e" + }, + { + "x":2, + "y":2, + "path":"avgAuto.placement22", + "hex":"#a65de4" + }, + { + "x":3, + "y":2, + "path":"avgAuto.placement23", + "hex":"#f2d53e" + }, + { + "x":4, + "y":2, + "path":"avgAuto.placement24", + "hex":"#f2d53e" + }, + { + "x":5, + "y":2, + "path":"avgAuto.placement25", + "hex":"#a65de4" + }, + { + "x":6, + "y":2, + "path":"avgAuto.placement26", + "hex":"#f2d53e" + }, + { + "x":7, + "y":2, + "path":"avgAuto.placement27", + "hex":"#f2d53e" + }, + { + "x":8, + "y":2, + "path":"avgAuto.placement28", + "hex":"#a65de4" + }, + { + "x":9, + "y":2, + "path":"avgAuto.placement29", + "hex":"#f2d53e" + }, + { + "x":1, + "y":3, + "path":"avgAuto.placement11", + "hex":"#888888" + }, + { + "x":2, + "y":3, + "path":"avgAuto.placement12", + "hex":"#888888" + }, + { + "x":3, + "y":3, + "path":"avgAuto.placement13", + "hex":"#888888" + }, + { + "x":4, + "y":3, + "path":"avgAuto.placement14", + "hex":"#888888" + }, + { + "x":5, + "y":3, + "path":"avgAuto.placement15", + "hex":"#888888" + }, + { + "x":6, + "y":3, + "path":"avgAuto.placement16", + "hex":"#888888" + }, + { + "x":7, + "y":3, + "path":"avgAuto.placement17", + "hex":"#888888" + }, + { + "x":8, + "y":3, + "path":"avgAuto.placement18", + "hex":"#888888" + }, + { + "x":9, + "y":3, + "path":"avgAuto.placement19", + "hex":"#888888" } - }, + ] + } + }, { - "view": "match", - "module": "Pie", - "position": "main", - "name": "Shot Distribution", - "options": { - "slices": [ - { - "name": "Upper Hub", - "path": "averages.upperHub" - }, - { - "name": "Lower Hub", - "path": "averages.lowerHub" - }, - { - "name": "Miss", - "path": "averages.miss" - } - ] + "view":"match", + "module":"Grid", + "position":"main", + "name":"Avg Teleop Placements", + "options":{ + "rows":3, + "cols":9, + "min":0, + "max":1, + "decimals":2, + "cells":[ + { + "x":1, + "y":1, + "path":"avgTeleop.placement31", + "hex":"#f2d53e" + + }, + { + "x":2, + "y":1, + "path":"avgTeleop.placement32", + "hex":"#a65de4" + }, + { + "x":3, + "y":1, + "path":"avgTeleop.placement33", + "hex":"#f2d53e" + }, + { + "x":4, + "y":1, + "path":"avgTeleop.placement34", + "hex":"#f2d53e" + }, + { + "x":5, + "y":1, + "path":"avgTeleop.placement35", + "hex":"#a65de4" + }, + { + "x":6, + "y":1, + "path":"avgTeleop.placement36", + "hex":"#f2d53e" + }, + { + "x":7, + "y":1, + "path":"avgTeleop.placement37", + "hex":"#f2d53e" + }, + { + "x":8, + "y":1, + "path":"avgTeleop.placement38", + "hex":"#a65de4" + }, + { + "x":9, + "y":1, + "path":"avgTeleop.placement39", + "hex":"#f2d53e" + }, + { + "x":1, + "y":2, + "path":"avgTeleop.placement21", + "hex":"#f2d53e" + }, + { + "x":2, + "y":2, + "path":"avgTeleop.placement22", + "hex":"#a65de4" + }, + { + "x":3, + "y":2, + "path":"avgTeleop.placement23", + "hex":"#f2d53e" + }, + { + "x":4, + "y":2, + "path":"avgTeleop.placement24", + "hex":"#f2d53e" + }, + { + "x":5, + "y":2, + "path":"avgTeleop.placement25", + "hex":"#a65de4" + }, + { + "x":6, + "y":2, + "path":"avgTeleop.placement26", + "hex":"#f2d53e" + }, + { + "x":7, + "y":2, + "path":"avgTeleop.placement27", + "hex":"#f2d53e" + }, + { + "x":8, + "y":2, + "path":"avgTeleop.placement28", + "hex":"#a65de4" + }, + { + "x":9, + "y":2, + "path":"avgTeleop.placement29", + "hex":"#f2d53e" + }, + { + "x":1, + "y":3, + "path":"avgTeleop.placement11", + "hex":"#888888" + }, + { + "x":2, + "y":3, + "path":"avgTeleop.placement12", + "hex":"#888888" + }, + { + "x":3, + "y":3, + "path":"avgTeleop.placement13", + "hex":"#888888" + }, + { + "x":4, + "y":3, + "path":"avgTeleop.placement14", + "hex":"#888888" + }, + { + "x":5, + "y":3, + "path":"avgTeleop.placement15", + "hex":"#888888" + }, + { + "x":6, + "y":3, + "path":"avgTeleop.placement16", + "hex":"#888888" + }, + { + "x":7, + "y":3, + "path":"avgTeleop.placement17", + "hex":"#888888" + }, + { + "x":8, + "y":3, + "path":"avgTeleop.placement18", + "hex":"#888888" + }, + { + "x":9, + "y":3, + "path":"avgTeleop.placement19", + "hex":"#888888" } + ] } + } ] \ No newline at end of file diff --git a/config/analysis-modules2.json b/config/analysis-modules2.json new file mode 100644 index 00000000..2dddec53 --- /dev/null +++ b/config/analysis-modules2.json @@ -0,0 +1,428 @@ +[ + { + "view": "team", + "module": "HeatmapScatterPlot", + "name": "Shot Plot", + "position": "main", + "options": { + "coordinatePath": "other.pos", + "aggregatedActionsPath": "aggregatedActions", + "actionGroups": [ + { + "name": "Shots", + "actions": ["upperHub", "lowerHub", "miss"] + } + ], + "actionLabels": { + "upperHub": "Upper", + "lowerHub": "Lower", + "miss": "Miss" + }, + "imgPath": "img/field.svg" + } + }, + { + "view": "team", + "module": "HeatmapScatterPlot", + "name": "Pickup Plot", + "position": "main", + "options": { + "coordinatePath": "other.pos", + "aggregatedActionsPath": "aggregatedActions", + "actionGroups": [ + { + "name": "Pickups", + "actions": ["groundPickup"] + } + ], + "actionLabels": { + "groundPickup": "Ground" + }, + "imgPath": "img/field.svg" + } + }, + { + "view": "team", + "module": "PerformanceTimePlot", + "name": "Performance Over Time", + "position": "main", + "options": { + "trackedStats": [ + "scores.auto", + "scores.teleop", + "scores.endgame", + "scores.all", + "accuracy" + ] + } + }, + { + "view": "team", + "module": "Stats", + "position": "side", + "name": "Team Stats", + "options": { + "list": [ + { + "name": "Initiation Cross", + "path": "averages.tarmacCrossTime", + "multiplier": -0.001, + "addend": 150, + "decimals": 2, + "hideIfValue": 150, + "sort": -1, + "unit": "s in" + }, + { + "name": "Climb Start Time", + "path": "averages.startClimbTime", + "multiplier": 0.001, + "decimals": 2, + "hideIfValue": 0, + "sort": -1, + "unit": "s to end" + }, + { + "name": "Climb End Time", + "path": "averages.endClimbTime", + "multiplier": 0.001, + "decimals": 2, + "hideIfValue": 0, + "sort": -1, + "unit": "s to end" + }, + { + "name": "Climb Duration", + "path": "averages.climbDuration", + "multiplier": 0.001, + "decimals": 2, + "hideIfValue": 0, + "sort": -1, + "unit": "s" + }, + { + "name": "Time Per Ball", + "path": "timePerBall", + "multiplier": 0.001, + "decimals": 2, + "hideIfValue": 0, + "sort": -1, + "unit": "s" + }, + { + "name": "Accuracy", + "path": "accuracy", + "multiplier": 100, + "decimals": 1, + "sort": 1, + "unit": "%" + }, + { + "name": "Average Auto Points", + "path": "averageScores.auto", + "decimals": 2, + "sort": 1 + }, + { + "name": "Average Climb Points", + "path": "averageScores.endgame", + "decimals": 2, + "sort": 1 + }, + { + "name": "Average Points", + "path": "averageScores.all", + "decimals": 2, + "sort": 1 + }, + { + "name": "Average Upper Hub Shots", + "path": "averages.upperHub", + "decimals": 2, + "sort": 1 + }, + { + "name": "Average Lower Hub Shots", + "path": "averages.lowerHub", + "decimals": 2, + "sort": 1 + }, + { + "name": "Average Misses", + "path": "averages.miss", + "decimals": 2, + "sort": -1 + } + ] + } + }, + { + "view": "team", + "module": "Pie", + "position": "main", + "name": "Climb Distribution", + "options": { + "slices": [ + { + "name": "No Climb", + "path": "climbLevels.noClimb" + }, + { + "name": "Fall", + "path": "climbLevels.climbF" + }, + { + "name": "Low Rung", + "path": "climbLevels.climb1" + }, + { + "name": "Mid Rung", + "path": "climbLevels.climb2" + }, + { + "name": "High Rung", + "path": "climbLevels.climb3" + }, + { + "name": "Traversal Rung", + "path": "climbLevels.climb4" + } + ] + } + }, + { + "view": "team", + "module": "Pie", + "position": "main", + "name": "Shot Distribution", + "options": { + "slices": [ + { + "name": "Upper Hub", + "path": "counts.upperHub" + }, + { + "name": "Lower Hub", + "path": "counts.lowerHub" + }, + { + "name": "Miss", + "path": "counts.miss" + } + ] + } + }, + { + "view": "match", + "module": "SingleDisplay", + "name": "Alliance Score", + "position": "main", + "options": { + "path": "averageScores.all", + "aggrMethod": "sum", + "decimals": 2 + } + }, + { + "view": "match", + "module": "ColumnDisplay", + "name": "Auto Points", + "position": "main", + "options": { + "path": "averageScores.auto", + "sort": 1, + "decimals": 1 + } + }, + { + "view": "match", + "module": "ColumnDisplay", + "name": "Climb Points", + "position": "main", + "options": { + "path": "averageScores.endgame", + "sort": 1, + "decimals": 1 + } + }, + { + "view": "match", + "module": "ColumnDisplay", + "name": "Possible Climbs", + "position": "main", + "options": { + "string": true, + "path": "possibleClimbs" + } + }, + { + "view": "match", + "module": "ColumnDisplay", + "name": "Climb Time", + "position": "main", + "options": { + "path": "averages.climbDuration", + "multiplier": 0.001, + "decimals": 2, + "hideIfValue": 0, + "sort": -1, + "unit": "s" + } + }, + { + "view": "match", + "module": "ColumnDisplay", + "name": "Total Points", + "position": "main", + "options": { + "path": "averageScores.all", + "sort": 1, + "decimals": 1 + } + }, + { + "view": "match", + "module": "ColumnDisplay", + "name": "Time Per Ball", + "position": "main", + "options": { + "path": "timePerBall", + "multiplier": 0.001, + "decimals": 2, + "hideIfValue": 0, + "sort": -1, + "unit": "s" + } + }, + { + "view": "match", + "module": "ColumnDisplay", + "name": "Accuracy", + "position": "main", + "options": { + "path": "accuracy", + "sort": 1, + "decimals": 1, + "multiplier": 100, + "unit": "%" + } + }, + { + "view": "match", + "module": "ColumnDisplay", + "name": "Possible Shots", + "position": "main", + "options": { + "string": true, + "path": "possibleShots" + } + }, + { + "view": "match", + "module": "ColumnDisplay", + "name": "Drivetrain", + "position": "main", + "options": { + "string": true, + "path": "manual.drivetrain" + } + }, + { + "view": "match", + "module": "HeatmapScatterPlot", + "name": "Alliance Shot Plot", + "position": "main", + "options": { + "coordinatePath": "other.pos", + "aggregatedActionsPath": "aggregatedActions", + "actionGroups": [ + { + "name": "Shots", + "actions": ["upperHub", "lowerHub", "miss"] + } + ], + "actionLabels": { + "upperHub": "Upper", + "lowerHub": "Lower", + "miss": "Miss" + }, + "imgPath": "img/field.svg" + } + }, + { + "view": "match", + "module": "HeatmapScatterPlot", + "name": "Alliance Pickup Plot", + "position": "main", + "options": { + "coordinatePath": "other.pos", + "aggregatedActionsPath": "aggregatedActions", + "actionGroups": [ + { + "name": "Pickups", + "actions": ["groundPickup"] + } + ], + "actionLabels": { + "groundPickup": "Ground" + }, + "imgPath": "img/field.svg" + } + }, + { + "view": "match", + "module": "Stats", + "position": "side", + "name": "Alliance Stats", + "options": { + "list": [ + { + "name": "Expected Auto Points", + "path": "averageScores.auto", + "decimals": 2, + "aggrMethod": "sum" + }, + { + "name": "Expected Teleop Points", + "path": "averageScores.teleop", + "decimals": 2, + "aggrMethod": "sum" + }, + { + "name": "Expected Climb Points", + "path": "averageScores.endgame", + "decimals": 2, + "aggrMethod": "sum" + }, + { + "name": "Expected Score", + "path": "averageScores.all", + "decimals": 2, + "aggrMethod": "sum" + } + ] + } + }, + { + "view": "match", + "module": "Pie", + "position": "main", + "name": "Shot Distribution", + "options": { + "slices": [ + { + "name": "Upper Hub", + "path": "averages.upperHub" + }, + { + "name": "Lower Hub", + "path": "averages.lowerHub" + }, + { + "name": "Miss", + "path": "averages.miss" + } + ] + } + } +] \ No newline at end of file diff --git a/config/analysis-pipeline.json b/config/analysis-pipeline.json index d0b67b74..bdbbb9b9 100644 --- a/config/analysis-pipeline.json +++ b/config/analysis-pipeline.json @@ -1,415 +1,487 @@ [ - { - "type": "tmp", - "name": "countActions", - "outputPath": "counts", - "options": { - "all": true - } - }, - { - "type": "team", - "name": "countActions", - "outputPath": "counts", - "options": { - "all": true - } - }, - { - "type": "team", - "name": "sum", - "outputPath": "counts.balls", - "options": { - "addends": [ - "counts.upperHub", - "counts.lowerHub", - "counts.miss" - ] - } - }, - - { - "type": "team", - "name": "aggregateArray", - "outputPath": "aggregatedActions", - "options": { - "path": "actionQueue" - } - }, - - { + { + "type": "tmp", + "name": "countActions", + "outputPath": "counts", + "options": { + "all": true + } + }, + { + "type": "team", + "name": "countActions", + "outputPath": "counts", + "options": { + "all": true + } + }, + { + "type": "team", + "name": "sum", + "outputPath": "counts.totalScored", + "options":{ + "addends":[ + "counts.placement11", + "counts.placement12", + "counts.placement13", + "counts.placement14", + "counts.placement15", + "counts.placement16", + "counts.placement17", + "counts.placement18", + "counts.placement19", + "counts.placement21", + "counts.placement22", + "counts.placement23", + "counts.placement24", + "counts.placement25", + "counts.placement26", + "counts.placement27", + "counts.placement28", + "counts.placement29", + "counts.placement31", + "counts.placement32", + "counts.placement33", + "counts.placement34", + "counts.placement35", + "counts.placement36", + "counts.placement37", + "counts.placement38", + "counts.placement39" + ] + } + }, + { + "type":"tmp", + "name":"countHybrid", + "outputPath": "counts.hybrid", + "options":{ + "pickup":["conePickupGrid","conePickupCommunity","conePickupFloor","conePickupChute","conePickupShelf","cubePickupGrid","cubePickupCommunity","cubePickupFloor","cubePickupChute","cubePickupShelf"], + "hybrid":["placement11","placement12","placement13","placement14","placement15","placement16","placement17","placement18","placement19"] + } + }, + { "type": "team", "name": "countMatches", "outputPath": "temp.totalTimeMs", "options": { "weight": 150000 } - }, - { - "type": "team", - "name": "ratio", - "outputPath": "timePerBall", - "options": { - "numerator": ["temp.totalTimeMs"], - "denominator": ["counts.balls"] - }, - "divByZero": 150000 - }, - - { - "type": "tmp", - "name": "cycle", - "outputPath": "cycle", - "options": { - "pickups": [ - "groundPickup" - ], - "scores": [ - "upperHub", - "lowerHub" - ], - "misses": [ - "miss" - ] - } - }, - { + }, + { + "type": "team", + "name": "aggregateArray", + "outputPath": "aggregatedActions", + "options": { + "path": "actionQueue" + } + }, + { + "type": "team", + "name": "average", + "outputPath": "averages", + "options": { + "path": "counts" + } + }, + { + "type":"tmp", + "name":"actionTimeFilter", + "outputPath":"autoFilter", + "options":{ + "timeMin":135000 + } + }, + { + "type":"tmp", + "name":"actionTimeFilter", + "outputPath":"teleopFilter", + "options":{ + "timeMax":135000 + } + }, + { + "type":"tmp", + "name":"countActions", + "outputPath":"countsAuto", + "options":{ + "all":true, + "actionArrayPath":"autoFilter" + } + }, + { + "type":"tmp", + "name":"countActions", + "outputPath":"countsTeleop", + "options":{ + "all":true, + "actionArrayPath":"teleopFilter" + } + }, + { + "type":"tmp", + "name":"countHybrid", + "outputPath":"autoCounts.hybrid", + "options":{ + "pickup":["conePickupGrid","conePickupCommunity","conePickupFloor","conePickupChute","conePickupShelf","cubePickupGrid","cubePickupCommunity","cubePickupFloor","cubePickupChute","cubePickupShelf"], + "hybrid":["placement11","placement12","placement13","placement14","placement15","placement16","placement17","placement18","placement19"], + "actionArrayPath":"autoFilter" + } + }, + { + "type":"tmp", + "name":"countHybrid", + "outputPath":"teleopCounts.hybrid", + "options":{ + "pickup":["conePickupGrid","conePickupCommunity","conePickupFloor","conePickupChute","conePickupShelf","cubePickupGrid","cubePickupCommunity","cubePickupFloor","cubePickupChute","cubePickupShelf"], + "hybrid":["placement11","placement12","placement13","placement14","placement15","placement16","placement17","placement18","placement19"], + "actionArrayPath":"teleopFilter" + } + }, + { + "type":"tmp", + "name":"weightedSum", + "outputPath":"scores.auto", + "options":{ + "weightedPaths":{ + "countsAuto.placement31":6, + "countsAuto.placement32":6, + "countsAuto.placement33":6, + "countsAuto.placement34":6, + "countsAuto.placement35":6, + "countsAuto.placement36":6, + "countsAuto.placement37":6, + "countsAuto.placement38":6, + "countsAuto.placement39":6, + "countsAuto.placement21":4, + "countsAuto.placement22":4, + "countsAuto.placement23":4, + "countsAuto.placement24":4, + "countsAuto.placement25":4, + "countsAuto.placement26":4, + "countsAuto.placement27":4, + "countsAuto.placement28":4, + "countsAuto.placement29":4, + "autoCounts.hybrid.conePickupGrid":3, + "autoCounts.hybrid.conePickupCommunity":3, + "autoCounts.hybrid.conePickupFloor":3, + "autoCounts.hybrid.conePickupChute":3, + "autoCounts.hybrid.conePickupPlatform":3, + "autoCounts.hybrid.cubePickupGrid":3, + "autoCounts.hybrid.cubePickupCommunity":3, + "autoCounts.hybrid.cubePickupFloor":3, + "autoCounts.hybrid.cubePickupChute":3, + "autoCounts.hybrid.cubePickupPlatform":3 + } + } + }, + { + "type":"tmp", + "name":"weightedSum", + "outputPath":"scores.teleop", + "options":{ + "weightedPaths":{ + "countsTeleop.placement31":5, + "countsTeleop.placement32":5, + "countsTeleop.placement33":5, + "countsTeleop.placement34":5, + "countsTeleop.placement35":5, + "countsTeleop.placement36":5, + "countsTeleop.placement37":5, + "countsTeleop.placement38":5, + "countsTeleop.placement39":5, + "countsTeleop.placement21":3, + "countsTeleop.placement22":3, + "countsTeleop.placement23":3, + "countsTeleop.placement24":3, + "countsTeleop.placement25":3, + "countsTeleop.placement26":3, + "countsTeleop.placement27":3, + "countsTeleop.placement28":3, + "countsTeleop.placement29":3, + "teleopCounts.hybrid.conePickupGrid":2, + "teleopCounts.hybrid.conePickupCommunity":2, + "teleopCounts.hybrid.conePickupFloor":2, + "teleopCounts.hybrid.conePickupChute":2, + "teleopCounts.hybrid.conePickupPlatform":2, + "teleopCounts.hybrid.cubePickupGrid":2, + "teleopCounts.hybrid.cubePickupCommunity":2, + "teleopCounts.hybrid.cubePickupFloor":2, + "teleopCounts.hybrid.cubePickupChute":2, + "teleopCounts.hybrid.cubePickupPlatform":2 + } + } + }, + { + "type":"team", + "name":"average", + "outputPath":"avgAuto", + "options":{ + "path":"countsAuto" + } + }, + { + "type":"team", + "name":"average", + "outputPath":"avgTeleop", + "options":{ + "path":"countsTeleop" + } + }, + { + "type":"tmp", + "name":"cycle", + "outputPath":"dockCycle", + "options":{ + "pickups":[ + "platformDocked" + ], + "scores":[ + "platformEngaged" + ], + "misses":[ + "platformLeave", + "platformFall" + ] + } + }, + { "type": "team", "name": "aggregateArray", - "outputPath": "cycle.all", + "outputPath": "dockCycle.all", "options": { - "path": "cycle.all" + "path": "dockCycle.all" } }, - { + { "type": "team", "name": "aggregateArray", - "outputPath": "cycle.allComplete", + "outputPath": "dockCycle.allComplete", "options": { - "path": "cycle.allComplete" + "path": "dockCycle.allComplete" } }, - { + { "type": "team", "name": "averageArray", - "outputPath": "cycle.averageTime", + "outputPath": "dockCycle.averageTime", "options": { - "arrayPath": "cycle.all", + "arrayPath": "dockCycle.all", "valuePath": "timeDifferential" } }, - { + { "type": "team", "name": "averageArray", - "outputPath": "cycle.averageTimeComplete", + "outputPath": "dockCycle.averageTimeComplete", "options": { - "arrayPath": "cycle.allComplete", + "arrayPath": "dockCycle.allComplete", "valuePath": "timeDifferential" } - }, - { - "type": "team", - "name": "average", - "outputPath": "averages", - "options": { - "path": "counts" + }, + { + "type": "tmp", + "name": "finalActionOccurence", + "outputPath": "finalAutoDock", + "options": { + "actionArrayPath": "autoFilter", + "ids":[ + "platformFall", + "platformEngaged", + "platformLeave", + "platformDocked" + ], + "default": { + "id": "noDock", + "ts": 0 + } } - }, - - { - "type": "tmp", - "name": "ratio", - "outputPath": "accuracy", - "options": { - "numerator": [ - "counts.lowerHub", - "counts.upperHub" - ], - "denominator": [ - "counts.lowerHub", - "counts.upperHub", - "counts.miss" - ], - "divByZero": 0 + }, + { + "type": "tmp", + "name": "finalActionOccurence", + "outputPath": "finalTeleopDock", + "options": { + "actionArrayPath": "teleopFilter", + "ids":[ + "platformFall", + "platformEngaged", + "platformLeave", + "platformDocked" + ], + "default": { + "id": "noDock", + "ts": 0 + } } - }, - { + }, + { + "type": "tmp", + "name": "map", + "outputPath": "scores.autoDock", + "options": { + "path":"finalAutoDock.id", + "map":{ + "noDock":0, + "platformDock":8, + "platformEngaged":12, + "platformFall":0, + "platformLeave":0 + } + } + }, + { + "type": "tmp", + "name": "map", + "outputPath": "scores.teleopDock", + "options": { + "path":"finalTeleopDock.id", + "map":{ + "noDock":0, + "platformDock":6, + "platformEngaged":10, + "platformFall":0, + "platformLeave":0 + } + } + }, + { + "type":"tmp", + "name":"sum", + "outputPath":"scores.dock", + "options":{ + "addends":["scores.autoDock","scores.teleopDock"] + } + }, + { + "type":"tmp", + "name":"sum", + "outputPath":"scores.total", + "options":{ + "addends":["scores.auto","scores.teleop","scores.dock"] + } + }, + { + "type":"tmp", + "name":"cycle", + "outputPath":"coneCycle", + "options":{ + "pickups":["conePickupGrid","conePickupCommunity","conePickupFloor","conePickupChute","conePickupShelf"], + "scores":["placement31","placement21","placement33","placement23","placement34","placement24","placement36","placement26","placement37","placement27","placement39","placement29","counts.hybrid.conePickupGrid","counts.hybrid.conePickupCommunity","counts.hybrid.conePickupFloor","counts.hybrid.conePickupChute","counts.hybrid.conePickupPlatform"], + "misses":["dropCone"] + } + }, + { "type": "team", - "name": "ratio", - "outputPath": "accuracy", - "options": { - "numerator": [ - "counts.lowerHub", - "counts.upperHub" - ], - "denominator": [ - "counts.lowerHub", - "counts.upperHub", - "counts.miss" - ], - "divByZero": 0 - } - }, - - - - { - "type": "tmp", - "name": "actionTime", - "outputPath": "tarmacCrossTime", + "name": "aggregateArray", + "outputPath": "coneCycle.all", "options": { - "actionId": "leaveTarmac" + "path": "coneCycle.all" } }, - { + { "type": "team", - "name": "average", - "outputPath": "averages.tarmacCrossTime", - "options": { - "path": "tarmacCrossTime" - } - }, - { - "type": "tmp", - "name": "actionTime", - "outputPath": "startClimbTime", + "name": "aggregateArray", + "outputPath": "coneCycle.allComplete", "options": { - "actionId": "startClimb" + "path": "coneCycle.allComplete" } }, - { + { "type": "team", - "name": "average", - "outputPath": "averages.startClimbTime", - "options": { - "path": "startClimbTime" - } - }, - { - "type": "tmp", - "name": "actionTimeFilter", - "outputPath": "autoActions", - "options": { - "timeMin": 131000 - } - }, - { - "type": "tmp", - "name": "countActions", - "outputPath": "countsAuto", - "options": { - "all": true, - "actionArrayPath": "autoActions" - } - }, - { - "type": "tmp", - "name": "weightedSum", - "outputPath": "scores.auto", - "options": { - "weightedPaths": { - "countsAuto.leaveTarmac": 2, - "countsAuto.lowerHub": 2, - "countsAuto.upperHub": 4 - } - } - }, - - { - "type": "tmp", - "name": "actionTimeFilter", - "outputPath": "teleopActions", - "options": { - "timeMax": 131000 - } - }, - { - "type": "tmp", - "name": "countActions", - "outputPath": "countsTeleop", - "options": { - "all": true, - "actionArrayPath": "teleopActions" - } - }, - { - "type": "tmp", - "name": "weightedSum", - "outputPath": "scores.teleop", - "options": { - "weightedPaths": { - "countsTeleop.lowerHub": 1, - "countsTeleop.upperHub": 2 - } - } - }, - - { - "type": "tmp", - "name": "finalActionOccurence", - "outputPath": "finalClimbState", - "options": { - "ids": ["climb1","climb2","climb3","climb4","climbF"], - "default": { - "id": "noClimb", - "ts": 0 - } - } - }, - - { - "type": "tmp", - "name": "map", - "outputPath": "climbCounts.noClimb", - "options": { - "path": "finalClimbState.id", - "map": { - "noClimb": 1, - "climbF": 0, - "climb1": 0, - "climb2": 0, - "climb3": 0, - "climb4": 0 - } - } - }, - { - "type": "tmp", - "name": "map", - "outputPath": "climbCounts.climbF", + "name": "averageArray", + "outputPath": "coneCycle.averageTime", "options": { - "path": "finalClimbState.id", - "map": { - "noClimb": 0, - "climbF": 1, - "climb1": 0, - "climb2": 0, - "climb3": 0, - "climb4": 0 - } + "arrayPath": "coneCycle.all", + "valuePath": "timeDifferential" } }, - { - "type": "tmp", - "name": "map", - "outputPath": "climbCounts.climb1", + { + "type":"tmp", + "name":"cycle", + "outputPath":"cubeCycle", + "options":{ + "pickups":["cubePickupGrid","cubePickupCommunity","cubePickupFloor","cubePickupChute","cubePickupShelf","conePickupGrid","conePickupCommunity","conePickupFloor","conePickupChute","conePickupShelf"], + "scores":["placement32","placement22","placement35","placement25","placement38","placement28","counts.hybrid.cubePickupGrid","counts.hybrid.cubePickupCommunity","counts.hybrid.cubePickupFloor","counts.hybrid.cubePickupChute","counts.hybrid.cubePickupPlatform"], + "misses":["dropCube"] + } + }, + { + "type": "team", + "name": "aggregateArray", + "outputPath": "cubeCycle.all", "options": { - "path": "finalClimbState.id", - "map": { - "noClimb": 0, - "climbF": 0, - "climb1": 1, - "climb2": 0, - "climb3": 0, - "climb4": 0 - } + "path": "cubeCycle.all" } }, - { - "type": "tmp", - "name": "map", - "outputPath": "climbCounts.climb2", + { + "type": "team", + "name": "aggregateArray", + "outputPath": "cubeCycle.allComplete", "options": { - "path": "finalClimbState.id", - "map": { - "noClimb": 0, - "climbF": 0, - "climb1": 0, - "climb2": 1, - "climb3": 0, - "climb4": 0 - } + "path": "cubeCycle.allComplete" } }, - { - "type": "tmp", - "name": "map", - "outputPath": "climbCounts.climb3", + { + "type": "team", + "name": "averageArray", + "outputPath": "cubeCycle.averageTime", "options": { - "path": "finalClimbState.id", - "map": { - "noClimb": 0, - "climbF": 0, - "climb1": 0, - "climb2": 0, - "climb3": 1, - "climb4": 0 - } + "arrayPath": "cubeCycle.all", + "valuePath": "timeDifferential" } }, - { - "type": "tmp", - "name": "map", - "outputPath": "climbCounts.climb4", + { + "type": "team", + "name": "averageArray", + "outputPath": "cubeCycle.averageTimeComplete", "options": { - "path": "finalClimbState.id", - "map": { - "noClimb": 0, - "climbF": 0, - "climb1": 0, - "climb2": 0, - "climb3": 0, - "climb4": 1 - } + "arrayPath": "cubeCycle.allComplete", + "valuePath": "timeDifferential" } }, - { + { + "type":"tmp", + "name":"cycle", + "outputPath":"cycle", + "options":{ + "pickups":["cubePickupGrid","cubePickupCommunity","cubePickupFloor","cubePickupChute","cubePickupShelf","conePickupGrid","conePickupCommunity","conePickupFloor","conePickupChute","conePickupShelf"], + "scores":["placement32","placement22","placement35","placement25","placement38","placement28","counts.hybrid.cubePickupGrid","counts.hybrid.cubePickupCommunity","counts.hybrid.cubePickupFloor","counts.hybrid.cubePickupChute","counts.hybrid.cubePickupPlatform","placement31","placement21","placement33","placement23","placement34","placement24","placement36","placement26","placement37","placement27","placement39","placement29","counts.hybrid.conePickupGrid","counts.hybrid.conePickupCommunity","counts.hybrid.conePickupFloor","counts.hybrid.conePickupChute","counts.hybrid.conePickupPlatform"], + "misses":["dropCube","dropCone"] + } + }, + { "type": "team", - "name": "average", - "outputPath": "climbLevels", + "name": "aggregateArray", + "outputPath": "cycle.all", "options": { - "path": "climbCounts" + "path": "cycle.all" } }, - { + { "type": "team", - "name": "average", - "outputPath": "averages.endClimbTime", + "name": "aggregateArray", + "outputPath": "cycle.allComplete", "options": { - "path": "finalClimbState.ts" + "path": "cycle.allComplete" } }, - { - "type": "tmp", - "name": "subtract", - "outputPath": "climbDuration", - "options": { - "minuend": "startClimbTime", - "subtrahend": "finalClimbState.ts" - } - }, - { - "type": "team", - "name": "subtract", - "outputPath": "averages.climbDuration", - "options": { - "minuend": "averages.startClimbTime", - "subtrahend": "averages.endClimbTime" - } - }, - { - "type": "tmp", - "name": "map", - "outputPath": "scores.endgame", + { + "type": "team", + "name": "averageArray", + "outputPath": "cycle.averageTime", "options": { - "path": "finalClimbState.id", - "map": { - "noClimb": 0, - "climbF": 0, - "climb1": 4, - "climb2": 6, - "climb3": 10, - "climb4": 15 - } + "arrayPath": "cycle.all", + "valuePath": "timeDifferential" } }, - - { - "type": "tmp", - "name": "sum", - "outputPath": "scores.all", + { + "type": "team", + "name": "averageArray", + "outputPath": "cycle.averageTimeComplete", "options": { - "addends": ["scores.teleop","scores.auto","scores.endgame"] + "arrayPath": "cycle.allComplete", + "valuePath": "timeDifferential" } }, { @@ -419,35 +491,5 @@ "options": { "path": "scores" } - }, - { - "type": "team", - "name": "threshold", - "outputPath": "possibleClimbs", - "options": { - "threshold": 0, - "separator": ", ", - "none": "—", - "paths": { - "climbLevels.climb1": "1", - "climbLevels.climb2": "2", - "climbLevels.climb3": "3", - "climbLevels.climb4": "4" - } - } - }, - { - "type": "team", - "name": "threshold", - "outputPath": "possibleShots", - "options": { - "threshold": 1, - "separator": ", ", - "none": "—", - "paths": { - "averages.upperHub": "U", - "averages.lowerHub": "L" - } - } - } + } ] \ No newline at end of file diff --git a/config/analysis-pipeline2.json b/config/analysis-pipeline2.json new file mode 100644 index 00000000..93b952a3 --- /dev/null +++ b/config/analysis-pipeline2.json @@ -0,0 +1,449 @@ +[ + { + "type": "tmp", + "name": "countActions", + "outputPath": "counts", + "options": { + "all": true + } + }, + { + "type": "team", + "name": "countActions", + "outputPath": "counts", + "options": { + "all": true + } + }, + { + "type": "team", + "name": "sum", + "outputPath": "counts.balls", + "options": { + "addends": [ + "counts.upperHub", + "counts.lowerHub", + "counts.miss" + ] + } + }, + + { + "type": "team", + "name": "aggregateArray", + "outputPath": "aggregatedActions", + "options": { + "path": "actionQueue" + } + }, + + { + "type": "team", + "name": "countMatches", + "outputPath": "temp.totalTimeMs", + "options": { + "weight": 150000 + } + }, + { + "type": "team", + "name": "ratio", + "outputPath": "timePerBall", + "options": { + "numerator": ["temp.totalTimeMs"], + "denominator": ["counts.balls"] + }, + "divByZero": 150000 + }, + + { + "type": "tmp", + "name": "cycle", + "outputPath": "cycle", + "options": { + "pickups": [ + "groundPickup" + ], + "scores": [ + "upperHub", + "lowerHub" + ], + "misses": [ + "miss" + ] + } + }, + { + "type": "team", + "name": "aggregateArray", + "outputPath": "cycle.all", + "options": { + "path": "cycle.all" + } + }, + { + "type": "team", + "name": "aggregateArray", + "outputPath": "cycle.allComplete", + "options": { + "path": "cycle.allComplete" + } + }, + { + "type": "team", + "name": "averageArray", + "outputPath": "cycle.averageTime", + "options": { + "arrayPath": "cycle.all", + "valuePath": "timeDifferential" + } + }, + { + "type": "team", + "name": "averageArray", + "outputPath": "cycle.averageTimeComplete", + "options": { + "arrayPath": "cycle.allComplete", + "valuePath": "timeDifferential" + } + }, + { + "type": "team", + "name": "average", + "outputPath": "averages", + "options": { + "path": "counts" + } + }, + + { + "type": "tmp", + "name": "ratio", + "outputPath": "accuracy", + "options": { + "numerator": [ + "counts.lowerHub", + "counts.upperHub" + ], + "denominator": [ + "counts.lowerHub", + "counts.upperHub", + "counts.miss" + ], + "divByZero": 0 + } + }, + { + "type": "team", + "name": "ratio", + "outputPath": "accuracy", + "options": { + "numerator": [ + "counts.lowerHub", + "counts.upperHub" + ], + "denominator": [ + "counts.lowerHub", + "counts.upperHub", + "counts.miss" + ], + "divByZero": 0 + } + }, + { + "type": "tmp", + "name": "actionTime", + "outputPath": "tarmacCrossTime", + "options": { + "actionId": "leaveTarmac" + } + }, + { + "type": "team", + "name": "average", + "outputPath": "averages.tarmacCrossTime", + "options": { + "path": "tarmacCrossTime" + } + }, + { + "type": "tmp", + "name": "actionTime", + "outputPath": "startClimbTime", + "options": { + "actionId": "startClimb" + } + }, + { + "type": "team", + "name": "average", + "outputPath": "averages.startClimbTime", + "options": { + "path": "startClimbTime" + } + }, + { + "type": "tmp", + "name": "actionTimeFilter", + "outputPath": "autoActions", + "options": { + "timeMin": 131000 + } + }, + { + "type": "tmp", + "name": "countActions", + "outputPath": "countsAuto", + "options": { + "all": true, + "actionArrayPath": "autoActions" + } + }, + { + "type": "tmp", + "name": "weightedSum", + "outputPath": "scores.auto", + "options": { + "weightedPaths": { + "countsAuto.leaveTarmac": 2, + "countsAuto.lowerHub": 2, + "countsAuto.upperHub": 4 + } + } + }, + { + "type": "tmp", + "name": "actionTimeFilter", + "outputPath": "teleopActions", + "options": { + "timeMax": 131000 + } + }, + { + "type": "tmp", + "name": "countActions", + "outputPath": "countsTeleop", + "options": { + "all": true, + "actionArrayPath": "teleopActions" + } + }, + { + "type": "tmp", + "name": "weightedSum", + "outputPath": "scores.teleop", + "options": { + "weightedPaths": { + "countsTeleop.lowerHub": 1, + "countsTeleop.upperHub": 2 + } + } + }, + + { + "type": "tmp", + "name": "finalActionOccurence", + "outputPath": "finalClimbState", + "options": { + "ids": ["climb1","climb2","climb3","climb4","climbF"], + "default": { + "id": "noClimb", + "ts": 0 + } + } + }, + + { + "type": "tmp", + "name": "map", + "outputPath": "climbCounts.noClimb", + "options": { + "path": "finalClimbState.id", + "map": { + "noClimb": 1, + "climbF": 0, + "climb1": 0, + "climb2": 0, + "climb3": 0, + "climb4": 0 + } + } + }, + { + "type": "tmp", + "name": "map", + "outputPath": "climbCounts.climbF", + "options": { + "path": "finalClimbState.id", + "map": { + "noClimb": 0, + "climbF": 1, + "climb1": 0, + "climb2": 0, + "climb3": 0, + "climb4": 0 + } + } + }, + { + "type": "tmp", + "name": "map", + "outputPath": "climbCounts.climb1", + "options": { + "path": "finalClimbState.id", + "map": { + "noClimb": 0, + "climbF": 0, + "climb1": 1, + "climb2": 0, + "climb3": 0, + "climb4": 0 + } + } + }, + { + "type": "tmp", + "name": "map", + "outputPath": "climbCounts.climb2", + "options": { + "path": "finalClimbState.id", + "map": { + "noClimb": 0, + "climbF": 0, + "climb1": 0, + "climb2": 1, + "climb3": 0, + "climb4": 0 + } + } + }, + { + "type": "tmp", + "name": "map", + "outputPath": "climbCounts.climb3", + "options": { + "path": "finalClimbState.id", + "map": { + "noClimb": 0, + "climbF": 0, + "climb1": 0, + "climb2": 0, + "climb3": 1, + "climb4": 0 + } + } + }, + { + "type": "tmp", + "name": "map", + "outputPath": "climbCounts.climb4", + "options": { + "path": "finalClimbState.id", + "map": { + "noClimb": 0, + "climbF": 0, + "climb1": 0, + "climb2": 0, + "climb3": 0, + "climb4": 1 + } + } + }, + { + "type": "team", + "name": "average", + "outputPath": "climbLevels", + "options": { + "path": "climbCounts" + } + }, + { + "type": "team", + "name": "average", + "outputPath": "averages.endClimbTime", + "options": { + "path": "finalClimbState.ts" + } + }, + { + "type": "tmp", + "name": "subtract", + "outputPath": "climbDuration", + "options": { + "minuend": "startClimbTime", + "subtrahend": "finalClimbState.ts" + } + }, + { + "type": "team", + "name": "subtract", + "outputPath": "averages.climbDuration", + "options": { + "minuend": "averages.startClimbTime", + "subtrahend": "averages.endClimbTime" + } + }, + { + "type": "tmp", + "name": "map", + "outputPath": "scores.endgame", + "options": { + "path": "finalClimbState.id", + "map": { + "noClimb": 0, + "climbF": 0, + "climb1": 4, + "climb2": 6, + "climb3": 10, + "climb4": 15 + } + } + }, + + { + "type": "tmp", + "name": "sum", + "outputPath": "scores.all", + "options": { + "addends": ["scores.teleop","scores.auto","scores.endgame"] + } + }, + { + "type": "team", + "name": "average", + "outputPath": "averageScores", + "options": { + "path": "scores" + } + }, + { + "type": "team", + "name": "threshold", + "outputPath": "possibleClimbs", + "options": { + "threshold": 0, + "separator": ", ", + "none": "—", + "paths": { + "climbLevels.climb1": "1", + "climbLevels.climb2": "2", + "climbLevels.climb3": "3", + "climbLevels.climb4": "4" + } + } + }, + { + "type": "team", + "name": "threshold", + "outputPath": "possibleShots", + "options": { + "threshold": 1, + "separator": ", ", + "none": "—", + "paths": { + "averages.upperHub": "U", + "averages.lowerHub": "L" + } + } + } +] \ No newline at end of file diff --git a/config/match-scouting.json b/config/match-scouting.json index c9b222db..1ea2ab70 100644 --- a/config/match-scouting.json +++ b/config/match-scouting.json @@ -1,255 +1,712 @@ -{ + { "timing": { "totalTime": 150000, "timeTransitions": { - "149990": { - "layer": 1, - "displayText": "Auto" - }, - "131000": { - "layer": 3, - "displayText": "Teleop" - } } }, "layout": { - "gridRows": 5, - "gridColumns": 5, + "gridRows": 6, + "gridColumns": 9, "layers": [ [ { "id": "startGame", "displayText": "Start", - "gridArea": ["1", "2", "2", "5"], - "class": "gray timer", + "gridArea": ["4", "1", "6", "10"], + "class": "silver timer", "type": "match-control", + "executables": [{"type": "layer", "args":[0,1]}] + }, + { + "id": "prePickupCone", + "displayText": "Cone", + "gridArea": ["2", "1", "4", "4"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[0,7]}] + }, + { + "id": "prePickupCube", + "displayText": "Cube", + "gridArea": ["2", "7", "4", "10"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[0,8]}] + }, + { + "id": "prePickupNone", + "displayText": "None", + "gridArea": ["2", "4", "4", "7"], + "class": "gray", + "type": "action", "executables": [] } - ], + ], [ { "id": "startGame", "displayText": "Start", - "gridArea": ["1", "2", "2", "5"], - "class": "gray timer", + "gridArea": ["1", "4", "2", "7"], + "class": "silver timer", "type": "match-control", "executables": [] }, + { - "id": "leaveTarmac", - "displayText": "Leave Tarmac Zone", - "gridArea": ["3", "2", "4", "5"], - "class": "gray largeAction", + "id": "broken", + "displayText": "Disabled", + "gridArea": ["1", "1", "2", "3"], + "class": "red", "type": "action", - "executables": [{"type": "hide", "args": []}] + "executables": [] }, { "id": "undo", "displayText": "Undo", - "gridArea": ["5", "2", "6", "3"], + "gridArea": ["1", "8", "2", "10"], "class": "green", "type": "undo", "executables": [] }, { - "id": "groundPickup", - "displayText": "Ball Pickup", - "gridArea": ["5", "1", "6", "2"], - "class": "navy", + "id": "conePickup", + "displayText": "Cone", + "gridArea": ["3", "1", "4", "3"], + "class": "yellow", "type": "action", - "executables": [{"type": "position", "args":[]}] + "executables": [{"type": "layer", "args":[1,3]}] }, { - "id": "upperHub", - "displayText": "Upper Hub", - "gridArea": ["4", "5", "5", "6"], - "class": "orange", + "id": "cubePickup", + "displayText": "Cube", + "gridArea": ["3", "8", "4", "10"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[1,4]}] + }, + { + "id": "chargingDock", + "displayText": "Charging Dock", + "gridArea": ["3", "4", "4", "7"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[1,2]}] + } + ], + [ + { + "id": "startGame", + "displayText": "Start", + "gridArea": ["1", "4", "2", "7"], + "class": "silver timer", + "type": "match-control", + "executables": [] + }, + { + "id": "undo", + "displayText": "Undo", + "gridArea": ["1", "8", "2", "10"], + "class": "green", + "type": "undo", + "executables": [] + }, + { + "id": "platformDocked", + "displayText": "Docked", + "gridArea": ["3", "3", "4", "5"], + "class": "gray", "type": "action", - "executables": [{"type": "position", "args":[]}] + "executables": [] }, { - "id": "lowerHub", - "displayText": "Lower Hub", - "gridArea": ["5", "5", "6", "6"], + "id": "platformEngaged", + "displayText": "Engaged", + "gridArea": ["3", "6", "4", "8"], + "class": "gray border", + "type": "action", + "executables": [] + }, + { + "id": "platformLeave", + "displayText": "Leave", + "gridArea": ["5", "3", "6", "5"], "class": "orange", "type": "action", - "executables": [{"type": "position", "args":[]}] + "executables": [{"type": "layer", "args":[2,1]}] }, { - "id": "miss", - "displayText": "Miss", - "gridArea": ["5", "4", "6", "5"], + "id": "platformFall", + "displayText": "Fall", + "gridArea": ["5", "6", "6", "8"], "class": "red", "type": "action", - "executables": [{"type": "position", "args":[]}] + "executables": [{"type": "layer", "args":[2,1]}] } ], [ { "id": "startGame", "displayText": "Start", - "gridArea": ["1", "2", "2", "5"], - "class": "gray", + "gridArea": ["1", "4", "2", "7"], + "class": "silver timer", "type": "match-control", "executables": [] }, { "id": "undo", "displayText": "Undo", - "gridArea": ["5", "2", "6", "3"], + "gridArea": ["1", "8", "2", "10"], "class": "green", "type": "undo", "executables": [] }, { - "id": "groundPickup", - "displayText": "Ball Pickup", - "gridArea": ["5", "1", "6", "2"], - "class": "navy", + "id": "conePickupGrid", + "displayText": "Grid", + "gridArea": ["4", "3", "5", "4"], + "class": "yellow button-padding", "type": "action", - "executables": [{"type": "position", "args":[]}] + "executables": [{"type":"layer","args":[3,5]}] }, - { - "id": "upperHub", - "displayText": "Upper Hub", + { + "id": "conePickupCommunity", + "displayText": "Comm", + "gridArea": ["4", "4", "5", "5"], + "class": "yellow button-padding", + "type": "action", + "executables": [{"type":"layer","args":[3,5]}] + }, + { + "id": "conePickupFloor", + "displayText": "Floor", "gridArea": ["4", "5", "5", "6"], - "class": "orange", + "class": "yellow button-padding", "type": "action", - "executables": [{"type": "position", "args":[]}] + "executables": [{"type":"layer","args":[3,5]}] }, - { - "id": "lowerHub", - "displayText": "Lower Hub", - "gridArea": ["5", "5", "6", "6"], - "class": "orange", + { + "id": "conePickupChute", + "displayText": "Chute", + "gridArea": ["4", "6", "5", "7"], + "class": "yellow button-padding", "type": "action", - "executables": [{"type": "position", "args":[]}] + "executables": [{"type":"layer","args":[3,5]}] }, - { - "id": "miss", - "displayText": "Miss", - "gridArea": ["5", "4", "6", "5"], - "class": "red", + { + "id": "conePickupShelf", + "displayText": "Shelf", + "gridArea": ["4", "7", "5", "8"], + "class": "yellow button-padding", "type": "action", - "executables": [{"type": "position", "args":[]}] + "executables": [{"type":"layer","args":[3,5]}] } + ], - [ + [ { "id": "startGame", "displayText": "Start", - "gridArea": ["1", "2", "2", "5"], - "class": "gray", + "gridArea": ["1", "4", "2", "7"], + "class": "silver timer", "type": "match-control", "executables": [] }, { "id": "undo", "displayText": "Undo", - "gridArea": ["5", "2", "6", "3"], + "gridArea": ["1", "8", "2", "10"], "class": "green", "type": "undo", "executables": [] }, { - "id": "groundPickup", - "displayText": "Ball Pickup", - "gridArea": ["5", "1", "6", "2"], - "class": "navy", + "id": "cubePickupGrid", + "displayText": "Grid", + "gridArea": ["4", "3", "5", "4"], + "class": "highlight button-padding", "type": "action", - "executables": [{"type": "position", "args":[]}] + "executables": [{"type":"layer","args":[4,6]}] }, - { - "id": "upperHub", - "displayText": "Upper Hub", + { + "id": "cubePickupCommunity", + "displayText": "Comm", + "gridArea": ["4", "4", "5", "5"], + "class": "highlight button-padding", + "type": "action", + "executables": [{"type":"layer","args":[4,6]}] + }, + { + "id": "cubePickupFloor", + "displayText": "Floor", "gridArea": ["4", "5", "5", "6"], - "class": "orange", + "class": "highlight button-padding", "type": "action", - "executables": [{"type": "position", "args":[]}] + "executables": [{"type":"layer","args":[4,6]}] }, - { - "id": "lowerHub", - "displayText": "Lower Hub", - "gridArea": ["5", "5", "6", "6"], - "class": "orange", + { + "id": "cubePickupChute", + "displayText": "Chute", + "gridArea": ["4", "6", "5", "7"], + "class": "highlight button-padding", "type": "action", - "executables": [{"type": "position", "args":[]}] + "executables": [{"type":"layer","args":[4,6]}] }, + { + "id": "cubePickupShelf", + "displayText": "Shelf", + "gridArea": ["4", "7", "5", "8"], + "class": "highlight button-padding", + "type": "action", + "executables": [{"type":"layer","args":[4,6]}] + } + + ], + [ { - "id": "miss", - "displayText": "Miss", - "gridArea": ["5", "4", "6", "5"], + "id": "startGame", + "displayText": "Start", + "gridArea": ["1", "4", "2", "7"], + "class": "silver timer", + "type": "match-control", + "executables": [] + }, + + { + "id": "broken", + "displayText": "Disabled", + "gridArea": ["1", "1", "2", "3"], "class": "red", "type": "action", - "executables": [{"type": "position", "args":[]}] + "executables": [] + }, + { + "id": "undo", + "displayText": "Undo", + "gridArea": ["1", "8", "2", "10"], + "class": "green", + "type": "undo", + "executables": [] + }, + { + "id": "conePickup", + "displayText": "Cone", + "gridArea": ["3", "1", "4", "3"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[5,3]}] }, { - "id": "startClimb", - "displayText": "Start Climb", - "gridArea": ["3", "2", "4", "5"], + "id": "dropCone", + "displayText": "Drop", + "gridArea": ["3", "8", "4", "10"], + "class": "red", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "chargingDock", + "displayText": "Charging Dock", + "gridArea": ["3", "4", "4", "7"], "class": "gray", "type": "action", - "executables": [{"type": "layer", "args":[3,4]}] + "executables": [{"type": "layer", "args":[5,2]}] + }, + { + "id": "placement31", + "displayText": " ", + "gridArea": ["4", "1", "5", "2"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement33", + "displayText": " ", + "gridArea": ["4", "3", "5", "4"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement34", + "displayText": " ", + "gridArea": ["4", "4", "5", "5"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement36", + "displayText": " ", + "gridArea": ["4", "6", "5", "7"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement37", + "displayText": " ", + "gridArea": ["4", "7", "5", "8"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + + { + "id": "placement39", + "displayText": " ", + "gridArea": ["4", "9", "5", "10"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement21", + "displayText": " ", + "gridArea": ["5", "1", "6", "2"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement23", + "displayText": " ", + "gridArea": ["5", "3", "6", "4"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement24", + "displayText": " ", + "gridArea": ["5", "4", "6", "5"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement26", + "displayText": " ", + "gridArea": ["5", "6", "6", "7"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement27", + "displayText": " ", + "gridArea": ["5", "7", "6", "8"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement29", + "displayText": " ", + "gridArea": ["5", "9", "6", "10"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement11", + "displayText": " ", + "gridArea": ["6", "1", "7", "2"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement12", + "displayText": " ", + "gridArea": ["6", "2", "7", "3"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement13", + "displayText": " ", + "gridArea": ["6", "3", "7", "4"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement14", + "displayText": " ", + "gridArea": ["6", "4", "7", "5"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement15", + "displayText": " ", + "gridArea": ["6", "5", "7", "6"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement16", + "displayText": " ", + "gridArea": ["6", "6", "7", "7"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement17", + "displayText": " ", + "gridArea": ["6", "7", "7", "8"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement18", + "displayText": " ", + "gridArea": ["6", "8", "7", "9"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement19", + "displayText": " ", + "gridArea": ["6", "9", "7", "10"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] } ], - [ + [ { "id": "startGame", "displayText": "Start", - "gridArea": ["1", "2", "2", "5"], - "class": "gray", + "gridArea": ["1", "4", "2", "7"], + "class": "silver timer", "type": "match-control", "executables": [] }, + + { + "id": "broken", + "displayText": "Disabled", + "gridArea": ["1", "1", "2", "3"], + "class": "red", + "type": "action", + "executables": [] + }, { "id": "undo", "displayText": "Undo", - "gridArea": ["5", "2", "6", "5"], + "gridArea": ["1", "8", "2", "10"], "class": "green", "type": "undo", "executables": [] }, { - "id": "climb1", - "displayText": "1", - "gridArea": ["3", "1", "4", "2"], - "class": "pink", + "id": "dropCube", + "displayText": "Drop", + "gridArea": ["3", "1", "4", "3"], + "class": "red", "type": "action", - "executables": [{"type":"climbHighlight","args":[]}] + "executables": [{"type": "layer", "args":[6,1]}] }, { - "id": "climb2", - "displayText": "2", - "gridArea": ["3", "2", "4", "3"], - "class": "pink", + "id": "cubePickup", + "displayText": "Cube", + "gridArea": ["3", "8", "4", "10"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[6,4]}] + }, + { + "id": "chargingDock", + "displayText": "Charging Dock", + "gridArea": ["3", "4", "4", "7"], + "class": "gray", "type": "action", - "executables": [{"type":"climbHighlight","args":[]}] + "executables": [{"type": "layer", "args":[6,2]}] + }, + { + "id": "placement32", + "displayText": " ", + "gridArea": ["4", "2", "5", "3"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement35", + "displayText": " ", + "gridArea": ["4", "5", "5", "6"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement38", + "displayText": " ", + "gridArea": ["4", "8", "5", "9"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement22", + "displayText": " ", + "gridArea": ["5", "2", "6", "3"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement25", + "displayText": " ", + "gridArea": ["5", "5", "6", "6"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement28", + "displayText": " ", + "gridArea": ["5", "8", "6", "9"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] }, + { + "id": "placement11", + "displayText": " ", + "gridArea": ["6", "1", "7", "2"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement12", + "displayText": " ", + "gridArea": ["6", "2", "7", "3"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement13", + "displayText": " ", + "gridArea": ["6", "3", "7", "4"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement14", + "displayText": " ", + "gridArea": ["6", "4", "7", "5"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement15", + "displayText": " ", + "gridArea": ["6", "5", "7", "6"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement16", + "displayText": " ", + "gridArea": ["6", "6", "7", "7"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement17", + "displayText": " ", + "gridArea": ["6", "7", "7", "8"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement18", + "displayText": " ", + "gridArea": ["6", "8", "7", "9"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement19", + "displayText": " ", + "gridArea": ["6", "9", "7", "10"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + } + ], + [ { - "id": "climb3", - "displayText": "3", - "gridArea": ["3", "3", "4", "4"], - "class": "pink", + "id": "startGame", + "displayText": "Start", + "gridArea": ["4", "1", "6", "10"], + "class": "silver timer", + "type": "match-control", + "executables": [{"type": "layer", "args":[7,5]}] + }, + + { + "id": "prePickupCube", + "displayText": "Cube", + "gridArea": ["2", "7", "4", "10"], + "class": "highlight", "type": "action", - "executables": [{"type":"climbHighlight","args":[]}] + "executables": [{"type": "layer", "args":[7,8]}] }, + { + "id": "prePickupNone", + "displayText": "None", + "gridArea": ["2", "4", "4", "7"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[7,0]}] + } + ], + [ { - "id": "climb4", - "displayText": "4", - "gridArea": ["3", "4", "4", "5"], - "class": "pink", + "id": "startGame", + "displayText": "Start", + "gridArea": ["4", "1", "6", "10"], + "class": "silver timer", + "type": "match-control", + "executables": [{"type": "layer", "args":[8,6]}] + }, + + { + "id": "prePickupCone", + "displayText": "Cone", + "gridArea": ["2", "1", "4", "4"], + "class": "yellow", "type": "action", - "executables": [{"type":"climbHighlight","args":[]}] + "executables": [{"type": "layer", "args":[8,7]}] }, - { - "id": "climbF", - "displayText": "Fall", - "gridArea": ["3", "5", "4", "6"], - "class": "red", + { + "id": "prePickupNone", + "displayText": "None", + "gridArea": ["2", "4", "4", "7"], + "class": "gray", "type": "action", - "executables": [{"type": "layer", "args":[4,3]}] + "executables": [{"type": "layer", "args":[8,0]}] } ] + ] } } \ No newline at end of file diff --git a/config/match-scouting2.json b/config/match-scouting2.json new file mode 100644 index 00000000..7a170893 --- /dev/null +++ b/config/match-scouting2.json @@ -0,0 +1,2016 @@ + { + "timing": { + "totalTime": 150000, + "timeTransitions": { + "149990": { + "layer": 1, + "displayText": "Auto" + }, + "13500": { + "layer": 1, + "displayText": "Teleop" + } + } + }, + "layout": { + "gridRows": 6, + "gridColumns": 9, + "layers": [ + [ + { + "id": "startGame", + "displayText": "Start", + "gridArea": ["3", "2", "5", "9"], + "class": "silver timer", + "type": "match-control", + "executables": [] + } + ], + [ + { + "id": "startGame", + "displayText": "Start", + "gridArea": ["1", "4", "2", "7"], + "class": "silver timer", + "type": "match-control", + "executables": [] + }, + { + "id": "leftCommunity", + "displayText": "Left Community", + "gridArea": ["2", "4", "3", "7"], + "class": "gray", + "type": "action", + "executables": [{"type":"hide","args":[]}] + }, + { + "id": "broken", + "displayText": "Disabled", + "gridArea": ["1", "1", "2", "3"], + "class": "red", + "type": "action", + "executables": [] + }, + { + "id": "undo", + "displayText": "Undo", + "gridArea": ["1", "8", "2", "10"], + "class": "green", + "type": "undo", + "executables": [] + }, + { + "id": "conePickup", + "displayText": "Cone", + "gridArea": ["3", "1", "4", "3"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[1,3]}] + }, + { + "id": "cubePickup", + "displayText": "Cube", + "gridArea": ["3", "8", "4", "10"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[1,4]}] + }, + { + "id": "chargingDock", + "displayText": "Charging Dock", + "gridArea": ["3", "4", "4", "7"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[1,2]}] + }, + { + "id": "placement31", + "displayText": " ", + "gridArea": ["4", "1", "5", "2"], + "class": "yellow", + "type": "action", + "executables": [] + }, + { + "id": "placement32", + "displayText": " ", + "gridArea": ["4", "2", "5", "3"], + "class": "highlight", + "type": "action", + "executables": [] + }, + { + "id": "placement33", + "displayText": " ", + "gridArea": ["4", "3", "5", "4"], + "class": "yellow", + "type": "action", + "executables": [] + }, + { + "id": "placement34", + "displayText": " ", + "gridArea": ["4", "4", "5", "5"], + "class": "yellow", + "type": "action", + "executables": [] + }, + { + "id": "placement35", + "displayText": " ", + "gridArea": ["4", "5", "5", "6"], + "class": "highlight", + "type": "action", + "executables": [] + }, + { + "id": "placement36", + "displayText": " ", + "gridArea": ["4", "6", "5", "7"], + "class": "yellow", + "type": "action", + "executables": [] + }, + { + "id": "placement37", + "displayText": " ", + "gridArea": ["4", "7", "5", "8"], + "class": "yellow", + "type": "action", + "executables": [] + }, + { + "id": "placement38", + "displayText": " ", + "gridArea": ["4", "8", "5", "9"], + "class": "highlight", + "type": "action", + "executables": [] + }, + { + "id": "placement39", + "displayText": " ", + "gridArea": ["4", "9", "5", "10"], + "class": "yellow", + "type": "action", + "executables": [] + }, + { + "id": "placement21", + "displayText": " ", + "gridArea": ["5", "1", "6", "2"], + "class": "yellow", + "type": "action", + "executables": [] + }, + { + "id": "placement22", + "displayText": " ", + "gridArea": ["5", "2", "6", "3"], + "class": "highlight", + "type": "action", + "executables": [] + }, + { + "id": "placement23", + "displayText": " ", + "gridArea": ["5", "3", "6", "4"], + "class": "yellow", + "type": "action", + "executables": [] + }, + { + "id": "placement24", + "displayText": " ", + "gridArea": ["5", "4", "6", "5"], + "class": "yellow", + "type": "action", + "executables": [] + }, + { + "id": "placement25", + "displayText": " ", + "gridArea": ["5", "5", "6", "6"], + "class": "highlight", + "type": "action", + "executables": [] + }, + { + "id": "placement26", + "displayText": " ", + "gridArea": ["5", "6", "6", "7"], + "class": "yellow", + "type": "action", + "executables": [] + }, + { + "id": "placement27", + "displayText": " ", + "gridArea": ["5", "7", "6", "8"], + "class": "yellow", + "type": "action", + "executables": [] + }, + { + "id": "placement28", + "displayText": " ", + "gridArea": ["5", "8", "6", "9"], + "class": "highlight", + "type": "action", + "executables": [] + }, + { + "id": "placement29", + "displayText": " ", + "gridArea": ["5", "9", "6", "10"], + "class": "yellow", + "type": "action", + "executables": [] + }, + { + "id": "placement11", + "displayText": " ", + "gridArea": ["6", "1", "7", "2"], + "class": "gray", + "type": "action", + "executables": [] + }, + { + "id": "placement12", + "displayText": " ", + "gridArea": ["6", "2", "7", "3"], + "class": "gray", + "type": "action", + "executables": [] + }, + { + "id": "placement13", + "displayText": " ", + "gridArea": ["6", "3", "7", "4"], + "class": "gray", + "type": "action", + "executables": [] + }, + { + "id": "placement14", + "displayText": " ", + "gridArea": ["6", "4", "7", "5"], + "class": "gray", + "type": "action", + "executables": [] + }, + { + "id": "placement15", + "displayText": " ", + "gridArea": ["6", "5", "7", "6"], + "class": "gray", + "type": "action", + "executables": [] + }, + { + "id": "placement16", + "displayText": " ", + "gridArea": ["6", "6", "7", "7"], + "class": "gray", + "type": "action", + "executables": [] + }, + { + "id": "placement17", + "displayText": " ", + "gridArea": ["6", "7", "7", "8"], + "class": "gray", + "type": "action", + "executables": [] + }, + { + "id": "placement18", + "displayText": " ", + "gridArea": ["6", "8", "7", "9"], + "class": "gray", + "type": "action", + "executables": [] + }, + { + "id": "placement19", + "displayText": " ", + "gridArea": ["6", "9", "7", "10"], + "class": "gray", + "type": "action", + "executables": [] + } + ], + [ + { + "id": "startGame", + "displayText": "Start", + "gridArea": ["1", "4", "2", "7"], + "class": "silver timer", + "type": "match-control", + "executables": [] + }, + { + "id": "undo", + "displayText": "Undo", + "gridArea": ["1", "8", "2", "10"], + "class": "green", + "type": "undo", + "executables": [] + }, + { + "id": "platformDocked", + "displayText": "Docked", + "gridArea": ["3", "3", "4", "5"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[2,1]}] + }, + { + "id": "platformEngaged", + "displayText": "Engaged", + "gridArea": ["3", "6", "4", "8"], + "class": "gray border", + "type": "action", + "executables": [{"type": "layer", "args":[2,1]}] + }, + { + "id": "platformLeave", + "displayText": "Leave", + "gridArea": ["5", "3", "6", "5"], + "class": "orange", + "type": "action", + "executables": [{"type": "layer", "args":[2,1]}] + }, + { + "id": "platformFall", + "displayText": "Fall", + "gridArea": ["5", "6", "6", "8"], + "class": "red", + "type": "action", + "executables": [{"type": "layer", "args":[2,1]}] + } + ], + [ + { + "id": "startGame", + "displayText": "Start", + "gridArea": ["1", "4", "2", "7"], + "class": "silver timer", + "type": "match-control", + "executables": [] + }, + { + "id": "undo", + "displayText": "Undo", + "gridArea": ["1", "8", "2", "10"], + "class": "green", + "type": "undo", + "executables": [] + }, + { + "id": "conePickupGrid", + "displayText": "Grid", + "gridArea": ["4", "3", "5", "4"], + "class": "yellow", + "type": "action", + "executables": [{"type":"layer","args":[3,5]}] + }, + { + "id": "conePickupCommunity", + "displayText": "Comm", + "gridArea": ["4", "4", "5", "5"], + "class": "yellow", + "type": "action", + "executables": [{"type":"layer","args":[3,5]}] + }, + { + "id": "conePickupFloor", + "displayText": "Floor", + "gridArea": ["4", "5", "5", "6"], + "class": "yellow", + "type": "action", + "executables": [{"type":"layer","args":[3,5]}] + }, + { + "id": "conePickupChute", + "displayText": "Chute", + "gridArea": ["4", "6", "5", "7"], + "class": "yellow", + "type": "action", + "executables": [{"type":"layer","args":[3,5]}] + }, + { + "id": "conePickupShelf", + "displayText": "Shelf", + "gridArea": ["4", "7", "5", "8"], + "class": "yellow", + "type": "action", + "executables": [{"type":"layer","args":[3,5]}] + } + + ], + [ + { + "id": "startGame", + "displayText": "Start", + "gridArea": ["1", "4", "2", "7"], + "class": "silver timer", + "type": "match-control", + "executables": [] + }, + { + "id": "undo", + "displayText": "Undo", + "gridArea": ["1", "8", "2", "10"], + "class": "green", + "type": "undo", + "executables": [] + }, + { + "id": "cubePickupGrid", + "displayText": "Grid", + "gridArea": ["4", "3", "5", "4"], + "class": "highlight", + "type": "action", + "executables": [{"type":"layer","args":[4,6]}] + }, + { + "id": "cubePickupCommunity", + "displayText": "Comm", + "gridArea": ["4", "4", "5", "5"], + "class": "highlight", + "type": "action", + "executables": [{"type":"layer","args":[4,6]}] + }, + { + "id": "cubePickupFloor", + "displayText": "Ground", + "gridArea": ["4", "5", "5", "6"], + "class": "highlight", + "type": "action", + "executables": [{"type":"layer","args":[4,6]}] + }, + { + "id": "cubePickupChute", + "displayText": "Chute", + "gridArea": ["4", "6", "5", "7"], + "class": "highlight", + "type": "action", + "executables": [{"type":"layer","args":[4,6]}] + }, + { + "id": "cubePickupShelf", + "displayText": "Shelf", + "gridArea": ["4", "7", "5", "8"], + "class": "highlight", + "type": "action", + "executables": [{"type":"layer","args":[4,6]}] + } + + ], + [ + { + "id": "startGame", + "displayText": "Start", + "gridArea": ["1", "4", "2", "7"], + "class": "silver timer", + "type": "match-control", + "executables": [] + }, + { + "id": "leftCommunity", + "displayText": "Left Community", + "gridArea": ["2", "4", "3", "7"], + "class": "gray", + "type": "action", + "executables": [{"type":"hide","args":[]}] + }, + { + "id": "broken", + "displayText": "Disabled", + "gridArea": ["1", "1", "2", "3"], + "class": "red", + "type": "action", + "executables": [] + }, + { + "id": "undo", + "displayText": "Undo", + "gridArea": ["1", "8", "2", "10"], + "class": "green", + "type": "undo", + "executables": [] + }, + { + "id": "conePickup", + "displayText": "Cone", + "gridArea": ["3", "1", "4", "3"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[5,3]}] + }, + { + "id": "dropCone", + "displayText": "Drop", + "gridArea": ["3", "8", "4", "10"], + "class": "red", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "chargingDock", + "displayText": "Charging Dock", + "gridArea": ["3", "4", "4", "7"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[5,2]}] + }, + { + "id": "placement31", + "displayText": " ", + "gridArea": ["4", "1", "5", "2"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement32", + "displayText": " ", + "gridArea": ["4", "2", "5", "3"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement33", + "displayText": " ", + "gridArea": ["4", "3", "5", "4"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement34", + "displayText": " ", + "gridArea": ["4", "4", "5", "5"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement35", + "displayText": " ", + "gridArea": ["4", "5", "5", "6"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement36", + "displayText": " ", + "gridArea": ["4", "6", "5", "7"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement37", + "displayText": " ", + "gridArea": ["4", "7", "5", "8"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement38", + "displayText": " ", + "gridArea": ["4", "8", "5", "9"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement39", + "displayText": " ", + "gridArea": ["4", "9", "5", "10"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement21", + "displayText": " ", + "gridArea": ["5", "1", "6", "2"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement22", + "displayText": " ", + "gridArea": ["5", "2", "6", "3"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement23", + "displayText": " ", + "gridArea": ["5", "3", "6", "4"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement24", + "displayText": " ", + "gridArea": ["5", "4", "6", "5"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement25", + "displayText": " ", + "gridArea": ["5", "5", "6", "6"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement26", + "displayText": " ", + "gridArea": ["5", "6", "6", "7"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement27", + "displayText": " ", + "gridArea": ["5", "7", "6", "8"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement28", + "displayText": " ", + "gridArea": ["5", "8", "6", "9"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement29", + "displayText": " ", + "gridArea": ["5", "9", "6", "10"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement11", + "displayText": " ", + "gridArea": ["6", "1", "7", "2"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement12", + "displayText": " ", + "gridArea": ["6", "2", "7", "3"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement13", + "displayText": " ", + "gridArea": ["6", "3", "7", "4"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement14", + "displayText": " ", + "gridArea": ["6", "4", "7", "5"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement15", + "displayText": " ", + "gridArea": ["6", "5", "7", "6"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement16", + "displayText": " ", + "gridArea": ["6", "6", "7", "7"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement17", + "displayText": " ", + "gridArea": ["6", "7", "7", "8"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement18", + "displayText": " ", + "gridArea": ["6", "8", "7", "9"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + }, + { + "id": "placement19", + "displayText": " ", + "gridArea": ["6", "9", "7", "10"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[5,1]}] + } + ], + [ + { + "id": "startGame", + "displayText": "Start", + "gridArea": ["1", "4", "2", "7"], + "class": "silver timer", + "type": "match-control", + "executables": [] + }, + { + "id": "leftCommunity", + "displayText": "Left Community", + "gridArea": ["2", "4", "3", "7"], + "class": "gray", + "type": "action", + "executables": [{"type":"hide","args":[]}] + }, + { + "id": "broken", + "displayText": "Disabled", + "gridArea": ["1", "1", "2", "3"], + "class": "red", + "type": "action", + "executables": [] + }, + { + "id": "undo", + "displayText": "Undo", + "gridArea": ["1", "8", "2", "10"], + "class": "green", + "type": "undo", + "executables": [] + }, + { + "id": "dropCube", + "displayText": "Drop", + "gridArea": ["3", "1", "4", "3"], + "class": "red", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "cubePickup", + "displayText": "Cube", + "gridArea": ["3", "8", "4", "10"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[6,4]}] + }, + { + "id": "chargingDock", + "displayText": "Charging Dock", + "gridArea": ["3", "4", "4", "7"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[6,2]}] + }, + { + "id": "placement31", + "displayText": " ", + "gridArea": ["4", "1", "5", "2"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement32", + "displayText": " ", + "gridArea": ["4", "2", "5", "3"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement33", + "displayText": " ", + "gridArea": ["4", "3", "5", "4"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement34", + "displayText": " ", + "gridArea": ["4", "4", "5", "5"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement35", + "displayText": " ", + "gridArea": ["4", "5", "5", "6"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement36", + "displayText": " ", + "gridArea": ["4", "6", "5", "7"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement37", + "displayText": " ", + "gridArea": ["4", "7", "5", "8"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement38", + "displayText": " ", + "gridArea": ["4", "8", "5", "9"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement39", + "displayText": " ", + "gridArea": ["4", "9", "5", "10"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement21", + "displayText": " ", + "gridArea": ["5", "1", "6", "2"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement22", + "displayText": " ", + "gridArea": ["5", "2", "6", "3"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement23", + "displayText": " ", + "gridArea": ["5", "3", "6", "4"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement24", + "displayText": " ", + "gridArea": ["5", "4", "6", "5"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement25", + "displayText": " ", + "gridArea": ["5", "5", "6", "6"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement26", + "displayText": " ", + "gridArea": ["5", "6", "6", "7"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement27", + "displayText": " ", + "gridArea": ["5", "7", "6", "8"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement28", + "displayText": " ", + "gridArea": ["5", "8", "6", "9"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement29", + "displayText": " ", + "gridArea": ["5", "9", "6", "10"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement11", + "displayText": " ", + "gridArea": ["6", "1", "7", "2"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement12", + "displayText": " ", + "gridArea": ["6", "2", "7", "3"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement13", + "displayText": " ", + "gridArea": ["6", "3", "7", "4"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement14", + "displayText": " ", + "gridArea": ["6", "4", "7", "5"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement15", + "displayText": " ", + "gridArea": ["6", "5", "7", "6"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement16", + "displayText": " ", + "gridArea": ["6", "6", "7", "7"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement17", + "displayText": " ", + "gridArea": ["6", "7", "7", "8"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement18", + "displayText": " ", + "gridArea": ["6", "8", "7", "9"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + }, + { + "id": "placement19", + "displayText": " ", + "gridArea": ["6", "9", "7", "10"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[6,1]}] + } + ], + + + + + + + + + + + + + + + + + + [ + { + "id": "startGame", + "displayText": "Start", + "gridArea": ["3", "2", "5", "9"], + "class": "silver timer", + "type": "match-control", + "executables": [] + } + ], + [ + { + "id": "startGame", + "displayText": "Start", + "gridArea": ["1", "4", "2", "7"], + "class": "silver timer", + "type": "match-control", + "executables": [] + }, + { + "id": "broken", + "displayText": "Disabled", + "gridArea": ["1", "1", "2", "3"], + "class": "red", + "type": "action", + "executables": [] + }, + { + "id": "undo", + "displayText": "Undo", + "gridArea": ["1", "8", "2", "10"], + "class": "green", + "type": "undo", + "executables": [] + }, + { + "id": "conePickup", + "displayText": "Cone", + "gridArea": ["3", "1", "4", "3"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[7,9]}] + }, + { + "id": "cubePickup", + "displayText": "Cube", + "gridArea": ["3", "8", "4", "10"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[7,10]}] + }, + { + "id": "chargingDock", + "displayText": "Charging Dock", + "gridArea": ["3", "4", "4", "7"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[7,8]}] + }, + { + "id": "placement31", + "displayText": " ", + "gridArea": ["4", "1", "5", "2"], + "class": "yellow", + "type": "action", + "executables": [] + }, + { + "id": "placement32", + "displayText": " ", + "gridArea": ["4", "2", "5", "3"], + "class": "highlight", + "type": "action", + "executables": [] + }, + { + "id": "placement33", + "displayText": " ", + "gridArea": ["4", "3", "5", "4"], + "class": "yellow", + "type": "action", + "executables": [] + }, + { + "id": "placement34", + "displayText": " ", + "gridArea": ["4", "4", "5", "5"], + "class": "yellow", + "type": "action", + "executables": [] + }, + { + "id": "placement35", + "displayText": " ", + "gridArea": ["4", "5", "5", "6"], + "class": "highlight", + "type": "action", + "executables": [] + }, + { + "id": "placement36", + "displayText": " ", + "gridArea": ["4", "6", "5", "7"], + "class": "yellow", + "type": "action", + "executables": [] + }, + { + "id": "placement37", + "displayText": " ", + "gridArea": ["4", "7", "5", "8"], + "class": "yellow", + "type": "action", + "executables": [] + }, + { + "id": "placement38", + "displayText": " ", + "gridArea": ["4", "8", "5", "9"], + "class": "highlight", + "type": "action", + "executables": [] + }, + { + "id": "placement39", + "displayText": " ", + "gridArea": ["4", "9", "5", "10"], + "class": "yellow", + "type": "action", + "executables": [] + }, + { + "id": "placement21", + "displayText": " ", + "gridArea": ["5", "1", "6", "2"], + "class": "yellow", + "type": "action", + "executables": [] + }, + { + "id": "placement22", + "displayText": " ", + "gridArea": ["5", "2", "6", "3"], + "class": "highlight", + "type": "action", + "executables": [] + }, + { + "id": "placement23", + "displayText": " ", + "gridArea": ["5", "3", "6", "4"], + "class": "yellow", + "type": "action", + "executables": [] + }, + { + "id": "placement24", + "displayText": " ", + "gridArea": ["5", "4", "6", "5"], + "class": "yellow", + "type": "action", + "executables": [] + }, + { + "id": "placement25", + "displayText": " ", + "gridArea": ["5", "5", "6", "6"], + "class": "highlight", + "type": "action", + "executables": [] + }, + { + "id": "placement26", + "displayText": " ", + "gridArea": ["5", "6", "6", "7"], + "class": "yellow", + "type": "action", + "executables": [] + }, + { + "id": "placement27", + "displayText": " ", + "gridArea": ["5", "7", "6", "8"], + "class": "yellow", + "type": "action", + "executables": [] + }, + { + "id": "placement28", + "displayText": " ", + "gridArea": ["5", "8", "6", "9"], + "class": "highlight", + "type": "action", + "executables": [] + }, + { + "id": "placement29", + "displayText": " ", + "gridArea": ["5", "9", "6", "10"], + "class": "yellow", + "type": "action", + "executables": [] + }, + { + "id": "placement11", + "displayText": " ", + "gridArea": ["6", "1", "7", "2"], + "class": "gray", + "type": "action", + "executables": [] + }, + { + "id": "placement12", + "displayText": " ", + "gridArea": ["6", "2", "7", "3"], + "class": "gray", + "type": "action", + "executables": [] + }, + { + "id": "placement13", + "displayText": " ", + "gridArea": ["6", "3", "7", "4"], + "class": "gray", + "type": "action", + "executables": [] + }, + { + "id": "placement14", + "displayText": " ", + "gridArea": ["6", "4", "7", "5"], + "class": "gray", + "type": "action", + "executables": [] + }, + { + "id": "placement15", + "displayText": " ", + "gridArea": ["6", "5", "7", "6"], + "class": "gray", + "type": "action", + "executables": [] + }, + { + "id": "placement16", + "displayText": " ", + "gridArea": ["6", "6", "7", "7"], + "class": "gray", + "type": "action", + "executables": [] + }, + { + "id": "placement17", + "displayText": " ", + "gridArea": ["6", "7", "7", "8"], + "class": "gray", + "type": "action", + "executables": [] + }, + { + "id": "placement18", + "displayText": " ", + "gridArea": ["6", "8", "7", "9"], + "class": "gray", + "type": "action", + "executables": [] + }, + { + "id": "placement19", + "displayText": " ", + "gridArea": ["6", "9", "7", "10"], + "class": "gray", + "type": "action", + "executables": [] + } + ], + [ + { + "id": "startGame", + "displayText": "Start", + "gridArea": ["1", "4", "2", "7"], + "class": "gray timer", + "type": "match-control", + "executables": [] + }, + { + "id": "undo", + "displayText": "Undo", + "gridArea": ["1", "8", "2", "10"], + "class": "green", + "type": "undo", + "executables": [] + }, + { + "id": "platformDocked", + "displayText": "Docked", + "gridArea": ["3", "3", "4", "5"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[8,7]}] + }, + { + "id": "platformEngaged", + "displayText": "Engaged", + "gridArea": ["3", "6", "4", "8"], + "class": "gray border", + "type": "action", + "executables": [{"type": "layer", "args":[8,7]}] + }, + { + "id": "platformLeave", + "displayText": "Leave", + "gridArea": ["5", "3", "6", "5"], + "class": "orange", + "type": "action", + "executables": [{"type": "layer", "args":[8,7]}] + }, + { + "id": "platformFall", + "displayText": "Fall", + "gridArea": ["5", "6", "6", "8"], + "class": "red", + "type": "action", + "executables": [{"type": "layer", "args":[8,7]}] + } + ], + [ + { + "id": "startGame", + "displayText": "Start", + "gridArea": ["1", "4", "2", "7"], + "class": "silver timer", + "type": "match-control", + "executables": [] + }, + { + "id": "undo", + "displayText": "Undo", + "gridArea": ["1", "8", "2", "10"], + "class": "green", + "type": "undo", + "executables": [] + }, + { + "id": "conePickupGrid", + "displayText": "Grid", + "gridArea": ["4", "3", "5", "4"], + "class": "yellow", + "type": "action", + "executables": [{"type":"layer","args":[9,11]}] + }, + { + "id": "conePickupCommunity", + "displayText": "Comm", + "gridArea": ["4", "4", "5", "5"], + "class": "yellow", + "type": "action", + "executables": [{"type":"layer","args":[9,11]}] + }, + { + "id": "conePickupFloor", + "displayText": "Floor", + "gridArea": ["4", "5", "5", "6"], + "class": "yellow", + "type": "action", + "executables": [{"type":"layer","args":[9,11]}] + }, + { + "id": "conePickupChute", + "displayText": "Chute", + "gridArea": ["4", "6", "5", "7"], + "class": "yellow", + "type": "action", + "executables": [{"type":"layer","args":[9,11]}] + }, + { + "id": "conePickupShelf", + "displayText": "Shelf", + "gridArea": ["4", "7", "5", "8"], + "class": "yellow", + "type": "action", + "executables": [{"type":"layer","args":[9,11]}] + } + + ], + [ + { + "id": "startGame", + "displayText": "Start", + "gridArea": ["1", "4", "2", "7"], + "class": "silver timer", + "type": "match-control", + "executables": [] + }, + { + "id": "undo", + "displayText": "Undo", + "gridArea": ["1", "8", "2", "10"], + "class": "green", + "type": "undo", + "executables": [] + }, + { + "id": "cubePickupGrid", + "displayText": "Grid", + "gridArea": ["4", "3", "5", "4"], + "class": "highlight", + "type": "action", + "executables": [{"type":"layer","args":[10,12]}] + }, + { + "id": "cubePickupCommunity", + "displayText": "Comm", + "gridArea": ["4", "4", "5", "5"], + "class": "highlight", + "type": "action", + "executables": [{"type":"layer","args":[10,12]}] + }, + { + "id": "cubePickupFloor", + "displayText": "Ground", + "gridArea": ["4", "5", "5", "6"], + "class": "highlight", + "type": "action", + "executables": [{"type":"layer","args":[10,12]}] + }, + { + "id": "cubePickupChute", + "displayText": "Chute", + "gridArea": ["4", "6", "5", "7"], + "class": "highlight", + "type": "action", + "executables": [{"type":"layer","args":[10,12]}] + }, + { + "id": "cubePickupShelf", + "displayText": "Shelf", + "gridArea": ["4", "7", "5", "8"], + "class": "highlight", + "type": "action", + "executables": [{"type":"layer","args":[10,12]}] + } + + ], + [ + { + "id": "startGame", + "displayText": "Start", + "gridArea": ["1", "4", "2", "7"], + "class": "silver timer", + "type": "match-control", + "executables": [] + }, + + { + "id": "broken", + "displayText": "Disabled", + "gridArea": ["1", "1", "2", "3"], + "class": "red", + "type": "action", + "executables": [] + }, + { + "id": "undo", + "displayText": "Undo", + "gridArea": ["1", "8", "2", "10"], + "class": "green", + "type": "undo", + "executables": [] + }, + { + "id": "conePickup", + "displayText": "Cone", + "gridArea": ["3", "1", "4", "3"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[11,9]}] + }, + { + "id": "dropCone", + "displayText": "Drop", + "gridArea": ["3", "8", "4", "10"], + "class": "red", + "type": "action", + "executables": [{"type": "layer", "args":[11,7]}] + }, + { + "id": "chargingDock", + "displayText": "Charging Dock", + "gridArea": ["3", "4", "4", "7"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[11,8]}] + }, + { + "id": "placement31", + "displayText": " ", + "gridArea": ["4", "1", "5", "2"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[11,7]}] + }, + { + "id": "placement32", + "displayText": " ", + "gridArea": ["4", "2", "5", "3"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[11,7]}] + }, + { + "id": "placement33", + "displayText": " ", + "gridArea": ["4", "3", "5", "4"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[11,7]}] + }, + { + "id": "placement34", + "displayText": " ", + "gridArea": ["4", "4", "5", "5"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[11,7]}] + }, + { + "id": "placement35", + "displayText": " ", + "gridArea": ["4", "5", "5", "6"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[11,7]}] + }, + { + "id": "placement36", + "displayText": " ", + "gridArea": ["4", "6", "5", "7"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[11,7]}] + }, + { + "id": "placement37", + "displayText": " ", + "gridArea": ["4", "7", "5", "8"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[11,7]}] + }, + { + "id": "placement38", + "displayText": " ", + "gridArea": ["4", "8", "5", "9"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[11,7]}] + }, + { + "id": "placement39", + "displayText": " ", + "gridArea": ["4", "9", "5", "10"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[11,7]}] + }, + { + "id": "placement21", + "displayText": " ", + "gridArea": ["5", "1", "6", "2"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[11,7]}] + }, + { + "id": "placement22", + "displayText": " ", + "gridArea": ["5", "2", "6", "3"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[11,7]}] + }, + { + "id": "placement23", + "displayText": " ", + "gridArea": ["5", "3", "6", "4"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[11,7]}] + }, + { + "id": "placement24", + "displayText": " ", + "gridArea": ["5", "4", "6", "5"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[11,7]}] + }, + { + "id": "placement25", + "displayText": " ", + "gridArea": ["5", "5", "6", "6"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[11,7]}] + }, + { + "id": "placement26", + "displayText": " ", + "gridArea": ["5", "6", "6", "7"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[11,7]}] + }, + { + "id": "placement27", + "displayText": " ", + "gridArea": ["5", "7", "6", "8"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[11,7]}] + }, + { + "id": "placement28", + "displayText": " ", + "gridArea": ["5", "8", "6", "9"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[11,7]}] + }, + { + "id": "placement29", + "displayText": " ", + "gridArea": ["5", "9", "6", "10"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[11,7]}] + }, + { + "id": "placement11", + "displayText": " ", + "gridArea": ["6", "1", "7", "2"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[11,7]}] + }, + { + "id": "placement12", + "displayText": " ", + "gridArea": ["6", "2", "7", "3"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[11,7]}] + }, + { + "id": "placement13", + "displayText": " ", + "gridArea": ["6", "3", "7", "4"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[11,7]}] + }, + { + "id": "placement14", + "displayText": " ", + "gridArea": ["6", "4", "7", "5"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[11,7]}] + }, + { + "id": "placement15", + "displayText": " ", + "gridArea": ["6", "5", "7", "6"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[11,7]}] + }, + { + "id": "placement16", + "displayText": " ", + "gridArea": ["6", "6", "7", "7"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[11,7]}] + }, + { + "id": "placement17", + "displayText": " ", + "gridArea": ["6", "7", "7", "8"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[11,7]}] + }, + { + "id": "placement18", + "displayText": " ", + "gridArea": ["6", "8", "7", "9"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[11,7]}] + }, + { + "id": "placement19", + "displayText": " ", + "gridArea": ["6", "9", "7", "10"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[11,7]}] + } + ], + [ + { + "id": "startGame", + "displayText": "Start", + "gridArea": ["1", "4", "2", "7"], + "class": "silver timer", + "type": "match-control", + "executables": [] + }, + + { + "id": "broken", + "displayText": "Disabled", + "gridArea": ["1", "1", "2", "3"], + "class": "red", + "type": "action", + "executables": [] + }, + { + "id": "undo", + "displayText": "Undo", + "gridArea": ["1", "8", "2", "10"], + "class": "green", + "type": "undo", + "executables": [] + }, + { + "id": "dropCube", + "displayText": "Drop", + "gridArea": ["3", "1", "4", "3"], + "class": "red", + "type": "action", + "executables": [{"type": "layer", "args":[12,7]}] + }, + { + "id": "cubePickup", + "displayText": "Cube", + "gridArea": ["3", "8", "4", "10"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[12,10]}] + }, + { + "id": "chargingDock", + "displayText": "Charging Dock", + "gridArea": ["3", "4", "4", "7"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[12,8]}] + }, + { + "id": "placement31", + "displayText": " ", + "gridArea": ["4", "1", "5", "2"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[12,7]}] + }, + { + "id": "placement32", + "displayText": " ", + "gridArea": ["4", "2", "5", "3"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[12,7]}] + }, + { + "id": "placement33", + "displayText": " ", + "gridArea": ["4", "3", "5", "4"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[12,7]}] + }, + { + "id": "placement34", + "displayText": " ", + "gridArea": ["4", "4", "5", "5"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[12,7]}] + }, + { + "id": "placement35", + "displayText": " ", + "gridArea": ["4", "5", "5", "6"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[12,7]}] + }, + { + "id": "placement36", + "displayText": " ", + "gridArea": ["4", "6", "5", "7"], + "class": "yellow", + "type": "action", + "executables": {"type": "layer", "args":[12,7]}] + }, + { + "id": "placement37", + "displayText": " ", + "gridArea": ["4", "7", "5", "8"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[12,7]}] + }, + { + "id": "placement38", + "displayText": " ", + "gridArea": ["4", "8", "5", "9"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[12,7]}] + }, + { + "id": "placement39", + "displayText": " ", + "gridArea": ["4", "9", "5", "10"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[12,7]}] + }, + { + "id": "placement21", + "displayText": " ", + "gridArea": ["5", "1", "6", "2"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[12,7]}] + }, + { + "id": "placement22", + "displayText": " ", + "gridArea": ["5", "2", "6", "3"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[12,7]}] + }, + { + "id": "placement23", + "displayText": " ", + "gridArea": ["5", "3", "6", "4"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[12,7]}] + }, + { + "id": "placement24", + "displayText": " ", + "gridArea": ["5", "4", "6", "5"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[12,7]}] + }, + { + "id": "placement25", + "displayText": " ", + "gridArea": ["5", "5", "6", "6"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[12,7]}] + }, + { + "id": "placement26", + "displayText": " ", + "gridArea": ["5", "6", "6", "7"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[12,7]}] + }, + { + "id": "placement27", + "displayText": " ", + "gridArea": ["5", "7", "6", "8"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[12,7]}] + }, + { + "id": "placement28", + "displayText": " ", + "gridArea": ["5", "8", "6", "9"], + "class": "highlight", + "type": "action", + "executables": [{"type": "layer", "args":[12,7]}] + }, + { + "id": "placement29", + "displayText": " ", + "gridArea": ["5", "9", "6", "10"], + "class": "yellow", + "type": "action", + "executables": [{"type": "layer", "args":[12,7]}] + }, + { + "id": "placement11", + "displayText": " ", + "gridArea": ["6", "1", "7", "2"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[12,7]}] + }, + { + "id": "placement12", + "displayText": " ", + "gridArea": ["6", "2", "7", "3"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[12,7]}] + }, + { + "id": "placement13", + "displayText": " ", + "gridArea": ["6", "3", "7", "4"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[12,7]}] + }, + { + "id": "placement14", + "displayText": " ", + "gridArea": ["6", "4", "7", "5"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[12,7]}] + }, + { + "id": "placement15", + "displayText": " ", + "gridArea": ["6", "5", "7", "6"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[12,7]}] + }, + { + "id": "placement16", + "displayText": " ", + "gridArea": ["6", "6", "7", "7"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[12,7]}] + }, + { + "id": "placement17", + "displayText": " ", + "gridArea": ["6", "7", "7", "8"], + "class": "gray", + "type": "action", + "executables": {"type": "layer", "args":[12,7]}] + }, + { + "id": "placement18", + "displayText": " ", + "gridArea": ["6", "8", "7", "9"], + "class": "gray", + "type": "action", + "executables": [{"type": "layer", "args":[12,7]}] + }, + { + "id": "placement19", + "displayText": " ", + "gridArea": ["6", "9", "7", "10"], + "class": "gray", + "type": "action", + "executables": {"type": "layer", "args":[12,7]}] + } + ] + ] + } +} \ No newline at end of file diff --git a/replit.nix b/replit.nix new file mode 100644 index 00000000..11e88c02 --- /dev/null +++ b/replit.nix @@ -0,0 +1,6 @@ +{ pkgs }: { + deps = [ + pkgs.nodejs-16_x + pkgs.cowsay + ]; +} \ No newline at end of file diff --git a/src/admin/routes/api.js b/src/admin/routes/api.js index 90b05c44..efe21c71 100644 --- a/src/admin/routes/api.js +++ b/src/admin/routes/api.js @@ -4,6 +4,7 @@ let router = Router(); const config = require("../../../config/config.json"); const { TeamMatchPerformance } = require("../../lib/db"); +const DEMO = true; router.use((req,res,next) => { if (!ScoutingSync.initialized) { @@ -14,6 +15,7 @@ router.use((req,res,next) => { }) router.get("/auth", (req, res) => { + if(!DEMO){ if (config.secrets.ACCESS_CODE === "") { res.json({status: 2}) } else if (config.secrets.ACCESS_CODE == req.headers.authorization) { @@ -21,14 +23,21 @@ router.get("/auth", (req, res) => { } else { res.json({status: 0}) } + } else { + res.json({status: 2}) + } }) router.get("/scouters", (req,res) => { + if(!DEMO){ if (req.headers.authorization === config.secrets.ACCESS_CODE) { res.json(ScoutingSync.getScouters()) } else { res.json({error: "Not Authorized"}) } + } else { + res.json(ScoutingSync.getScouters()) + } }); router.get("/data", async (req,res) => { @@ -36,7 +45,8 @@ router.get("/data", async (req,res) => { }) -router.get("/enterMatch", (req,res) => { +router.get("/enterMatch", async (req,res) => { + if(!DEMO){ if (req.headers.authorization === config.secrets.ACCESS_CODE) { for (let scouter of ScoutingSync.scouters) { if (scouter.state.status == ScoutingSync.SCOUTER_STATUS.WAITING) @@ -47,8 +57,21 @@ router.get("/enterMatch", (req,res) => { } else { res.json({error: "Not Authorized"}) } + } else { + let test = await ScoutingSync.getMatches() + res.json({ + "allMatches": test, + "currentMatch": ScoutingSync.match + }) + for (let scouter of ScoutingSync.scouters) { + if (scouter.state.status == ScoutingSync.SCOUTER_STATUS.WAITING) + scouter.socket.emit("enterMatch"); + } + res.json(true); + } }) router.post("/setMatch", (req,res) => { + if(!DEMO){ if (req.headers.authorization === config.secrets.ACCESS_CODE) { ScoutingSync.setMatch(req.body); ScoutingSync.assignScouters(); @@ -56,6 +79,11 @@ router.post("/setMatch", (req,res) => { } else { res.json({error: "Not Authorized"}) } + } else { + ScoutingSync.setMatch(req.body); + ScoutingSync.assignScouters(); + res.json(true); + } }); router.get("/matches", async (req,res) => { diff --git a/src/analysis/modules/Bar/index.js b/src/analysis/modules/Bar/index.js index 29165604..6da3438e 100644 --- a/src/analysis/modules/Bar/index.js +++ b/src/analysis/modules/Bar/index.js @@ -1,3 +1,4 @@ + class Bar { container; moduleConfig; diff --git a/src/analysis/modules/Grid/index.js b/src/analysis/modules/Grid/index.js new file mode 100644 index 00000000..89a1f912 --- /dev/null +++ b/src/analysis/modules/Grid/index.js @@ -0,0 +1,52 @@ +class Grid { + container; + moduleConfig; + + constructor(moduleConfig) { + this.moduleConfig = moduleConfig + this.container = createDOMElement("div", "container grid") + } + + formatData(teams, dataset) { + const data = {}; + data.title = this.moduleConfig.name; + data.cols = this.moduleConfig.options.cols; + data.rows = this.moduleConfig.options.rows; + let mapped = this.moduleConfig.options.cells.map((cell)=>{ + let newObj = { + x:cell.x, + y:cell.y, + data:teams.map((team)=>{let data = getPath(dataset.teams[team],cell.path,0).toFixed(this.moduleConfig.options.decimals);console.log(data);return data }).reduce((acc, i) => acc + parseFloat(i), 0).toFixed(this.moduleConfig.options.decimals), + hex:cell.hex, + } + return newObj + }) + data.cells = mapped + return data + } +/* + +*/ + setData(data) { + this.container.innerHTML=""; + var title = createDOMElement('div','header'); + title.innerHTML = data.title + this.container.appendChild(title) + var gridContainer = createDOMElement('div','table') + gridContainer.style.display = 'grid'; + gridContainer.style.gridTemplateRows = `repeat(${data.rows},1fr)`; + gridContainer.style.gridTemplateColumns = `repeat(${data.cols},1fr)`; + this.container.appendChild(gridContainer) + var slope = 225/(this.moduleConfig.options.max - this.moduleConfig.options.min) + + for(let cell of data.cells){ + var opacity = Math.min(30 + slope * (cell.data-this.moduleConfig.options.min),255) + let newHex = cell.hex + Math.floor(opacity).toString(16) + var cellDiv = createDOMElement('div','cell') + cellDiv.style.backgroundColor = newHex; + cellDiv.innerHTML = cell.data; + cellDiv.style.gridArea = `${cell.y}/${cell.x}/${cell.y+1}/${cell.x+1}` + gridContainer.appendChild(cellDiv) + } + } +} \ No newline at end of file diff --git a/src/analysis/modules/Grid/style.css b/src/analysis/modules/Grid/style.css new file mode 100644 index 00000000..c3e46157 --- /dev/null +++ b/src/analysis/modules/Grid/style.css @@ -0,0 +1,25 @@ +.grid.container { + width: 90%; + background-color: var(--bg-alt); + border-radius: var(--border-radius); + border: 2px solid var(--accent-alt); + box-sizing: border-box; + padding:2% +} +.table > div { + margin:.2vw; + font-size:1.5em; + text-align:center; + box-sizing: border-box; + border-radius: calc(var(--border-radius) / 2); +} +.grid.container > .header{ + text-align:center; + font-size: 2em; +} +.cell{ + text-align:center; + box-sizing: border-box; + border-radius: calc(var(--border-radius) / 2); + +} \ No newline at end of file diff --git a/src/analysis/public/css/style.css b/src/analysis/public/css/style.css index 9f260fdc..e87b2ed0 100644 --- a/src/analysis/public/css/style.css +++ b/src/analysis/public/css/style.css @@ -43,7 +43,7 @@ body { } #dashboard { - grid-area: 2 / 2 / 4 / 4; + grid-area: 1 / 2 / 4 / 4; overflow: hidden; position: relative; } @@ -58,7 +58,7 @@ body { } #team-view.side-enabled { - grid-template-columns: 65% 35%; + grid-template-columns: 75% 25%; } #main-list { @@ -242,7 +242,7 @@ body { #dashboard > div.visible { visibility: unset; - height: calc(100vh - 75px); + height: calc(100vh); opacity: 1; transition: visibility 0s 0s, opacity 0.3s 0s; } @@ -368,7 +368,7 @@ body { } #dashboard > div.visible { - height: calc(100vh - 40px); + height: calc(100vh); } #main-list { diff --git a/src/analysis/public/js/script.js b/src/analysis/public/js/script.js index 5e0310f2..9d9d363c 100644 --- a/src/analysis/public/js/script.js +++ b/src/analysis/public/js/script.js @@ -53,8 +53,11 @@ if ('serviceWorker' in navigator) { const allTeams = await fetchTeams() //add to sidebar team list for (const [teamNumber, team] of Object.entries(dataset.teams)) { - const teamContainer = constructTeam(teamNumber, team, allTeams) - teamList.appendChild(teamContainer) + // console.log(`team: ${Object.keys(team)}\n num: ${teamNumber}\n allTeams: ${allTeams[teamNumber]}`) + if(allTeams[teamNumber]){ + const teamContainer = constructTeam(teamNumber, team, allTeams) + teamList.appendChild(teamContainer) + } } //enable sidebar if sidebar modules exist @@ -136,14 +139,17 @@ if ('serviceWorker' in navigator) { //get all dropdowns const teamSelects = Array.from(document.querySelectorAll(".alliance-selects")).map(g => Array.from(g.children)).flat() - + const allTeams = await fetchTeams() //populate dropdowns with team numbers for (const teamSelect of teamSelects) { for (const team of Object.keys(dataset.teams)) { - const option = createDOMElement("option") - option.innerText = team - option.value = team - teamSelect.appendChild(option) + // console.log(team) + if(allTeams[team]){ + const option = createDOMElement("option") + option.innerText = team + option.value = team + teamSelect.appendChild(option) + } } //on dropdown change diff --git a/src/analysis/transformers/average.js b/src/analysis/transformers/average.js index b83ea398..0316f068 100644 --- a/src/analysis/transformers/average.js +++ b/src/analysis/transformers/average.js @@ -10,11 +10,13 @@ module.exports = { for (const [teamNumber, team] of Object.entries(dataset.teams)) { const teamTmps = dataset.tmps.filter(x=>x.robotNumber == teamNumber); //only the tmps that are this team's const pathResult = getPath(teamTmps[0], options.path) - if (typeof pathResult == "object" && pathResult !== null) { //average all properties in object + + if (typeof pathResult == "object" && pathResult !== null) { //average all properties in object let out = {}; for (let subpath in getPath(teamTmps[0], options.path)) { - const filteredTeamTmps = teamTmps.filter((tmp) => getPath(tmp, `${options.path}.${subpath}`) !== null) - let average = filteredTeamTmps.reduce((acc, tmp) => { + + const filteredTeamTmps = teamTmps.filter((tmp) => getPath(tmp, `${options.path}.${subpath}`,null) !== null) + let average = filteredTeamTmps.reduce((acc, tmp) => { return acc + getPath(tmp, `${options.path}.${subpath}`) //if this is causing an error, your tmps may not have the same schema (eg. some keys (which you are trying to average) are not defined in some tmps) }, 0) / filteredTeamTmps.length; out[subpath] = average; diff --git a/src/analysis/transformers/countHybrid.js b/src/analysis/transformers/countHybrid.js new file mode 100644 index 00000000..2fb3ad12 --- /dev/null +++ b/src/analysis/transformers/countHybrid.js @@ -0,0 +1,40 @@ +const {DataTransformer} = require("../DataTransformer"); +const { getPath, setPath } = require("../../lib/util"); + +module.exports = { + /** + count number of each piece placed in hybrid slots + * @type {DataTransformer} + * @param options.pickup {String[]} pickup ids for pieces + * @param options.hybrid {String[]} ids of hybrid slots + * @param options.actionArrayPath {String} path to array of actions + */ + tmp: new DataTransformer("countHybrid", (dataset, outputPath, options) => { + var actionArrayPath = options.actionArrayPath || "actionQueue" + for(let tmp of dataset.tmps){ + var heldPiece = ""; + var placements= {} + for(let id of options.pickup){ + placements[id] = 0; + } + for(let action of getPath(tmp,actionArrayPath)){ + if(options.pickup.includes(action.id)){ + heldPiece = action.id + } + if(options.hybrid.includes(action.id)){ + placements[heldPiece] = placements[heldPiece] +1; + } + } + setPath(tmp,outputPath,placements); + } + return dataset; + }), + + /** + * @type {DataTransformer} + * @param options.example {String} example parameter description + */ + team: new DataTransformer("countHybrid", (dataset, outputPath, options) => { + return dataset; + }) +} \ No newline at end of file diff --git a/src/analysis/transformers/cycle.js b/src/analysis/transformers/cycle.js index f88622a6..fc661663 100644 --- a/src/analysis/transformers/cycle.js +++ b/src/analysis/transformers/cycle.js @@ -52,7 +52,7 @@ module.exports = { //counts out.cycleCount = out.all.length; out.cycleCountComplete = out.allComplete.length; - + setPath(tmp,outputPath,out); } diff --git a/src/analysis/transformers/testingtesting123.js b/src/analysis/transformers/testingtesting123.js new file mode 100644 index 00000000..c7bbadab --- /dev/null +++ b/src/analysis/transformers/testingtesting123.js @@ -0,0 +1,28 @@ +const { getPath, setPath } = require("../../lib/util"); +const {DataTransformer} = require("../DataTransformer"); + +module.exports = { + /** + * @type {DataTransformer} + * @param options.addends {String[]} array of MatchTeamPerformance outputPaths + */ + tmp: new DataTransformer("test", (dataset, outputPath, options) => { + for (const tmp of dataset.tmps) { + // console.log(tmp) + } + + return dataset; + }), + + /** + * @type {DataTransformer} + * @param options.addends {String[]} array of Team outputPaths + */ + team: new DataTransformer("test", (dataset, outputPath, options) => { + for (const [teamNumber, team] of Object.entries(dataset.teams)) { + // console.log(team) + } + + return dataset; + }) +} \ No newline at end of file diff --git a/src/analysis/transformers/threshold.js b/src/analysis/transformers/threshold.js index 1b35cb4e..02f22007 100644 --- a/src/analysis/transformers/threshold.js +++ b/src/analysis/transformers/threshold.js @@ -3,7 +3,7 @@ const {DataTransformer} = require("../DataTransformer"); module.exports = { /** given a list of paths with numeric values, returns a list or delimited string of those paths that pass a minimum threshold - * @type {DataTransformer} + * @type {DataTransf {ormer} * @param options.threshold {Number} a number that all path values must be greater than to pass the threshold. if not specified, all values pass * @param options.separator {String} a string to join each passing name with. if not specified, return an array of names * @param options.none {String} a string to return if no values pass. a separator is required for this parameter to be used (optional) diff --git a/src/analysis/views/index.ejs b/src/analysis/views/index.ejs index 2925d406..1e6d4ffa 100644 --- a/src/analysis/views/index.ejs +++ b/src/analysis/views/index.ejs @@ -61,9 +61,7 @@ - +
diff --git a/src/app.js b/src/app.js index 587be139..f297e563 100644 --- a/src/app.js +++ b/src/app.js @@ -18,6 +18,7 @@ if (fs.existsSync("config/config.json")) { app.use("/analysis", require("./analysis/analysis.js")); app.use("/admin", require("./admin/admin.js")); app.use("/setup", require("./setup/setup.js")); + app.use("/checklist", require("./checklist/checklist.js")); } else { console.log(chalk.cyan.bold.underline("config.json not detected! First time setup flow enabled on server.")) app.use("/",require("./setup/setup.js")); diff --git a/src/checklist/checklist.js b/src/checklist/checklist.js new file mode 100644 index 00000000..9571dda1 --- /dev/null +++ b/src/checklist/checklist.js @@ -0,0 +1,13 @@ +express = require("express"); + +let router = express.Router(); + +router.use(express.static(__dirname + "/public")); + +router.get("/", (req,res) => { + res.render(__dirname + "/views/index.ejs"); +}) + +router.use("/api", require("./routes/api.js")); + +module.exports = router; \ No newline at end of file diff --git a/src/checklist/public/css/global.css b/src/checklist/public/css/global.css new file mode 100644 index 00000000..6ab477d6 --- /dev/null +++ b/src/checklist/public/css/global.css @@ -0,0 +1,28 @@ +:root { + --bg: #EFEFEF; + --text: #232323; + --bg-alt: #FEFEFE; + --accent: #30a2ff; + --accent-alt: #ff6030; + --error: #ff5166; + --light-gray: #bebebe; + --gray: #757575; + --green: #4caf50; + --placeholder: #a3a3a3; + --border-radius: 16px; + --font: Cairo, sans-serif +} +html { + overflow: hidden; + height: 100%; + position: fixed; +} + +body { + height: 100%; + position: relative; +} + +* { + font-family: var(--font, sans-serif) +} \ No newline at end of file diff --git a/src/checklist/public/css/internal.css b/src/checklist/public/css/internal.css new file mode 100644 index 00000000..bd38a33b --- /dev/null +++ b/src/checklist/public/css/internal.css @@ -0,0 +1,59 @@ +/***************************************************************** + !!!WARNING!!! + EVERYTHING HERE IS VERY IMPORTANT +DO NOT REMOVE OR MODIFY ANYTHING UNLESS YOU KNOW WHAT YOU'RE DOING +*****************************************************************/ +* { + box-sizing: border-box; +} + +body { + margin: 0; +} + +html { + height: 100%; + width: 100%; +} + +#spinner { + height: 300px; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + z-index: -1; +} + +.main-svg { + border-radius: var(--border-radius); +} + +/* width */ +::-webkit-scrollbar { + width: 10px; +} + +/* Track */ +::-webkit-scrollbar-track { + background: transparent; +} + +/* Handle */ +::-webkit-scrollbar-thumb { + background: var(--gray); + filter: saturate(0.8); + transition: 0.2s background; + border-radius: 999px; + width: 4px; + border: 3px solid rgba(0,0,0,0); + background-clip: padding-box; +} + +/* Handle on hover */ +::-webkit-scrollbar-thumb:hover { + background: var(--text); + width: 4px; + border: 3px solid rgba(0,0,0,0); + background-clip: padding-box; +} \ No newline at end of file diff --git a/src/checklist/public/css/style.css b/src/checklist/public/css/style.css new file mode 100644 index 00000000..81b56b8a --- /dev/null +++ b/src/checklist/public/css/style.css @@ -0,0 +1,142 @@ +body { + background-color: var(--bg); + } + + #app { + height: 100vh; + width: 100%; + display: grid; + grid-template-columns: 275px auto; + grid-template-rows: 75px 30px auto; + transition: 0.3s visibility, opacity; + opacity: 0; + visibility: hidden; + background-color: var(--bg); + overflow: hidden; + } + + #app.visible { + visibility: unset; + opacity: 1; + transition: visibility 0s 0s, opacity 0.3s 0s; + } + + /* styling for page header */ + #header { + background: var(--text); + height: 100px; + width: 100px; + border-bottom: 0.25vh solid white; + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + padding: 0 20px; + box-shadow: 0 0 12px -2px #ff6030; + grid-area: 1 / 2 / 2 / 4; + } + /* styling for logo */ + #logo { + height: 95px; + width: 100%; + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + grid-area: 1 / 1 / 3 / 2; + gap: 25px; + + background-color: var(--accent-alt); + } + + #logo-img { + height: 50px;; + } + + #logo-text { + color: white; + font-size: 2.5rem; + } + /* styling for buttons */ + .team-container { + border-radius: 16px; + border: 2px solid var(--accent-alt); + background-color: var(--bg); + padding: 16px; + border-top-width: 2px; + display: flex; + flex-direction: column; + gap: 10px; + cursor: pointer; + transition: 0.3s border, 0.3s background-color; + width: 75%; + justify-items: center; + + } + /* team number */ + .team-container > .team-number { + text-align: center; + text-justify: center; + width: 100%; + color: var(--accent-alt); + font-weight: 600; + font-size: 2.0rem; + line-height: 2.0rem; + transition: 0.3s color; + } + /* team name */ + .team-container > .team-name { + text-align: center; + text-justify: center; + width: 100%; + font-size: 1.8rem; + line-height: 1.6rem; + color: var(--text); + transition: 0.3s color; + } + /* styling for buttons when selected */ + .team-container.selected { + background-color: var(--accent-alt); + border-top-width: 2px; + } + + .team-container.selected > .team-number, .team-container.selected > .team-name { + color: var(--bg); + } + /* styling for pick list */ + #pick-list { + height: 100%; + width: 100%; + overflow-y: auto; + overflow-x: hidden; + gap: 20px; + display: flex; + flex-direction: column; + padding-top: 20px; + align-items: center; + } + + + @media screen and (max-width: 1100px) { + html { + font-size: 75%; + } + + #app { + grid-template-columns: 200px auto; + grid-template-rows: 40px 20px auto; + } + + #dashboard > div.visible { + height: calc(100vh - 40px); + } + + #main-list { + padding: 25px 0; + } + + #side-list { + padding: 25px 0; + } + } + \ No newline at end of file diff --git a/src/checklist/public/icons/android-chrome-192x192.png b/src/checklist/public/icons/android-chrome-192x192.png new file mode 100644 index 00000000..9cce4775 Binary files /dev/null and b/src/checklist/public/icons/android-chrome-192x192.png differ diff --git a/src/checklist/public/icons/android-chrome-512x512.png b/src/checklist/public/icons/android-chrome-512x512.png new file mode 100644 index 00000000..27f826c1 Binary files /dev/null and b/src/checklist/public/icons/android-chrome-512x512.png differ diff --git a/src/checklist/public/icons/apple-touch-icon.png b/src/checklist/public/icons/apple-touch-icon.png new file mode 100644 index 00000000..dfa8a225 Binary files /dev/null and b/src/checklist/public/icons/apple-touch-icon.png differ diff --git a/src/checklist/public/icons/browserconfig.xml b/src/checklist/public/icons/browserconfig.xml new file mode 100644 index 00000000..0cfc3dc1 --- /dev/null +++ b/src/checklist/public/icons/browserconfig.xml @@ -0,0 +1,9 @@ + + + + + + #fefefe + + + diff --git a/src/checklist/public/icons/favicon-16x16.png b/src/checklist/public/icons/favicon-16x16.png new file mode 100644 index 00000000..a6155191 Binary files /dev/null and b/src/checklist/public/icons/favicon-16x16.png differ diff --git a/src/checklist/public/icons/favicon-32x32.png b/src/checklist/public/icons/favicon-32x32.png new file mode 100644 index 00000000..774418b4 Binary files /dev/null and b/src/checklist/public/icons/favicon-32x32.png differ diff --git a/src/checklist/public/icons/favicon.ico b/src/checklist/public/icons/favicon.ico new file mode 100644 index 00000000..e426fc53 Binary files /dev/null and b/src/checklist/public/icons/favicon.ico differ diff --git a/src/checklist/public/icons/mstile-150x150.png b/src/checklist/public/icons/mstile-150x150.png new file mode 100644 index 00000000..cc7b02ac Binary files /dev/null and b/src/checklist/public/icons/mstile-150x150.png differ diff --git a/src/checklist/public/icons/safari-pinned-tab.svg b/src/checklist/public/icons/safari-pinned-tab.svg new file mode 100644 index 00000000..c421bfae --- /dev/null +++ b/src/checklist/public/icons/safari-pinned-tab.svg @@ -0,0 +1,591 @@ + + + + +Created by potrace 1.14, written by Peter Selinger 2001-2017 + + + + + + + + + + + + + diff --git a/src/checklist/public/icons/site.webmanifest b/src/checklist/public/icons/site.webmanifest new file mode 100644 index 00000000..b9319c60 --- /dev/null +++ b/src/checklist/public/icons/site.webmanifest @@ -0,0 +1,19 @@ +{ + "name": "", + "short_name": "", + "icons": [ + { + "src": "android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "android-chrome-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ], + "theme_color": "#fefefe", + "background_color": "#fefefe", + "display": "standalone" +} diff --git a/src/checklist/public/img/spinner.svg b/src/checklist/public/img/spinner.svg new file mode 100644 index 00000000..c0e7e57e --- /dev/null +++ b/src/checklist/public/img/spinner.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/checklist/public/js/elements.js b/src/checklist/public/js/elements.js new file mode 100644 index 00000000..e8fca351 --- /dev/null +++ b/src/checklist/public/js/elements.js @@ -0,0 +1,2 @@ +const header = document.getElementById("header") +const pickList = document.getElementById("pick-list") diff --git a/src/checklist/public/js/script.js b/src/checklist/public/js/script.js new file mode 100644 index 00000000..7f8c3041 --- /dev/null +++ b/src/checklist/public/js/script.js @@ -0,0 +1,56 @@ + +//get teams from the team list +async function fetchTeams() { + const teams = await fetch(`/analysis/api/teams`).then(res => res.json()) + return teams.reduce((acc, t) => { + acc[t.team_number] = t.nickname + return acc + }, {}) +} +async function loadTeamsPickList(dataset) { + //get blue alliance teams + const allTeams = await fetchTeams(); + //add to pick list + for (const [teamNumber, team] of Object.entries(dataset.teams)) { + const PickListTeamContainer = constructTeam(teamNumber, team, allTeams) + pickList.appendChild(PickListTeamContainer) + } + +} + +//makes buttons toggleable +function displayTeam(teamContainer) { + teamContainer.classList.toggle("selected") + showFade(teamView) +} + +// create team containers +function constructTeam(teamNumber, team, allTeams) { + + const teamContainer = createDOMElement("button", "team-container") + const teamNumDisplay = createDOMElement("div", "team-number") + teamNumDisplay.innerText = teamNumber + teamContainer.setAttribute("num", teamNumber) + teamContainer.appendChild(teamNumDisplay) + if (allTeams) { + const teamNameDisplay = createDOMElement("div", "team-name") + teamNameDisplay.innerText = allTeams[teamNumber] + teamContainer.appendChild(teamNameDisplay) + } + // listens for button clicked + teamContainer.addEventListener("click", async () => { + displayTeam(teamContainer) + }) + + return teamContainer +} + +// grabs data set +async function fetchDataset() { + return await fetch("/analysis/api/dataset").then(res => res.json()) +} + +(async ()=>{ + var data = await fetchDataset(); + loadTeamsPickList(data); +})(); diff --git a/src/checklist/public/js/ui-elements.js b/src/checklist/public/js/ui-elements.js new file mode 100644 index 00000000..231ac169 --- /dev/null +++ b/src/checklist/public/js/ui-elements.js @@ -0,0 +1,162 @@ +class Modal { + blind; // dimmed background element (closes modal on click) + close; // close button element + element; // main modal container element + modalExit; // function to close and destroy the modal + dismissButton; // optional dismiss button element + cancel; // cancel function passed in + + constructor(size, closable=true) { + this.blind = document.createElement("div") + this.blind.classList = "modal-blind" + this.element = document.createElement("div") + this.element.classList = `modal ${size}` + + this.modalExit = () => { + hideFade(this.blind) + hideFade(this.element) + setTimeout(() => { + document.body.removeChild(this.blind) + document.body.removeChild(this.element) + }, 300) + } + + if (closable) { + this.close = document.createElement("i") + this.close.classList = "fa fa-times modal-close" + + this.blind.addEventListener("click", this.modalExit) + this.close.addEventListener("click", this.modalExit) + this.element.appendChild(this.close) + } + document.body.appendChild(this.blind) + document.body.appendChild(this.element) + this.blind.offsetHeight + this.element.offsetHeight + showFade(this.blind) + showFade(this.element) + return this + } + + assignCancel(cancelFunction) { + this.blind.addEventListener("click", cancelFunction) + this.close.addEventListener("click", cancelFunction) + this.dismissButton ? this.dismissButton.addEventListener("click", cancelFunction) : null + this.cancel = cancelFunction + } + + header(text) { + const headerElement = document.createElement("div") + headerElement.innerHTML = text + headerElement.classList.add("header") + this.element.appendChild(headerElement) + return this + } + + text(text) { + const textElement = document.createElement("div") + textElement.innerHTML = text + textElement.classList.add("text") + this.element.appendChild(textElement) + return this + } + + image(src) { + const imgElement = document.createElement("img") + imgElement.src = src + this.element.appendChild(imgElement) + return this + } + + center(horizontal = true, vertical = false) { + if (vertical) { + this.element.classList.add("main-center") + } + + if (horizontal) { + this.element.classList.add("alt-center") + } + + return this + } + + dismiss(buttonText = "Dismiss") { + const buttonElement = document.createElement("button") + buttonElement.innerText = buttonText + buttonElement.addEventListener("click", this.modalExit) + this.cancel ? buttonElement.addEventListener("click", this.cancel) : null + this.element.appendChild(buttonElement) + + return this + } + + action(buttonText, func) { + const buttonElement = document.createElement("button") + buttonElement.innerText = buttonText + buttonElement.addEventListener("click", func); + this.element.appendChild(buttonElement); + + return this + } +} + +function showFade(element) { + element.classList.add("visible") +} + +function hideFade(element) { + element.classList.remove("visible") +} + +class Popup { + static types = { + "error": { + "prefix": "Error: ", + "color": "var(--error)" + }, + + "notice": { + "prefix": "", + "color": "var(--accent)" + }, + + "success": { + "prefix": "", + "color": "var(--green)" + }, + } + popupElement; + + constructor(type, text, duration = 5000) { + this.popupElement = document.createElement("p") + this.popupElement.classList = "popup" + this.popupElement.style.backgroundColor = Popup.types[type].color + this.popupElement.innerText = Popup.types[type].prefix + text + document.body.appendChild(this.popupElement) + this.popupElement.offsetHeight + this.popupElement.style.top = "55px" + setTimeout(() => { + this.popupElement.style.top = "0" + setTimeout(() => { + document.body.removeChild(this.popupElement) + }, 600) + }, duration) + } + setText(text) { + this.popupElement.innerText = text; + return this; + } + setType(type) { + this.popupElement.style.backgroundColor = Popup.types[type].color; + return this; + } +} + +function createDOMElement(tag, classes, id) { + const element = document.createElement(tag) + element.classList = classes + if (id) { + element.id = id + } + return element +} \ No newline at end of file diff --git a/src/checklist/routes/api.js b/src/checklist/routes/api.js new file mode 100644 index 00000000..a58b0ac5 --- /dev/null +++ b/src/checklist/routes/api.js @@ -0,0 +1,28 @@ +const { Router } = require("express"); +let router = Router(); +const config = require("../../../config/config.json"); +const { TeamMatchPerformance } = require("../../lib/db"); + + +router.get("/auth", (req, res) => { + if (config.secrets.ACCESS_CODE === "") { + res.json({status: 2}) + } else if (config.secrets.ACCESS_CODE == req.headers.authorization) { + res.json({status: 1}) + } else { + res.json({status: 0}) + } +}) + + +router.get("/data", async (req,res) => { + res.json(await TeamMatchPerformance.find()); +}) + +router.get("/matches", async (req,res) => { + res.json({ + "allMatches": await ScoutingSync.getMatches(), + "currentMatch": ScoutingSync.match + }) +}) +module.exports = router; \ No newline at end of file diff --git a/src/checklist/views/index.ejs b/src/checklist/views/index.ejs new file mode 100644 index 00000000..be0d472c --- /dev/null +++ b/src/checklist/views/index.ejs @@ -0,0 +1,47 @@ + + + + + + + + SPOT - Pick List + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + \ No newline at end of file diff --git a/src/scouting/public/css/match-scouting.css b/src/scouting/public/css/match-scouting.css index 26112831..efc12ead 100644 --- a/src/scouting/public/css/match-scouting.css +++ b/src/scouting/public/css/match-scouting.css @@ -14,7 +14,7 @@ width: 99%; height: 93.5%; display: grid; - grid-gap: .75vw; + grid-gap: 3vw; border-radius: var(--border-radius, 16px); padding: .5vmin } @@ -44,6 +44,15 @@ background-color: #2D2D2D } +.button-padding { + padding: 5vw; +} + +.silver { + border: 3px solid #2d2d2d; + background-color: #919191 +} + .green { background-color: #4caf50 } @@ -53,15 +62,23 @@ } .red { - background-color: #ff4436 + background-color: #ff4436; } .navy { - background-color: #3f51b5 + background-color: #3f51b5; } .pink { - background-color: #f06292 + background-color: #f06292; +} + +.yellow{ + background-color:#d8c24f; +} + +.border{ + border: 4px solid #37cde1; } .highlight { diff --git a/src/scouting/public/js/match-scouting.js b/src/scouting/public/js/match-scouting.js index 847e984c..bbc76b9a 100644 --- a/src/scouting/public/js/match-scouting.js +++ b/src/scouting/public/js/match-scouting.js @@ -124,7 +124,7 @@ let devEnd button.timerInterval = setInterval(() => { if (time <= transitions[0]) { //move to the next transition if it is time displayText = matchScoutingConfig.timing.timeTransitions[transitions[0]].displayText; - showLayer(matchScoutingConfig.timing.timeTransitions[transitions[0]].layer); + // showLayer(matchScoutingConfig.timing.timeTransitions[transitions[0]].layer); transitions.shift() } if (time <= 0) { diff --git a/src/scouting/scouting-sync.js b/src/scouting/scouting-sync.js index 42d06413..0ed4da47 100644 --- a/src/scouting/scouting-sync.js +++ b/src/scouting/scouting-sync.js @@ -9,7 +9,7 @@ const {TeamMatchPerformance} = require("../lib/db.js"); const axios = require("axios"); const config = require("../../config/config.json"); const chalk = require("chalk"); - +const DEMO = true; module.exports = (server) => { if (!ScoutingSync.initialized) { if (!server) { @@ -145,18 +145,24 @@ class ScoutingSync { x.state.status == ScoutingSync.SCOUTER_STATUS.WAITING && x.state.connected); - //if anyone is scouting the match, tell all waiting scouters to start - if (ScoutingSync.scouters.filter(x=> - x.state.matchNumber == ScoutingSync.match.number && - x.state.status == ScoutingSync.SCOUTER_STATUS.SCOUTING - ).length > 0) { - for (let scouter of currentMatchWaitingScouters) { - scouter.socket.emit("enterMatch"); - } - } else if (currentMatchWaitingScouters.length >= 6) { //if there are 6 scouters waiting, enter match. - for (let scouter of currentMatchWaitingScouters) { - scouter.socket.emit("enterMatch"); - } + if(!DEMO){ + //if anyone is scouting the match, tell all waiting scouters to start + if (ScoutingSync.scouters.filter(x=> + x.state.matchNumber == ScoutingSync.match.number && + x.state.status == ScoutingSync.SCOUTER_STATUS.SCOUTING + ).length > 0) { + for (let scouter of currentMatchWaitingScouters) { + scouter.socket.emit("enterMatch"); + } + } else if (currentMatchWaitingScouters.length >= 6) { //if there are 6 scouters waiting, enter match. + for (let scouter of currentMatchWaitingScouters) { + scouter.socket.emit("enterMatch"); + } + } + } else { + for (let scouter of currentMatchWaitingScouters) { //for demo, everyone should enter immediately + scouter.socket.emit("enterMatch"); + } } } @@ -205,8 +211,12 @@ class Scouter { }) this.socket.on("syncData", async (clientTeamMatchPerformanceIds, requestTeamMatchPerformances) => { + if(!DEMO){ const serverTeamMatchPerformanceIds = (await TeamMatchPerformance.find()).map(teamMatchPerformance => teamMatchPerformance.matchId) requestTeamMatchPerformances(clientTeamMatchPerformanceIds.filter(clientTeamMatchPerformanceId => !serverTeamMatchPerformanceIds.includes(clientTeamMatchPerformanceId))) + } else { + requestTeamMatchPerformances([]) //dont request any tmps for the demo + } }) // comment out the clearData command // this.socket.on("clearData", async () => {