Giter Club home page Giter Club logo

qfrcdashboard's Introduction

QFRCDashboard A reliable, high-performance, low-footprint dashboard for use with FRC.

A mirror of this repository is available on my Gitea instance.

Key Features

  • Small RAM/CPU footprint
  • Customizable fonts for title & text (i.e. big numbers)
  • Enum widget: different colors for different string values
  • Powerful, customizable graphs
  • Simple, semi-modern look & feel
  • Support for swerve display, FMS information, field widget
  • Different shapes for colored widgets (bool/enum)
  • Run commands

Lightweight

Dashboards don't have to be resource hogs. In fact, dashboards should be designed to take up as few resources as possible. Dashboards that use up resources like nobody's business will cause packet loss and comms issues when run on driver stations!

Because of this, QFRCDashboard has been specifically designed to use up as few resources as possible. Compared to WPILib's Shuffleboard (measured on a ThinkPad X220--percentages include all CPU cores):

Metric Shuffleboard QFRCDashboard
Memory (Base) 530MB <200MB
Memory (Heavy Use) 600MB-1.2GB 200-250MB
CPU (Base) 2-10% 0-1%
CPU (Heavy Use) 10-30% 0-3%

Network activity hasn't been specifically measured, but expect better network performance out of QFRCDashboard. (Note that Shuffleboard's numbers may vary. Sometimes I've seen it eat the entire CPU on computers 5x as powerful as mine.)

QFRCDashboard excels with its lightweight performance thanks to many factors:

  • The efficiency of C++ and Qt vs. Java and JavaFX
  • No menu that subscribes to every topic at once
  • Shared subscriptions between duplicate topics
  • Widgets only update and repaint when they need to
  • Minimal, deferred repaints

Download

Windows, Linux, and macOS builds are available via GitHub Actions. Currently, all use WPILib 2024.3.1. Release builds are available either through Actions or in the releases tab:

Release

Development/debug builds are also available on a per-commit basis. These builds are generally unstable, have far larger executable sizes, and will perform slower, but are useful for users who wish to have the latest features or for developers who want to contribute and test.

Debug

Forking

Follow the GPL3 of this project, credit the original project, and make it clear that your application is not QFRCDashboard itself.

Contributing

Write code.

Building

This project uses CMake. Additionally, you must initialize git submodules first.

git submodule update --init
cmake -S . -B build
cd build
make -j$(nproc)

You can use CMake's install commands to install for packaging and system installs.

sudo cmake --install build --prefix /usr
cmake --install build --prefix ${PKGDIR}

Submodules

If you don't want to install protobuf and ntcore to your system, CMake options are provided for such:

  • USE_SYSTEM_NTCORE (default ON)
  • USE_SYSTEM_PROTOBUF (default ON)

Examples:

cmake -S . -B build -DUSE_SYSTEM_NTCORE=OFF
cmake -S . -B build -DUSE_SYSTEM_NTCORE=OFF -DUSE_SYSTEM_PROTOBUF=OFF

Using the system ntcore with the bundled protobuf is unnecessary and will break things. If you have ntcore installed to the system, protobuf will also be installed.

Because Windows sucks with system libraries you'll have to enable them anyways. I think with Qt Creator you have to explicitly set them.

Ubuntu

sudo apt install qt6-base-dev build-essential qt6-multimedia-dev ninja-build
git clone https://github.com/binex-dsk/QFRCDashboard.git
cd QFRCDashboard
mkdir build && cd build
cmake ..
make -j$(nproc)

Windows

  • Install Qt from here. Take note of where you download it!
    • Note that you will need to create a Qt account.
  • Install CMake https://cmake.org/download/ (add to PATH)
git clone https://github.com/binex-dsk/QFRCDashboard.git
cd QFRCDashboard
mkdir build && cd build
cmake -DCMAKE_PREFIX_PATH="C:\\Qt6\\6.6.1\\msvc2019_64" ..
cmake --build .
C:\Qt6\6.6.1\msvc2019_64\bin\windeployqt.exe .

OR use CLion or Qt Creator from the online installer.

Miscellaneous Notes

QFRCDashboard is created solely for the purpose of A RELIABLE, LOW-OVERHEAD FRC dashboard. QFRCDashboard is NOT created with eye-candy or intense theming in mind. Contributions and suggestions to theming will be accepted and worked on, but without user request or contribution, QFRCDashboard will see very few updates to theming.

qfrcdashboard's People

Contributors

crueter avatar thenetworkgrinch avatar

Stargazers

 avatar cmd / Ada avatar  avatar  avatar  avatar Hayden Heroux avatar Jimmy McCosker avatar Guilherme Samuel avatar  avatar Rocky_ avatar

Watchers

 avatar  avatar

qfrcdashboard's Issues

Unit Tests

Unit Tests

To test various functionality automatically, particularly regarding save/load systems and widgets.

Single-Instance guarding

Eventually, multiple windows with shared stores and subscriptions should be allowed, but for now, all that's really needed is a simple guard.

TopicStore refactor

TopicStore has kind of become a mess. To better support Sendables, non-topic widgets, etc. some overhauls are needed.

  • Each subscribed topic must be given a label.
    • When setValue is called on the subscriber, it should only update values based on the label.
    • Single-topic widgets can ignore the label entirely.
    • Write-only topics can ignore the label entirely.
  • Sane type-checking within TopicStore directly.
    • Widgets must pass a desired type with the label when subscribing.
    • If the value's type and the widget's desired type don't match, print an error to the console and refuse to update.
  • Blank topics should not have listeners allocated.
    • No real purpose outside of memory issues.
  • Single, all-encompassing subscribe method.
    • No need for all those different overloads and whatnot.

This will be a big change but will improve reliability in the long run.

Camera Server Integration

Implement WPILib's cscore to search the CameraServer, and create a CameraViewWidget based on the url/port of that camera.

FMSInfo Widget

Implement the FMSInfo widget that exists within WPILib.

Filter Store & Robust Sendable Registration

Register NT types in Filter Store, primitives and Sendables alike.

Goes with #17

FilterStore should be static, register ".type" values into Sendable topic types, NT topic types into primitive topic types. FilterStore does all the filtering currently in main.cpp, stores a filtered NT topics list.

Command Activation

Activate commands through button clicks (runOnce) or checkboxes (run)

Immediate Crash on Certain Windows Machines

On certain Windows machines--specifically stock Windows 10 builds--the Release builds crash immediately. Untested on Windows 11, but Ghost Spectre 22H2 and WINE both work fine. The setup executable is not affected, but the actual dashboard executable is.

Current workaround is to go to the debug build in the Actions tab.

Drag and Drop

Snap to the grid via drag and drop.

For new widgets, create a default constructed widget, and open the dialog after drop.

Otherwise, allow for resizing and dragging.

Robust type registration

Rather than relying on manual registration of different widget types for different topic types, each widget will be required to register to a specific topic type (or multiple), specifying their "display name" and whatnot.

Broader WidgetTypes implementation

Register values in the WidgetTypes enum at runtime.

Add the ability to pass any generic MetaObject and have BaseWidget construct a default and/or json-read copy.

icon

and working windows builds

Prettier Dial Widget

QDial is very limited, implement my own

Should have 360 degree range and a configurable starting point. (algebraic plane vs. top vs. bottom)

Will need a big red triangle pointing to the right direction

Server Data Saving

Currently effectively a no-op, need to implement load/save for NT server settings.

Color Widget Shapes

Allow for several shapes for Enum and Color Display widgets; including:

  • Triangle
  • Circle
  • Square
  • Hexagon (like FTC pixels)

And possibly more depending on game piece shapes and other factors.

Swerve Widget

Take an AdvantageKit-like double array and display swervy boys

Given the current rules, it's probably safe to assume that everyone's going for 4-wheel swerve. But if somebody asks for it the implementation must be adaptable to support custom layouts

Topic-Level Propagation & Efficient Updates

Changes to topic values should propagate entirely from TopicStore, calling a setValue function of the widget.

Additionally, updates should ONLY be made if the value is updated.

These two changes should drastically improve performance

Smarter Saving & Loading

Save/load metaproperties directly, eliminating the need to manually implement fromJson and saveObject methods.

This will require a default constructor for every widget.

Improve save/load system

Individual fromJson method for each class.

Move some stuff to BaseWidget that happens to be common

Integer Widgets

Separate Double and Integer displays, I don't think NT likes them together.

Graphs

Implementation of graphs.

Configurable settings:

  • Timescale (or auto)
  • X- and Y-axes (time available for X axis)
  • multiple lines per graph
  • Hover to see a value at a certain point
  • export to CSV

Field2d

Exactly as in Shuffleboard.

Should be much clearer where the robot is, with a dot at the center, configurable robot dimensions, and an arrow pointing out in the direction it's facing.

Robust Sendable Registration

Similar to topic type registration.

Sendable-based widgets must register their topic type to the topic filtering store.

Depends-On: #7

smart pointers

Use smart pointers because all this deletion stuff is kind of cancer

Field2d widget occasionally disappears

When doing certain drag and drop operations, the Field2d widget occasionally will shrink to an extremely small size or disappear entirely with a null pixmap.

This will require two changes:

  • Ensure widgets are properly marginalized in the TabWidget layout
  • Reimplement the pixmap drawing within the field image label

Generic Widget Types

Generic types for primitives like strings, ints, doubles, bools, etc.

Generic types for widgets that display a color.

Generic types for widgets that display editable text.

Generic types for Sendable widgets.

Default widget titles

Default to the bottom-level topic name for the title and don't open the properties automatically.

Actions

Implement GitHub actions for automated building and testing, as well as prebuilt binaries.

100% need binaries in AppImage form and possibly Linux-System, as well as Windows. MacOS would be great as well but lower priority.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.