Understanding MDConsole - MDHSRobotics/TeamWiki GitHub Wiki

Home / References

Understanding MDConsole

Introduction

The MDConsole is a feature that was added in the 2015-2016 season. MDConsole

The Smartdashboard provided by FRC turned out to be unreliable and behave unpredictably. In addition, the ability to customize it was very limited.

MDConsole provides a better alternative. It uses websockets to communicate to the robot. It is an HTML5 application that uses modern web development techniques. This enables advanced capabilities, such as:

  • adaptive behavior - Based on the state that the robot or other factors during game play, the console can change its content and present what is most relevant to the operators at that time
  • customizeable UI - The UI can be customized beyond what is achievable in the Smart Dashboard. The full spectrum of HTML5 capabilites can be leveraged, enabling advanced visualization and custom experiences tailored to enhance operator control
  • Extensible Operator Interface - The console can be used as an extension of the operator interface, enabling it to send commands to the robot and control its systems

MDConsole project

How does RoboRio and MDConsole Communicate?

The communication between MDConsole and the RoboRio robot is facilitated via websockets. MaterBot comes with a websocket subsystem (see [Understanding MaterBot](Understanding MaterBot)), that acts as the socket server for any clients that want to communicate to it. MDConsole opens a websocket with the robot to initiate a communication link. Once the communication link is established, both robot and console can send each other messages.

Websocket Connection Sequence Diagram

generated using sequencediagram.org | source

Features

  • Configuration Driven - What MDConsole is driven by the robot configuration. No separate configuration is needed. See [Understanding MaterBot](Understanding MaterBot) for information on how to configure a robot.

  • Subystems View - MDConsole displays robot subsystems in a series of UI cards. Each sybsystem card displays sensor readings associated with the subsystem and exposes subsystem settings that can be configured via the UI. Subsystem Card

  • Preferences Framework - The MDConsole uses RoboRIo's preferences framework to save settings such that they are persisted through reboots and reprogramming events.

  • Core Subsystems - Core subsystemssettings and sensor readings, including the core, websockets and diagnostics subsystems, can be viewed when needed, and are out of the way by default. This maximizes the UI space for mission specific purposes. Core Settings Core Readings

  • Event Log - the UI manages an event log that displays logged messages from the Robot. The event log supports filtering of events to make it easier to find messages of interest and autoscrolling to have visibility to current messages. Event Log

  • Connectivity Indicators - MDConsole features easy to see indicators that indicate whether the console is connected to the robot and to the database.

    Connectivity Indicators

  • Session Recording - MDConsole supports the ability to easily record sessions. What gets recorded, e.g. which log messages, which events, what sensor reading, are all configured via the robot configuration.
    Recording

  • Playback - Recorded sessions can be retrieved from the database and replayed via the console. Session Playback

  • Simulation - MDConsole supports a simulation framework where UI features can be developed using a set of simulated events. The UI framework can generate and process the simulated events without being connected to the robot. Simulation

  • GameClock - The gameclock is a UI widget that displays the time from the robot's perspective. If the robot is connected to the Field Management System (FMS), the clock displays game time as reported via the driver station. Since driver station game time is not guaranteed to be accurate, the GameClock widgets offers controls to adjust the clock in order to match the official game time. This can be used to drive time driven events.

    GameClock

  • Robot State Indicator - A UI widget that displays the current state of the robot. It is possible to adapt the UI to the robot state.

    RobotState Indicator

  • MDConsole OI - MDConsole also comes with an Operator Interface (OI) capability. It can support a number of command buttons, which are configured in the OI configuration. It can also support limited OI feedback capabilities.

    MDConsole OI