Skip to content
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
CONTAINER_NAME=cala-quals
IMAGE_NAME=scouting-database:latest
85 changes: 66 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,83 @@
# scouting-app-2025
# Team 4201 Scouting System

[![Build all components](https://github.com/4201VitruvianBots/scouting-app-2025/actions/workflows/build.yml/badge.svg)](https://github.com/4201VitruvianBots/scouting-app-2025/actions/workflows/build.yml) [![Format with Prettier](https://github.com/4201VitruvianBots/scouting-app-2025/actions/workflows/format.yml/badge.svg)](https://github.com/4201VitruvianBots/scouting-app-2025/actions/workflows/format.yml)

## Getting Started
## Overview

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Over the past several years, our team has designed an all-in-one system for robot scouting. Everything for the system has been packed into a rolling tote (Keter Masterloader Pro 24" Rolling Tool Box) that we can easily take into competition. The full system is connected as shown below:

### Prerequisites
![full scouting tote diagram](images/scouting_tote_diagram.png)

- Node.js
- npm
- Docker (server only)
## System Setup

### Installation
Once everything is connected correctly based on the diagram above, follow the steps below to get everything running.

1. Clone the repository
On the Scouting Laptop, do the following:

```
git clone https://github.com/yourusername/scouting-app-2025.git
```
- Set the static IP on your computer to `192.168.1.200`. If you don't know how to do this, search on Google "how to set static IP on " + the operating system you're running on.
- Install Visual Studio Code (VSCode) on the computer [(Visual Studio Code Install)](https://code.visualstudio.com/download)
- Install Node Version Manager (nvm) on the computer [(nvm for Linux)](https://github.com/nvm-sh/nvm), [(nvm for Windows)](https://github.com/coreybutler/nvm-windows)
- Following the instructions provided by nvm in the prior step, install the latest Node version with the command `nvm install node`. Once installed, run `nvm use node`.
- Install Docker Desktop on the computer [(Docker Desktop for Linux)](https://docs.docker.com/desktop/setup/install/linux/), [(Docker Desktop for Windows)](https://docs.docker.com/desktop/setup/install/windows-install/)
- Install GitKraken on the computer [(GitKraken Install)](https://www.gitkraken.com/download)
- Clone the `scouting-app-2025` repository using Git to the laptop
- Open the `scouting-app-2025` folder in VSCode. Once open, create a new terminal (`Terminal` > `New Terminal`), and run the command `npm install`
- Once the install command completes, run the command `npm run build --workspace database` to build our database image
- As long as the previous command completed successfully, run the command `npm run start` to start the server.

2. Navigate into the cloned repository
If all the steps above complete correctly, after running `npm run start` you should see something similar to the following in your terminal:

```
cd scouting-app-2025
```
```bash
$ npm run start

3. Install dependencies
> scouting-app-2025@1.0.0 start
> npm run start --workspace server


> server@1.0.0 start
> node dist/index.js

Container "cala-quals" does not exist.
Creating and starting a new container...
Started container
Server running at http://localhost:8080
```
npm install
```

To load the scouting apps on tablets, follow these steps:

- Connect each tablet to the system via ethernet adapter (as pictured above)
- On each tablet, go into Google Chrome and type `192.168.1.200:8080` into the search bar, which should load the scouting app
- Once the scouting app loads, select the app you want the tablet to run on the home screen (for example, the match scouting app)
- Once the desired app is loaded, you can now unplug the tablet and start using it to scout

Once you load the scouting apps onto each tablet, you can unplug the tablets and let the scouters record data while being unconnected to the system. Data submitted on the tablets while not plugged into the system will remain stored on the tablet, until you reconnect the tablet and upload it.

To upload scouting data back to the scouting laptop:

- Connect each tablet to the system via ethernet adapter (as pictured above)
- In the desired scouting app, scroll to the bottom. You should see a small yellow button called "Resend All" with text above saying "Queue: _N_". The number of unsubmitted, stored matches will match the value of _N_
- Click the yellow "Resend All" button at the bottom of the app. _N_ should go to 0
- In the terminal on the scouting laptop, you should see a bunch (_N_ total lines) saying "Match data received for team _X_ match _Y_", for each of the _N_ matches that were stored on the tablet

## Exporting Data

To easily use the collected, we provide a python script to convert our database contents to a CSV file.

To export all currently collected data, do the following:

- Open the `scouting-app-2025` folder in VSCode. Once open, create a new terminal (`Terminal` > `New Terminal`). **Press 'New Terminal' twice to create two separate terminals, which should show up as separate tabs on the bottom right of your screen.**
- In the first terminal, _as long as the scouting app isn't currently running on the laptop_, run `npm run start` to start the backend application
- Switch to the second terminal without stopping `npm` from the first. In the second terminal, run the command `cd data-analysis`
- Run the command `python -m venv venv` to create a new Python virtual environment
- Load in the virtual environment. On **Linux**, do this by running `. venv/bin/activate`. On **Windows**, do this by running `Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser`, then `.\venv\Scripts\Activate.ps1`
- Run the command `pip install -r requirements.txt`
- Once complete, run `python export_csv.py`. This should generate 4 CSV files and drop them in the `data-analysis` directory
- For each of the CSV files, you can now upload these to Google Drive and treat them like a normal spreadsheet.
- Whenever data changes, re-run the `python export_csv.py` command to refresh the CSVs, and re-upload them to Google Drive.

## Development

These instructions are specific to users who want to develop in the system. **Never run the system in dev mode at competition, as this can cause loss of data!**

### Running the Client/Server

Expand Down
4 changes: 2 additions & 2 deletions data-analysis/dataAnalysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "venv (3.12.3)",
"language": "python",
"name": "python3"
},
Expand All @@ -1225,7 +1225,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.6"
"version": "3.12.3"
}
},
"nbformat": 4,
Expand Down
50 changes: 20 additions & 30 deletions data-analysis/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,34 +1,24 @@
asttokens==2.4.1
comm==0.2.2
debugpy==1.8.1
decorator==5.1.1
dnspython==2.6.1
executing==2.0.1
ipykernel==6.29.3
ipython==8.22.2
jedi==0.19.1
jupyter_client==8.6.1
jupyter_core==5.7.2
matplotlib-inline==0.1.6
nest-asyncio==1.6.0
numpy==1.26.4
packaging==24.0
pandas==2.2.1
parso==0.8.3
asttokens==3.0.0
decorator==5.2.1
dnspython==2.8.0
executing==2.2.1
ipython==9.6.0
ipython_pygments_lexers==1.1.1
jedi==0.19.2
matplotlib-inline==0.2.1
numpy==2.3.4
pandas==2.3.3
parso==0.8.5
pexpect==4.9.0
platformdirs==4.2.0
prompt-toolkit==3.0.43
psutil==5.9.8
prompt_toolkit==3.0.52
ptyprocess==0.7.0
pure-eval==0.2.2
Pygments==2.17.2
pymongo==4.6.2
pure_eval==0.2.3
Pygments==2.19.2
pymongo==4.15.3
python-dateutil==2.9.0.post0
pytz==2024.1
pyzmq==25.1.2
six==1.16.0
pytz==2025.2
six==1.17.0
stack-data==0.6.3
tornado==6.4
traitlets==5.14.2
tzdata==2024.1
wcwidth==0.2.13
traitlets==5.14.3
tzdata==2025.2
wcwidth==0.2.14
Binary file added images/scouting_tote_diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading