6.9 KiB
Jankboard 2
Team 1280's custom, powerful, and opinionated dashboard for controlling FRC Robots, built with Svelte and TypeScript, and powered by Rust (Tauri).
Unlike Shuffleboard, which attempts to provide an unopinionated "blank slate" with an easy to configure and modular environment for displaying robot data, Jankboard 2 is purpose built for Team 1280's Swerve drivebase robots and their needs. It's tightly integrated with our proprietary robot features, like collision warning and detection, and displays robot drive modes.
Shuffleboard, while easy to set up, lacks the fine-grained adjustments and customization which are afforded by a fully custom solution. The UI looks outdated and is quite ugly. In stark contrast, Jankboard's UI is reminiscient of and inspired by dashboards designed by car manufacturers, making it easy for the driver to get the information they need at a glance, without squinting at Shuffleboard's tiny and ugly UIs. It even includes a full 3D robot visualization, synced directly with the robot's movements in real life.
Even though the dashboard's layout and design are highly opinionated and not meant to be heavily modular, features can still be easily extended via a drop-in app system which supports easy drop-in app integration. Jankboard 2 ships with a few apps by default, featuring a camera feed, robot settings configurator, and even a music player and games.
Installation guide
We recommend installing the latest stable release binaries from our release page, if you're just looking to run the Jankboard. Alternatively, if you can't find release binaries for your system, follow the directions below in the For developers section to build it from source. We will periodically update the releases with new builds when we come out with stable versions, and we follow semantic versioning.
A brief footnote on the name "Jankboard 2"
The name "Jankboard" comes from Team 1280's original attempt at creating a custom dashboard. Though it looked and functioned superficially similar to Jankboard 2, it was not designed with maintainability in mind and became exceptionally difficult to extend and develop as the codebase became bloated. Jankboard 2 is a version redesigned from the ground up with the goal of easy maintainability and richer features. It contains both a completely rewritten frontend and backend, which have been improved in almost every possible way. You can view the original version at its archived repository.
For developers
If you would like to contribute to Jankboard 2, there's only a few simple steps to get the development build up and running.
Prerequisites
- Rust and
cargo
. Check the Rust docs for more information. We recommend you install Rust usingrustup
. Keep in mind that this is ONLY necessary for development, release binaries do not require Rust. pnpm
, for installing dependencies and thevite
development server.- Ideally, NodeJS, but it's technically not required as
pnpm
brings its own node binary.
Installation steps
-
Clone the repository. The
client
folder contains the vast majority of the source code for the desktop app. -
cd
into theclient
folder. The configuration files andpackage.json
, This is where stuff likepackage.json
and configuration files for our various tooling are housed. Theclient/src-tauri
directory contains the Rust source code andcargo
configuration files for the backend that interfaces with the robot via Network Tables. -
Run
pnpm install
to install dependencies. -
To run the desktop app in developer mode (with automatic hot stateful reload and other useful features like error reporting), make sure you're in the
client
directory and runpnpm run tauri dev
. This will install and build the Rust dependencies viacargo
and initialize thevite
development server for the frontend. Note that since this is basically just running thevite
development server and then connecting the Tauri webview to it, there may be slightly inconsistent behavior in dev mode versus production mode. -
To create a production binary, run
pnpm run tauri build
. Tauri -
To create a production binary, run
npm run tauri build
. Tauri cross-compilation is still in beta, so you should generally try to build targeting the same OS you're currently running. Check the Tauri docs for more information. We also have some Github Actions set up to automatically compile a production build for all platforms, but this is expensive (uses over 30 minutes of our quota), and should only be used for publishing new major releases.
Troubleshooting common issues
- If you're experiencing issues with TypeScript type checking or dependency
resolution, try opening your editor directly in the
client
directory so it picks up thetsconfig.json
and uses the project's own TypeScript language server. - If you don't have access to a development environment that supports running
standalone executables (eg. Github Codespaces), you can try running
pnpm run dev
instead ofpnpm run tauri dev
, which will open a development server atlocalhost:5173
with the frontend running in the web. However, app behavior may be inconsistent and you will not get any features from the Rust backend.
Current progress and improvements over (original) Jankboard
- Layout, toasts/notifications, music player, and app system ported.
- Toast and audio cue system is much more robust
- Transitions added almost everywhere to make things smoother
- Tauri app created successfully, currently still using Flask backend
- Visualization vastly improved with Threlte (Three.js) powered 3D robot simulation
- Robot model ported successfully via massive optimization through polygon decimation
- Added settings app with options to disable certain features and developer tools for testing
- Created dynamic voice prompt system to support new languages very easily
- Overhaul backend in Rust
- Overhaul visualization (especially camera)
- Added Vlad's voice lines (AT LAST)
TODO
- Camera cutout overlay
- Overhaul audio player system
- Further integrate telemetry (like GPWS, collision warning, etc)
- Finish re-creating / adding various voice alerts and sequences