Skip to content

Set up the GUI

Varun A edited this page May 30, 2023 · 21 revisions

If you're interested in editing the JSON configuration directly, take a look at Editing the JSON Config

Open the settings menu

Open the application, then press image in the lower left-hand corner.

Once you do that, the settings menu should open, and you should see the following:

image

Editing the settings

Everything should be mostly self-explanatory. Remember that Robot Length and Robot Width are both in meters.

Additionally, you can hover over the label to see a description of what that field is and what its effects it will have

image

Basics

Team Number

The team number of the robot you are building for. This is used to connect to the robot's NetworkTables server.

Robot Length

The length of the robot in meters. This isn't used for calculating the robot's trajectory. And is only used to display an outline of the robot. As a result, it is recommended that you include your robot's bumpers in this measurement.

Robot Width

The width of the robot in meters. This isn't used for calculating the robot's trajectory. And is only used to display an outline of the robot. As a result, it is recommended that you include your robot's bumpers in this measurement.

Is Holonomic

Whether or not the robot is holonomic. (e.g swerve, or mecanum) Enabling holonomic mode decouples the heading and velocity of the robot.

App Config

The first three values shouldn't be changed unless you also change the field image.

Point Scale Factor

The scaling factor converts meters to pixels to be rendered on the GUI. This can be calculated by taking the width of the field in pixels and dividing it by the width of the field in meters.

Origin X

The X coordinate of the origin of the field in pixels on the image. This is used to determine where (0,0) is on the field image

Origin Y

The Y coordinate of the origin of the field in pixels on the image. This is used to determine where (0,0) is on the field image

NetworkTables Enabled

Whether or not to connect to the robot's NetworkTables server. Network Tables need to be enabled to utilize any of the features that require being connected to the robot. Disable this if you are not connected to the robot's network and are experiencing consistent frame-time spikes.

Pathing Config

Max Velocity

Maximum velocity of the robot in m/s

Max Acceleration

Maximum Acceleration of the robot in m/s/s

Additional Constraints

The available constraints are the default WPILib constraints, add their descriptions can be seen here

Just click on a constraint under Add a constraint to add it.

To read the javadoc of the constraint you can hover over the constraint

image

To remove a constraint, just click on it.

Note: It is currently not possible to configure a swerve drive that doesn't have exactly 4 wheels. If your swerve robot has more than 4 wheels you will need to edit the JSON directly.