Team 2530's scouting system.
| Name | Path | Purpose |
|---|---|---|
| Frontend | turbo-scout/ |
The primary frontend for turbo-scout. Used by scouters to enter information. |
| Discord | turbo-discord/ |
A backend for turbo-scout that uses discord for data storage and viewing. |
| QR Server | turbo_qr.py |
The QR code scanner. This is only meant to be used as a last resort if everything else breaks. |
| config.yml | config.yml |
A single config file for the entire system. |
You can tell if the backend is working by checking the status of the Turbo Scout bot on discord. If it is online, and the bot says it is "watching everything" than the backend is running like usual. If it is offline, then the backend is not online.
You will need some kind of computer with internet access to run the backend on. Such a computer does not need to be at the event, because you should try to become familiar with using SSH to control it remotely. It can be at the event, but just keep in mind that it doesn't have to be.
To start the backend on a new machine, perform the following steps:
-
Install Java
-
Clone the repository and move into the correct folder
You can do this on Linux with the following commands:
git clone https://github.com/Team2530/turbo-scout.git cd turbo-scout/turbo-discord -
Setup for the season/event
If the code in github is not already prepared for the season and event you are starting the backend for, you will need to modify the code so that it is. Refer to the following sections to setup the code for the correct event and season.
-
Get access to the
.envfileThis contains the discord bot token, and is required for authenticating the backend.
After you have received the file, simply move it to the
turbo-discordfolder and everything will work as intended. -
Do a test run of the backend
You can make sure that the backend works properly if running
./gradlew runstarts the server and the discord bot becomes online. Use CTRL-C to stop the server after verifying that it works. -
Start the server for real
You need the server to continue running after you close the terminal window (or SSH session) that you start the server from. There are several ways to do this, but this is probably the simplest:
nohup ./gradlew run &Using this command instead of the normal
./gradlew runwill work as intended.You could also use a terminal multiplexer like tmux or something more sophisticated, but this method works just fine and requires less setup.
NOTE: PLEASE don't do this in the middle of a competition. It makes the data inconsistent and might cause problems.
To update the question list, edit ./config.yml. Under the questions section, there are sections named pit and match that control the pit scouting form and match scouting form respectively.
The pit scouting form is a list of categories, each of which can have an id, label and list of questions. The id is used for the data output, label is shown in the frontend, and questions is a list of questions that are in that category.
The match scouting form is just a list of questions.
The fields of a question are as follows:
id: Theidfield specifies what name the answers from this question will be stored as internally in turbo scout. Make this something shorter than thelabel, but still something you recognize and correlate with the questionlabel.label: Thelabelfield is what the scouter will see when they are entering this question.type: Thetypeof the question defines what type of form element will be shown to the user. In this instance, it has a type ofselect, which is just a dropdown menu. You can find a list of the available form element types here inform.tsxor implement some new ones.options: Theoptionsfield is specific to questions with a type ofselect, and it defines the options that the user can choose from.
-
Get the blue alliance event code
This can be found on the blue alliance page for the event in the URL. For example, the event code for the 2024 Curie Division at worlds is 2024cur. Notice how the last part of the blue alliance URL (/event/2024cur) is the event code.
In some cases, an event is not in the blue alliance. In this case, feel free to make up your own temporary event code just to keep things organized.
-
Change all the event codes for the new event.
You will need to update
config.ymland a few java files in theturbo-discordbackend. -
Get a list of scouters that will be at the event
You can sort them alphabetically if you want, and feel free to place members of the team in Core Scouting at the very top of the list as they will be using it the most.
Don't include middle or last names unless there is a name conflict. If there is a name conflict, either use the first letter of their last names as well or use nicknames after asking for permission.
Save this information in
config.yml. -
Commit your changes
The
setup.pygithub action will automatically do everything else for you. Just commit your changes and updates will be applied.
