Skip to content

Radial Gauge

Carson Rueter edited this page Jan 24, 2025 · 1 revision

The Radial Gauge widget showcases a number in a format akin to a spedometer or compass, with tick marks and a progress bar for ease of viewing.

image

Robot Code

Similarly to a spin box or dial, to display a radial gauge value, you must put a number onto NetworkTables:

SmartDashboard.putNumber("Velocity (m/s)", m_drivetrain.getVelocity());

To get a radial gauge, right-click a spin box or dial widget and select "Radial Gauge":

image

Configuration

image

  • Title Font Size: The font size of the title text.
  • Font Size: The font size of the displayed value.
  • Number of Ticks: How many ticks/numbers to show around the gauge.
  • Minimum Value: The minimum displayed value of the gauge.
  • Maximum Value: The maximum displayed value of the gauge.
  • Start Angle: What angle the gauge should have at its minimum value.*
  • End Angle: What angle the gauge should have at its maximum value.*
  • Topic: What NetworkTables topic to use.

* 0/360 degrees is north, 270/-90 degrees is west, 90 degrees is east, and 180/-180 degrees is south.

Common Configurations

Spedometer

To display the robot's velocity, use a configuration such as the following, replacing the maximum value with your robot's approximate max speed:

image

Gyro

To display the robot's heading as a gyro, use a configuration such as the following:

image

This sets the minimum and maximum values to display as north. Change the number of ticks depending on how much precision you desire.

image

Alternatively, you may set the maximum value to 6.28 if displaying the heading in radians, or use -180 and 180 if that's your convention.

Clone this wiki locally