Overview
Glass is built on top of the WPILib GUI framework and provides advanced visualization capabilities for robot debugging and development. It supports viewing NetworkTables data, plotting values over time, and displaying robot mechanisms with field visualizations.Features
- NetworkTables Integration: Connect to and visualize NetworkTables data from your robot
- Camera Support: View camera streams from your robot
- Field Visualization: Display robot position and mechanisms on a 2D field
- Real-time Plotting: Plot sensor values and other data over time
- Hardware Widgets: Visualize various hardware components including:
- Accelerometers
- Analog Gyros
- Analog Inputs/Outputs
- Digital I/O
- Encoders
- Motor Controllers
- And more
Running Glass
Navigate to the WPILib repository
Open a terminal and navigate to the root of the WPILib repository:
Connection Modes
Glass can operate in different NetworkTables modes:- Client Mode: Connect to a robot or simulation as a NetworkTables client
- Server Mode: Run as a NetworkTables server (useful for testing)
- DISCONNECTED: Not connected to any NetworkTables instance
- Connected (IP): Connected to a robot or server
- X Client(s) Connected: Running as a server with X clients
Using Glass with Simulation
Glass works seamlessly with robot simulation. When running your robot code in simulation, Glass can connect to visualize:- Simulated sensor values
- Robot position on the field
- Camera feeds
- NetworkTables data
Building Glass
To build Glass from source:Key Components
NetworkTables Viewer
The main NetworkTables viewer shows all published topics and their values. You can:- Browse the topic hierarchy
- View and edit values
- Monitor value changes in real-time
Plot Windows
Create plot windows to visualize data over time:- Add multiple data sources to a single plot
- Adjust time ranges and scales
- Pause and resume data collection
Field View
Visualize your robot’s position and mechanisms on a standard FRC field using the field images included with WPILib.System Requirements
- Java Development Kit (JDK) 17 or later
- C++ Compiler:
- Linux: GCC 11 or greater
- Windows: Visual Studio 2022 with C++ support
- macOS: Xcode 14 or later command-line tools
Related Tools
- OutlineViewer - Lightweight NetworkTables viewer
- Shuffleboard - Dashboard for competition use
- SysId - System identification tool