diff --git a/2025/reefscape_config.js b/2025/reefscape_config.js index 0a354e4de..be5482b5f 100644 --- a/2025/reefscape_config.js +++ b/2025/reefscape_config.js @@ -1,3 +1,4 @@ +var authKey = "TBA KEY HERE"; // Replace TBA KEY HERE with your actual The Blue Alliance Auth Key var config_data = ` { "dataFormat": "tsv", diff --git a/README.md b/README.md index 37d613d82..e15882e3a 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,14 @@
-# Scouting P.A.S.S. +# Scouting P.A.S.S -#### A scouting system for FIRST FRC competitions developed by [PWNAGE - Team #2451](https://pwnagerobotics.org). +#### A scouting system for FIRST FRC competitions developed by [PWNAGE - Team #2451](https://pwnagerobotics.org) Live Demo . Pit Scouting . Getting Started . FAQ ![Stars](https://img.shields.io/github/stars/PWNAGERobotics/ScoutingPASS?style=plastic) ![Forks](https://img.shields.io/github/forks/PWNAGERobotics/ScoutingPASS?style=plastic) ![watchers](https://img.shields.io/github/watchers/PWNAGERobotics/ScoutingPASS?style=plastic)

-
Table of Contents @@ -32,33 +31,48 @@
-# Features: +# Features + ### **Configurable** - * A JSON configuration file controls the elements of the game to track. Create a new configuration file each year for the new game, or tweak it week to week to refine your scouting. No additional coding is needed. See the [Configuration Docs](docs/Configuration.md) for details. + +* A JSON configuration file controls the elements of the game to track. Create a new configuration file each year for the new game, or tweak it week to week to refine your scouting. No additional coding is needed. See the [Configuration Docs](docs/Configuration.md) for details. + ### **Universal** - * Works on any device that has a web browser that runs JavaScript. Apple, Android, phones, tablets, laptops, it works on them all. + +* Works on any device that has a web browser that runs JavaScript. Apple, Android, phones, tablets, laptops, it works on them all. + ### **Low/No Bandwidth** - * Neither WiFi nor Cellular is required at the event. The web page can be downloaded before the event and doesn't need to be reloaded. + +* Neither WiFi nor Cellular is required at the event. The web page can be downloaded before the event and doesn't need to be reloaded. + ### **Easy hosting** - * Self-hosting via GitHub. (See directions below) + +* Self-hosting via GitHub. (See directions below) + ### [The Blue Alliance Integration](https://thebluealliance.com) - * Pull data for the event from The Blue Alliance. Team #s, Team Names and Schedules + +* Pull data for the event from The Blue Alliance. Team #s, Team Names and Schedules + ### [Google Sheets Integration](docs/GoogleSheets.md) - * Details on how to use ScoutingPASS with Google Sheets spreadsheet + +* Details on how to use ScoutingPASS with Google Sheets spreadsheet

(back to top)

## Live Application -This repository is hosted on GitHub Pages. You can view a live version of it here: https://PWNAGERobotics.github.io/ScoutingPASS. (You can host your version of the ScoutingPASS application on GitHub Pages as well.) + +This repository is hosted on GitHub Pages. You can view a live version of it here: . (You can host your version of the ScoutingPASS application on GitHub Pages as well.)

(back to top)

-## Description: +## Description + Scouting PASS is a web page displayed in a browser. It consists of 5 "swipeable" pages each representing a specific aspect of a FRC match: Pre-Match, Autonomous, Teleop, End Game and Post-Match. A configuration file allows the screens to be easily modified to collect any metrics that are important for your scouting needs. The scouter can use the "Next" or "Prev" buttons or a swiping motion on touchscreens to move between pages. A QR code is dynamically generated on the last page. This QR code can be scanned to transfer the data to your data repository. The QR code can also be stored for processing later using a screenshot or camera. Once the data has been transferred, the scout hits the clear button and the form is cleared out and ready for the next match. Configuration is as easy as creating a JSON file with the fields that your scouting team wants to track. Some fields are common to all teams and years. The basic fields are: + * Scouter - who is scouting this robot * Event - the event that is being scouted * Level - The level of competition (Qualifications, Double Elimination, Finals, etc) @@ -67,6 +81,7 @@ Configuration is as easy as creating a JSON file with the fields that your scout * Team # - What team is being scouted User defined fields can be of several different types: + * Text - A freeform text field * Number - Like text, but restricted to numbers * Counter - A counter that can be increased or decreased with a click or touch @@ -80,24 +95,27 @@ These should cover most of your scouting team's data collection needs. PWNAGE's Since this is an HTML/JavaScript web page, scouters can use almost any device that has a web browser. If the device has a touchscreen the screen can be used to swipe back and forth between pages and interact with the data elements. The webpage only needs to be loaded once. Once loaded the functionality and data is stored locally in the webpage and doesn't need to be reloaded. The QR code generation and clear button only resets the form and does not cause the page to reload. This means that a cellular or WiFi connection is not needed at the competition as long as the webpage is loaded before the event. -If your team has a The Blue Alliance API access token (See https://www.thebluealliance.com/apidocs) the web page will pull team and schedule information from The Blue Alliance. Put your access token in the authKey variable in resources/js/TBAInterface.js and when the web page is loaded it will load the data (for the event code in the Event field). This enables some features on the PreMatch Screen. With the team information the team name will populate just below the Team # field when the team # field is filled in. If the schedule information is available when the web page is loaded then when the match and robot fields are populated it will automatically populate the team number and team name for the scouter. This reduces typo errors when entering the team numbers manually. (Schedules are usually published before the event a day or two before matches start. However, it may be delayed for various reasons and may only be published hours or minutes before the start of a competition.) +If your team has a The Blue Alliance API access token (See ) the web page will pull team and schedule information from The Blue Alliance. Put your access token in the authKey variable in the config file for the year and when the web page is loaded it will load the data (for the event code in the Event field). This enables some features on the PreMatch Screen. With the team information the team name will populate just below the Team # field when the team # field is filled in. If the schedule information is available when the web page is loaded then when the match and robot fields are populated it will automatically populate the team number and team name for the scouter. This reduces typo errors when entering the team numbers manually. (Schedules are usually published before the event a day or two before matches start. However, it may be delayed for various reasons and may only be published hours or minutes before the start of a competition.) The QR code can be read by a web camera or hand scanner to import the data into the Excel scouting database. The hand scanner used reads the QR code and inputs the data as if it is typed in from a keyboard. Included in this repository is the Excel code to pop up an input window and parse the QR data into a row in Excel. (see the [Excel directory](Excel))

(back to top)

-## Getting Started: +## Getting Started + It's really simple to get started: + * Fork GitHub project (as public if you want to host on GitHub Pages) * Change configuration file (REEFSCAPE example in [2025](2025) folder) * Change the data elements to capture (OPTIONAL: only if desired) * Enable GitHub Pages in your repository settings ([GitHub Pages Instructions](https://pages.github.com/)) * Load page via GitHub pages (https://.github.io/ScoutingPASS) +

To enable The Blue Alliance API: -* Put your API token in the authKey variable in resources/js/TBAInterface.js. (line 4) +* Put your API token in the authKey variable in the yearly config. * Reload your page. Note: For this to work, the schedule has to be posted to The Blue Alliance. That usually doesn't happen until just before the event. (a few days to a few hours) To test this you can point it to a past event. Set the event to 2020ilch. Reload the page to load the schedule for that event. Select Match 6 and Blue-2. You should see it populate the Team # to 2451, and the next line will show the team name, PWNAGE. @@ -105,11 +123,11 @@ Note: For this to work, the schedule has to be posted to The Blue Alliance. Tha

(back to top)

-## Pit Scouting: +## Pit Scouting -ScountingPASS now supports Pit Scouting +ScoutingPASS now supports Pit Scouting -To access the pit scouting page, add '/pit.html' to the end of your URL. (i.e. http://pwnagerobotics.github.io/ScoutingPASS/pit.html) +To access the pit scouting page, add '/pit.html' to the end of your URL. (i.e. ) It works almost exactly like the main scouting pages, except there is only one page of input. Once your scouters have filled out the information, swipe left to display the QR code. That QR code can be scanned to push the data to Excel. @@ -149,7 +167,7 @@ Don't forget to give the project a star!

(back to top)

-## Frequently Asked Questions: +## Frequently Asked Questions
Why hardcode and disable the event field?
@@ -189,23 +207,25 @@ Note: The Auto Start (as) element is special in that it will only keep track of

(back to top)

-## Things we might want to add someday: -* Add images to Pit Scouting -* More options for processing the QR code -* Mac version of Excel spreadsheet -* Drag and Drop configuration editing (Avoid JSON editing) -* Better Google Sheets integration/instructions -* Improve look and feel -* Create videos to illustrate how to setup, configure, and use the application -* Better error messages -* Pre-parse JSON for validity to avoid cryptic errors when parsing -* Incorporate [Statbotics.io](http://statbotics.io/) data -* See [issues](https://github.com/PWNAGERobotics/ScoutingPASS/issues) for more +## Things we might want to add someday + +* [ ] Add images to Pit Scouting +* [ ] More options for processing the QR code +* [ ] Mac version of Excel spreadsheet +* [ ] Drag and Drop configuration editing (Avoid JSON editing) +* [ ] Better Google Sheets integration/instructions +* [ ] Improve look and feel +* [ ] Create videos to illustrate how to setup, configure, and use the application +* [ ] Better error messages +* [ ] Pre-parse JSON for validity to avoid cryptic errors when parsing +* [ ] Incorporate [Statbotics.io](http://statbotics.io/) data +* [ ] See [issues](https://github.com/PWNAGERobotics/ScoutingPASS/issues) for more

(back to top)

## License + Distributed under the GNU GPL v3.0 License. See `LICENSE` for more information.

(back to top)

diff --git a/archive/2020/IR_config.js b/archive/2020/IR_config.js index 6e887adb7..7e7080cf4 100644 --- a/archive/2020/IR_config.js +++ b/archive/2020/IR_config.js @@ -1,3 +1,4 @@ +var authKey = "TBA KEY HERE"; // Replace TBA KEY HERE with your actual The Blue Alliance Auth Key var config_data = ` { "title":"Scouting PASS 2020", @@ -77,7 +78,7 @@ var config_data = ` "code": "ao", "type": "counter" }, - { "name": "Auto Aquire PCs", + { "name": "Auto Acquire PCs", "code": "aa", "type": "bool" }, diff --git a/archive/2022/RR_GS_config.js b/archive/2022/RR_GS_config.js index 5847030aa..03aa7aaab 100644 --- a/archive/2022/RR_GS_config.js +++ b/archive/2022/RR_GS_config.js @@ -1,3 +1,4 @@ +var authKey = "TBA KEY HERE"; // Replace TBA KEY HERE with your actual The Blue Alliance Auth Key var config_data = ` { "title": "Scouting PASS 2022", diff --git a/archive/2022/RR_config.js b/archive/2022/RR_config.js index dacdfb11d..f29d6aad4 100644 --- a/archive/2022/RR_config.js +++ b/archive/2022/RR_config.js @@ -1,3 +1,4 @@ +var authKey = "TBA KEY HERE"; // Replace TBA KEY HERE with your actual The Blue Alliance Auth Key var config_data = ` { "title": "Scouting PASS 2022", diff --git a/archive/2023/CU_GS_config.js b/archive/2023/CU_GS_config.js index 852aeef2e..a526ff49e 100644 --- a/archive/2023/CU_GS_config.js +++ b/archive/2023/CU_GS_config.js @@ -1,3 +1,4 @@ +var authKey = "TBA KEY HERE"; // Replace TBA KEY HERE with your actual The Blue Alliance Auth Key var config_data = ` { "title": "Scouting PASS 2023", diff --git a/archive/2023/CU_config.js b/archive/2023/CU_config.js index 5f131b92a..f3bff91ca 100644 --- a/archive/2023/CU_config.js +++ b/archive/2023/CU_config.js @@ -1,3 +1,4 @@ +var authKey = "TBA KEY HERE"; // Replace TBA KEY HERE with your actual The Blue Alliance Auth Key var config_data = ` { "dataFormat": "kvs", diff --git a/archive/2024/crescendo_config.js b/archive/2024/crescendo_config.js index acc673327..b6631412e 100644 --- a/archive/2024/crescendo_config.js +++ b/archive/2024/crescendo_config.js @@ -1,3 +1,4 @@ +var authKey = "TBA KEY HERE"; // Replace TBA KEY HERE with your actual The Blue Alliance Auth Key var config_data = ` { "dataFormat": "tsv", diff --git a/docs/Configuration.md b/docs/Configuration.md index 660377a60..25150dae9 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -37,6 +37,7 @@ The main section of the JSON contains the global attributes and the 5 sections o ## Global attributes There are only a few global attributes to set up the application: + ``` { "dataFormat": "kvs", "title": "Scouting PASS 2023", @@ -45,17 +46,24 @@ There are only a few global attributes to set up the application: } ``` + ### dataFormat + Two data formats are currently supported:
- * kvs for key=value;key=value;... (key, value, semicolon) - * tsv for Tab-Separated Values, convenient for scanning or pasting directly into a spreadsheet row + +* kvs for key=value;key=value;... (key, value, semicolon) +* tsv for Tab-Separated Values, convenient for scanning or pasting directly into a spreadsheet row + ### title + This is the title that will show up in the tab of the window. ### page-title + This will set the title at the top of each web page. ### checkboxAs + This configuration dictates how checkboxes data will be reported. Default setting is "Y/N". Acceptable values:
@@ -81,6 +89,7 @@ Each section is defined the same way. Fields are added to each section to coll Each section maps to a separate page on the scouting screen and they progress in the order they are listed above. The JSON is formatted like this: + ``` { , @@ -164,7 +173,9 @@ The field elements are: "tooltip": "Put help or more descriptive text here" } ``` + Specific attributes of text are: + * size (optional) - the number of characters displayed (default is usually 20) * maxSize (optional) - the maximum number of characters allowed in this field (default = 524288) * disabled (optional) - if "true", input to this field will be disabled. It will be read-only. (default = false) @@ -189,7 +200,9 @@ However, they are required to move past Pre-Match as they are key elements to tr "tooltip": "Put help or more descriptive text here" }, ``` + Specific attributes of number are: + * min (optional) - the lowest number allowed in this field * max (optional) - the largest number allowed in this field * disabled (optional) - if "true", input to this field will be disabled. It will be read-only. (default = false) @@ -210,9 +223,11 @@ Special sub-elements of text are "match" and "team". These sub-types will updat "tooltip": "Put help or more descriptive text here" } ``` + The counter is displayed with two buttons labeled "-" and "+" to increase or decrease the counter number. Specific attributes of counter are: + * defaultValue (optional) - set the field to start at a certain value The counter element will be set back to the defaultValue value when the Clear Form button is pressed. @@ -235,10 +250,12 @@ If there is no defaultValue it will be reset to zero. "tooltip": "Put help or more descriptive text here" } ``` + The radio button element will display all the choices with a selection circle next to each one. Click the circle next to the item you want to select. Only one of the choices can be selected at any given time. Specific attributes to counter are: + * choices - a map of the choices to select between. The first string is the value that will be returned in the QR Code and the second string is the description text of the selection that shows on the screen. * defaultValue (optional) - set the field to start at a certain value @@ -278,7 +295,7 @@ There are no specific attributes to this element. The sub-type of timer, cycle timer, will be described in the next section. -### Cycle Timer - Start the timer and with 1 click track cycle times of robots. +### Cycle Timer - Start the timer and with 1 click track cycle times of robots ``` { "name": "My Cycle Timer", @@ -291,7 +308,7 @@ The Cycle Timer element is a specialized Timer element. It tracks cycles during There are no specific attributes to this element. -### Clickable Image - Allow recording locations on an image. +### Clickable Image - Allow recording locations on an image ``` { "name": "My Clickable Image", @@ -307,9 +324,11 @@ There are no specific attributes to this element. "cycleTimer": "tct" } ``` + The clickable_image element allows the collection of data through images. The first use case was to record a robot's starting position on the field. It is also used to record the shooting locations of robots. The way it works is the image is turned into a grid of boxes. Each box is numbered. When the image is clicked, the box number corresponding to the X/Y coordinates is recorded. Through the attributes of the element, you can record one or many different clicks/boxes. The number of boxes is configurable as well as the behavior of each click. You have the option of showing a "Flip" button which will flip the image 180 degrees, which is helpful if your scouters are sitting on the opposite side of the field and they see the field from the opposite direction. There is also an "Undo" button which allows scouters to remove the last recorded box from the element. There are also configuration settings for shape, size, color, and fill of the shape to mark your click. Finally, this element can be tied into a cycle timer. Every click will start a new cycle. So, if you have an image of a scoring location, you just need to click the image and the program will not only record the scoring location, but the cycle time as well. Specific attributes of Cycle Timer are: + * filename - the location of the file image that you want to use. It must be local to the website you are using. * dimensions (optional) - this controls the number of boxes the image will be divided into. The first value is the number of boxes along the x-axis and the second number is the number of boxes along the y-axis. (Default values are "12 6" for 72 boxes) * toggleClick (optional)- if set to "true", if a box has already been clicked, clicking it again will "unclick" that box. It will no longer be stored and reported. (Default value: false) diff --git a/index.html b/index.html index 6539f98d8..eb0c7fe7b 100644 --- a/index.html +++ b/index.html @@ -17,7 +17,7 @@
-

PWNAGE
Scouting 2020

+

PWNAGE
Scouting 2025

pre-match

@@ -27,7 +27,7 @@

pre-match

-

PWnAGE
Scouting 2020

+

PWnAGE
Scouting 2025

Auton

@@ -37,7 +37,7 @@

Auton

-

PWnAGE
Scouting 2020

+

PWnAGE
Scouting 2025

Teleop

diff --git a/pit.html b/pit.html index 8240a90dc..8bb9b745e 100644 --- a/pit.html +++ b/pit.html @@ -17,7 +17,7 @@
-

PWNAGE
Scouting 2020

+

PWNAGE
Scouting 2025

Pit Scouting

@@ -27,7 +27,7 @@

Pit Scouting

-

PWnAGE
Scouting 2020

+

PWnAGE
Scouting 2025

Generate QR Code

diff --git a/resources/js/TBAInterface.js b/resources/js/TBAInterface.js index 8887e1e4b..3bbb6e5cf 100644 --- a/resources/js/TBAInterface.js +++ b/resources/js/TBAInterface.js @@ -1,7 +1,6 @@ -// TBAInterface funcitons to pull data from TheBlueAlliance.com +// TBAInterface functions to pull data from TheBlueAlliance.com var teams = null; var schedule = null; -var authKey = "uTHeEfPigDp9huQCpLNkWK7FBQIb01Qrzvt4MAjh9z2WQDkrsvNE77ch6bOPvPb6"; /** * Get list of teams in event *