AdvantageScope

repository·main·Indexed 43 days ago

https://github.com/mechanical-advantage/advantagescope

A robot diagnostics, log review, and data visualization application for FIRST robotics teams. It supports a wide variety of log formats (WPILOG, Hoot, REVLOG, Road Runner, CSV, NI DS log, RLOG) and live data streams (NT4, Phoenix, RLOG, FTC Dashboard). Key features include flexible graphs, 2D/3D field visualizations with customizable CAD-based robots, synchronized video playback, and joystick/Swerve drive module displays.

Tokens
33.3K
Snippets
57
Records
173
Agent score
54%

What's inside AdvantageScope

  1. What is AdvantageScope?

    main

    AdvantageScope is a robot diagnostics, log review/analysis, and data visualization application designed for FIRST teams. It is used to analyze robot performance through various log formats and live data streams.

    Supported Log Formats

    AdvantageScope can read the following file formats:

    • WPILOG
    • Hoot (CTRE)
    • REVLOG (REV Robotics)
    • Road Runner
    • CSV
    • NI DS log
    • RLOG

    Live Data Streaming

    You can view live robot data using:

    • NT4
    • Phoenix
    • RLOG
    • FTC Dashboard streaming

    Key Features

    • Graphs and Charts: A wide selection of flexible visualization tools.
    • Field Visualizations: 2D and 3D field views of pose data with customizable CAD-based robots.
    • Synchronized Video: Playback of match video synchronized with log data.
    • Joystick Visualization: Visual representation of driver actions on customizable controller models.
    • Swerve Module Displays: Vector displays for swerve drive modules.
    • Log Analysis: Console message review and log statistics analysis.
    • Data Export: Support for exporting data to CSV and WPILOG formats.
  2. Overview of AdvantageScope

    main

    AdvantageScope is a robot diagnostics, log review/analysis, and data visualization application designed for FIRST teams. It is used to analyze robot performance through various log formats and live data streams.

    Key Capabilities:

    • Data Visualization: Flexible graphs, charts, and 2D/3D field visualizations of pose data with customizable CAD-based robots.
    • Log Analysis: Reviewing console messages and log statistics.
    • Video Integration: Synchronized video playback from separately loaded match videos.
    • Hardware Visualization: Joystick/controller action displays and Swerve drive module vector displays.
    • Data Export: Support for exporting data to CSV and WPILOG formats.

    Note: While optimized for use with the AdvantageKit log replay framework, AdvantageKit is not required to use AdvantageScope.

  3. Navigate the AdvantageScope interface

    main

    The AdvantageScope main window is organized into several functional areas:

    • Sidebar: Contains the list of available tables and fields. Use this to select data for visualization.
    • Tab Bar: Used to switch between different views (tabs). Supports layout exporting/importing and tab management.
    • Viewer Pane: The central area where data is presented based on the active tab type.
    • Control Pane: Used to select specific fields for visualization and manage tab-specific options.

    To view multiple log files simultaneously, use File > New Window to open a separate instance of the application.

  4. How the Mechanism tab works

    main

    The Mechanism tab provides a visual representation of a jointed mechanism using one or more Mechanism2d objects. It allows users to visualize the physical state of the robot's joints over time.

    Timeline Controls

    The timeline at the bottom of the view controls playback and synchronization:

    • Selection: Click the timeline to select a specific time; right-click to deselect.
    • Synchronization: The selected time is synchronized across all other tabs in AdvantageScope.
    • Color Coding:
      • Yellow: Autonomous mode.
      • Blue: Teleoperated mode.
      • Gray: Utility mode.
    • Navigation & Zooming:
      • Zoom: Scroll up/down over the timeline, or click and drag while holding Shift to select a range.
      • Pan: Scroll horizontally or click and drag on the timeline.
      • Quick Zoom: Press Ctrl+\ to zoom to the period where the robot is enabled.
    • Live Connection: When connected live, scrolling left unlocks the view from the current time; scrolling all the way to the right locks it back to the current time.
  5. New Field Visualization Options

    main

    Enhanced visualization options are available for the 2D Field and 3D Field:

    • 2D Field: A wider variety of robot bumper colors are available, and each object can be configured with its own unique color. This allows for better differentiation when using multiple 'ghost' robot objects.
    • 3D Field: When visualizing 2D mechanisms on the 3D field, mechanisms can now be placed on the YZ plane (in addition to the XZ plane) to support complex multi-axis movement.
    • Rendering: The 3D field now supports optional anti-aliasing to improve edge quality.
  6. Experimental FTC Support

    main

    In preparation for Systemcore support in the 2027-2028 season, AdvantageScope includes experimental features for the FIRST Tech Challenge (FTC) control system.

    Key features include:

    Note: FTC support is in active development. Teams should exercise caution when using experimental software during official seasons. While AdvantageScope works with third-party libraries like WPILOG and RLOG, it is optimized for the WPILib framework.

  7. Unit-Aware Graphing in Line Graph

    main

    The Line Graph tab has been redesigned to be fully unit-aware, allowing for more precise numeric field analysis.

    Capabilities include:

    • Precise Y-axis labeling and value displays.
    • Quick unit conversion via the control menu (no popups required).
    • Implicit conversion of compatible unit types within a single axis.
    • Accurate display of integrated and differentiated units.

    For detailed information on supported units, see the unit documentation.

  8. Understand AdvantageScope coordinate system conventions

    main

    AdvantageScope supports several coordinate systems used in the 2D and 3D Field tabs. These systems follow the WPILib coordinate system documentation for axis and rotation conventions.

    Available coordinate systems include:

    • Center/Red (Systemcore): Origin is at the center of the field. The +X axis faces away from the red alliance wall. (Default for FRC and FTC fields starting in 2027).
    • Blue Wall: Origin is in the rightmost corner of the blue alliance wall. The +X axis faces the red alliance wall. (Default for FRC fields 2023–2026).
    • Alliance Wall: Origin is in the rightmost corner of the alliance wall for the robot's current alliance. The +X axis faces the opposite alliance wall. (Default for FRC in 2022).
    • Center/Rotated: Origin is at the center of the field. The +X axis faces to the right from the perspective of the red alliance wall. (Default for FTC fields 2024–2027).