FIRST Robotics Competition Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

FRC Dashboard Tutorial

This document describes the dashboard for the 2018 FIRST robotics competition season. Read through it to learn about setting up a Dashboard test station for the I/O on the roboRIO, and transfer customized data to the Dashboard and Driver Station.

 

Introduction

In this tutorial, you will explore the FRC Dashboard, and learn how to effectively use the Dashboard to troubleshoot your FRC robot project.

The Dashboard displays information from the camera and roboRIO, as well as communication information.FRC Dashboard screenshotFRC Dashboard screenshot

Below the Dashboard you see the FRC Driver Station. The Driver Station displays information about the control system and can display messages sent from the robot in the User Messages Section on the Operation Page.FRC Driver Station screenshotFRC Driver Station screenshot

The Dashboard is a great tool for testing – it shows you at a glance the state of any I/O channel and displays your own custom-defined data. We will discuss how to display data from both the Driver Station and the roboRIO on your Dashboard. A new playback feature also allows video and I/O information to be saved to disk and played back on command.

Throughout this tutorial, we will assume that you have all the necessary software for FRC installed on your computer, your roboRIO is imaged, and the firmware on your Driver Station is up to date. If you don’t have these steps completed, you can refer to the Getting Started tutorials for information and instructions.

 

Playback

FRC Dashboard screenshot showing the playback controlsFRC Dashboard screenshot showing the playback controls

The playback feature is controlled with the four buttons (Red Box) at the bottom-right of the Dashboard. The button on the left enables/disables the Camera.

FRC DashboardFRC Dashboard

The record button (red circle) initiates a recording session which saves the camera feed to disk as an AVI file. Additionally, Kinect sensor and other I/O data is saved to a separate data file. The files are stored in the Public Documents/FRC/Logging/Dashboard folder of the host PC with a filename corresponding to the date and time at the beginning of the recording.

While a recording is in progress, the record button will appear as solid red, and a red border will appear around the Dashboard, as seen below. The stop button (red square) at the bottom right stops the recording.

FRC Dashboard screenshot showing the recording on (red frame)FRC Dashboard screenshot showing the recording on (red frame)

The play button (green arrow) initiates playback of an existing file. A playback toolbar will appear in the bottom left of the Dashboard which allows the selection of the file for playback, as well as the playback speed and a navigation slider to jump to a specific time of the recording. While a file is being played back, the play button will appear as solid green, and a green border will appear around the Dashboard, as seen below. The stop button (red square) at the bottom right stops the playback.

FRC Dashboard screenshot showing the playback on (green frame)FRC Dashboard screenshot showing the playback on (green frame)

In addition to viewing the recorded video during playback, you can also select the Variables tab to display the corresponding variables (I/O data, network statistics, etc.) that were logged to disk along with the video.

FRC Dashboard screenshot showing the variables tab in playbackFRC Dashboard screenshot showing the variables tab in playback

The playback settings tool (wrench icon at the bottom left) allows a previously-saved recording to be renamed or deleted, as seen below.

FRC Dashboard screenshot showing the playback settings tool (wrench icon at the bottom left)FRC Dashboard screenshot showing the playback settings tool (wrench icon at the bottom left)

 

Drivers & Motors

In the Drive & Motors section you are able to get information from your joysticks and motors. As you move your joystick you will be able to see the position move as a dot in the red box. The blue box shows what buttons are pressed on the joysticks. As the motors are controlled their power levels can be seen in the green box.

FRC Dashboard screenshot showing the Drive tabFRC Dashboard screenshot showing the Drive tab

Checklist

The checklist section is designed to give teams freedom to use as they see fit. Create a check list that needs to be completed before heading to the field at competition, or a list once you get to the field. You may modify the list at any time by changing the Checklist.txt file found at Public/Documents/FRC/Checklist.txt. Double click on the item to place a check mark. Hold shift and double click to erase the checkmarks. All checkmarks will be erased when shift is held.

FRC Dashboard screenshot showing the Checklist tabFRC Dashboard screenshot showing the Checklist tab

 

Smart Dashboard (Variables Tab)

    Dashboard 11.png

 

FRC Dashboard screenshot showing the Variables tab, and a relation between a variable and a Front Panel controlFRC Dashboard screenshot showing the Variables tab, and a relation between a variable and a Front Panel control

 The Smart Dashboard Variables, red box, represents the controls and indicators in the Operation Tab, yellow box, as well as the Joystick and Motor data. As you change objects in the Operation Tab the data will be reflected under Smart Dashboard. You can add and customize the names of the controls and inductors by creating your own FRC Dashboard.


Adding an Encoder to the Smart Dashboard

Go to LabVIEW and open a FRC Dashboard Project link in the Getting Started window to display the Create New FRC Dashboard Project dialog box, shown as follows.

LabVIEW Screenshot showing the new project windowLabVIEW Screenshot showing the new project window

In the Project name text box, enter the name you want to use to identify the new FRC Dashboard project.

In the Project folder text box, enter the location on the host machine to which you want to save the project files and VIs.

Click the Finish button to close the Create New FRC Dashboard Project dialog box and create the new FRC Dashboard project. LabVIEW displays the new FRC Dashboard project in the Project Explorer window.

In the Project Explorer window open the Dashboard Main.vi.

We will add a gauge indicator to the front panel in the operations tab to make reading the angle information easier. Now, let’s add a Gauge indicator below the communications section of the Dashboard. The gauge can be accessed from the Modern»Numeric palette

Screenshot of the LabVIEW Front Panel with the Gauge in itScreenshot of the LabVIEW Front Panel with the Gauge in it

Adjust the maximum of the scale to 360 degrees. Next, align 360 with the 0 point. Adjust the size of the gauge and the appearance as you see fit. You can add a Label, digital display, and other features by right-clicking on the gauge and selecting Visible Items from the shortcut menu. Adding a digital display lets you see the exact value of the gauge. Create a visible label that you will reference later during this exercise.

Screenshot of the option Visible Items > Digital Display for the gauge indicatorScreenshot of the option Visible Items > Digital Display for the gauge indicator

Open the block diagram and place the indicator out of the way by the other controls in the Operations tab.

Screenshot of the indicator terminal in the block diagramScreenshot of the indicator terminal in the block diagram

Complete the following steps to rebuild the project and specify which project the FRC Dashboard launches automatically. Resize the Front Panel window to fit exactly the Dashboard panel then Save Dashboard Main.vi. Leave the Front Panel open in the background while completing the below steps.

  1. In the Project Explorer window of the FRC Dashboard Project, expand the list of Build Specifications to reveal the FRC PC Dashboard application.
  2. Right-click FRC PC Dashboard and select Properties from the shortcut menu. If the Application Builder Information dialog box appears, click OK.
  3. Verify that the Target filename is Dashboard.exe. The Driver Station reads this executable file as the file to launch.
  4. Verify that the Destination directory is where you want to save the file. Click Build to build the new project.
  5. Explore to where you saved the new executable file. Copy the new Dashboard.exe file over to the C:\Program Files (x86)\FRC Dashboard directory.

Location of the Dashboard executable in the hard driveLocation of the Dashboard executable in the hard drive

The next step is to set up your encoder in the Robot Project. Create a new FRC 2018 roboRIO Robot Project or add to your existing project.

In the Begin, Teleop, and Finish VI set up an encoder using the WPI Robotics Toolkit.

In the Begin.vi setup an encoder using WPI Digital Input Open and WPI Encoder Open, RefNum Registry Set, and Start. Remember the name of the encoder, during this example the name is “Right Motor Encoder,” as it will be referenced later in the program when communicating with the same encoder.

Begin.vi Block Diagram AdditionBegin.vi Block Diagram Addition

Update the Teleop.vi to send information to the Smart Dashboard Variable.

Teleop.vi Block Diagram AdditionTeleop.vi Block Diagram Addition

Add a WPI_EncoderRefNum Registry Get.vi, right click on the Refnum Name terminal » Create » Constant. Name the string constant the same name you referenced in the Begin.vi.

  1. Add a WPI_EncoderGet.vi
  2. Add a SD Write Number.vi, right click on the Name terminal » Create » Constant. Name the string constant the same name you referenced in the Dashboard Main.vi for the gauge indicator you added.

Now close all the encoder references in the Finish.vi. Use the WPI_EncoderRefNum Registry Get.vi to reference the encoder that you set up in the Begin.vi. Use the WPI Encoder Stop and Close Vis to stop the encoder at the end of the program.

Finish.vi Block Diagram AdditionFinish.vi Block Diagram Addition

Now you have successfully added an encoder to the Smart Dashboard Variables. Test your code in simulation or on the robot in Teleoperated Mode to see the data of the encoder.


Conclusion

By now you should have a good idea on setting up a Dashboard test station for the I/O on the roboRIO and transferring customized data to the Dashboard and Driver Station. The Dashboard has many uses when it comes to project research and development. It’s a fantastic tool for the following use cases:

  1. Monitoring systems in different operation conditions
  2. Logging data points with corresponding video information for statistical analysis while in the research and development stage
  3. Gaining a better understanding on how components interact with each other

Congratulations! You’ve now learned how to return and add user data to the Driver Station and Dashboard! The Dashboard also can be used to get information from the joystick, sensors, actuators, etc. This information can be invaluable when testing out a new aspect of your robot.

Comments
Member
Member
on
THANK. i handle with problem now
Contributors