acmerobotics / ftc-dashboard

React-based web dashboard designed for FTC
https://acmerobotics.github.io/ftc-dashboard
Other
168 stars 125 forks source link

FTC Dashboard

FTC Dashboard provides telemetry and monitoring tools for FTC robots during operation with the following features:

Check out our online documentation.

Screenshot of custom layout Screenshot with theme

Installation

Basic

  1. Open build.dependencies.gradle

  2. In the repositories section, add maven { url = 'https://maven.brott.dev/' }

  3. In the dependencies section, add implementation 'com.acmerobotics.dashboard:dashboard:0.4.15'

    Please see GitHub releases page for the latest version number

  4. If you’re using OpenRC or have non-standard SDK dependencies, add the following exclusion:

    implementation('com.acmerobotics.dashboard:dashboard:0.4.15') {
      exclude group: 'org.firstinspires.ftc'
    }

Development

Installation

  1. Install Node.js

    • Note: Node.js 16+ is required for builds to work on M1 MacBooks
    • Current Node version used in gradle builds can be found in FtcDashboard/build.gradle
    • Node version is 18.12.1 as of time of writing
  2. Install Yarn

    • Not explicitly required and provides little advantage over modern npm (as of the time of writing)
    • Further instructions will however reference yarn over npm for historical reasons
  3. Browser FTC Dashboard client is located in FtcDashboard/dash

  4. Run yarn (alternatively npm install) to install dependencies

    • This only need be done once
  5. Optionally, specify the server IP address through the environment variable VITE_REACT_APP_HOST

    • Details on Vite's environment variables can be found here

    • Default IPs:

      • Android Phone: 192.168.49.1
      • Control Hub: 192.168.43.1
  6. Run yarn dev (alternatively npm run dev) to start the development server

    • This will start a development server on http://localhost:3000 by default
    • Navigate to this address in your browser to view the dashboard client
    • The development server will automatically reload when changes are made to the source code

Mock server

To test without an FTC app, run the mock server located at DashboardCore/src/test/java/com/acmerobotics/dashboard/TestServer.java.

Basic Architecture

Java Server

Dashboard's server is split into two packages, DashboardCore and FtcDashboard

Browser Client

Primary interface as a web-client acessible to the end-user through a web browser

Relevant files