Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions 2025/reefscape_config.js
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
82 changes: 51 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
<div id="top"></div>

# 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)

<a href="https://PWNAGERobotics.github.io/ScoutingPASS">Live Demo</a> . <a href="https://PWNAGERobotics.github.io/ScoutingPASS/pit.html">Pit Scouting</a> . <a href="#getting-started">Getting Started</a> . <a href="#faq">FAQ</a>

![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)
<h1></h1>


<!-- TABLE OF CONTENTS -->
<details>
<summary>Table of Contents</summary>
Expand All @@ -32,33 +31,48 @@

<div id="features"></div>

# 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

<p align="right">(<a href="#top">back to top</a>)</p>
<div id="live-app"></div>

## 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: <https://PWNAGERobotics.github.io/ScoutingPASS>. (You can host your version of the ScoutingPASS application on GitHub Pages as well.)

<p align="right">(<a href="#top">back to top</a>)</p>
<div id="description"></div>

## 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)
Expand All @@ -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
Expand All @@ -80,36 +95,39 @@ 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 <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 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))

<p align="right">(<a href="#top">back to top</a>)</p>
<div id="getting-started"></div>

## 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://<your_username>.github.io/ScoutingPASS)

<p>
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.

<p align="right">(<a href="#top">back to top</a>)</p>
<div id="pit-scouting"></div>

## 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. <http://pwnagerobotics.github.io/ScoutingPASS/pit.html>)

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.

Expand Down Expand Up @@ -149,7 +167,7 @@ Don't forget to give the project a star!
<p align="right">(<a href="#top">back to top</a>)</p>
<div id="faq"></div>

## Frequently Asked Questions:
## Frequently Asked Questions

<details><summary>Why hardcode and disable the event field?</summary>
<br />
Expand Down Expand Up @@ -189,23 +207,25 @@ Note: The Auto Start (as) element is special in that it will only keep track of
<p align="right">(<a href="#top">back to top</a>)</p>
<div id="things-to-add"></div>

## 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

<p align="right">(<a href="#top">back to top</a>)</p>
<div id="license"></div>

## License

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

<p align="right">(<a href="#top">back to top</a>)</p>
Expand Down
3 changes: 2 additions & 1 deletion archive/2020/IR_config.js
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -77,7 +78,7 @@ var config_data = `
"code": "ao",
"type": "counter"
},
{ "name": "Auto Aquire PCs",
{ "name": "Auto Acquire PCs",
"code": "aa",
"type": "bool"
},
Expand Down
1 change: 1 addition & 0 deletions archive/2022/RR_GS_config.js
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
1 change: 1 addition & 0 deletions archive/2022/RR_config.js
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
1 change: 1 addition & 0 deletions archive/2023/CU_GS_config.js
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
1 change: 1 addition & 0 deletions archive/2023/CU_config.js
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
1 change: 1 addition & 0 deletions archive/2024/crescendo_config.js
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
27 changes: 23 additions & 4 deletions docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -45,17 +46,24 @@ There are only a few global attributes to set up the application:
<FIVE GAME SECTIONS>
}
```

### dataFormat

Two data formats are currently supported:<br>
* 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:<br>
Expand All @@ -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:

```
{
<GLOBAL ATTRIBUTES>,
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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.
Expand All @@ -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

Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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)
Expand Down
Loading