Bionic Scouting is an app primarily for Android that FIRST robotics Team 4909 is developing for use at competitions. The app aids in collecting data about other teams to inform match strategy and alliance selection.
The system is designed with the thought that there are 6 objective scouts each collecting metrics about 1 of 6 robots during a match.
The system also supports having additional "super" scouts collecting subjective observations.
Goals:
Hardware:
We plan to have our Strategists pit scout on the first day of the event collecting overall observations, drivetrain information and photos of each robot.
The data collected by the system can be exported to CSV for analysis in Excel.
Bionic Scouting is a web app that uses SvelteKit with Vite for the frontend and is packaged for android with Capacitor.js
Once you've created a project and installed dependencies with npm install
(or pnpm install
or yarn
), start a
development server:
# install dependencies
npm ci
# Run a development server
npm run dev
When developing and testing it can be useful to test on a usb connected android device. We can do this by running a webserver with our latest code on our development computer and instructing the app to connect to the dev server.
NOTE: Device must be connected to the same network as the host computer
npm run dev -- --host
npx cap sync
HOST=<dev computer ip> npx cap run android
To push the app to multiple connected devices
for dev in $(adb devices | awk '/\<device\>/ {print $1}'); do HOST=<dev computer ip> npx cap run android --target $dev; done
To build the frontend of the app run:
npm run build
To view a preview of the "production" build:
npm run preview
Once the frontend is built we can build the android app:
./gradlew bundleRelease \
-PversionName="1.0.0" \
-PversionNumber=$(date '+%s')
The aab will be stored in android/app/build/outputs/
We use GitHub Actions to build an android app on each push to the main branch.
The app uses RxDB with an underlying PouchDB for storage which supports sync with CouchDB For the competition season we run a CouchDB server on a Digital Ocean VPS.
When running the app locally create a .env file at the root of the repository with content:
VITE_COUCHDB_URL=http://<USERNAME>:<PASSWORD>@<HOST>:5984/events_<year>/