AdvantageScope: Data Logging and Analysis

What is AdvantageScope?

AdvantageScope is a robot data visualization tool focused on analysis. Unlike a dashboard (Shuffleboard) which is for driver control, AdvantageScope is for the developer. It allows you to view log files (WPILOG, RLOG, Hoot) or live data (NT4) with powerful visualizations like 3D field views, graphing, and synchronization with match video.

It is the companion tool to AdvantageKit but works with any WPILib project that logs data.

Learn more: AdvantageScope Documentation | Download AdvantageScope

Key Features

1. Multi-Format Support: Opens WPILib data logs (.wpilog), AdvantageKit logs (.rlog), CTRE logs (.hoot), and Driver Station logs (.dslog). (Loading Data Documentation)

2. 3D Field Visualization: Visualize your robot's pose, mechanism states (arm angles, elevator heights), and trajectory in full 3D. This is critical for debugging odometry and autonomous paths. (3D Field View Documentation)

3. Video Synchronization: If you have match video, you can sync it with the log data. Clicking a point on the graph jumps the video to that exact moment. (Video Sync Documentation)

4. Swerve Visualization: Dedicated views for swerve module states (vectors) to debug drive issues. (Swerve View Documentation)

5. Console Log Review: Filter and search through robot console output synchronized with the data. (Console View Documentation)

Using AdvantageScope with WPILib

To get the most out of AdvantageScope, you should use "DataLogManager" in your WPILib code to record data to a USB stick or the RIO's internal storage. (Recording Data Documentation)

Structured Data: AdvantageScope supports the new WPILib "Struct" serialization. This allows you to log complex objects like "Pose2d", "Translation2d", or custom classes efficiently, and AdvantageScope will automatically recognize them as 3D objects or vectors. (Structured Data Documentation)

Logging for Visualization

// In your robot code (RobotPeriodic or Subsystem)

// Log a Pose2d for 3D field visualization
// See: https://docs.advantagescope.org/tab-reference/3d-field/
Logger.recordOutput("Odometry/RobotPose", m_drive.getPose());

// Log a Trajectory to see the path
Logger.recordOutput("Auto/Trajectory", m_trajectory);

// Log mechanism states (e.g. Arm Angle)
Logger.recordOutput("Arm/AngleDegrees", m_arm.getAngle());

// Log Swerve Module States for vector visualization
// See: https://docs.advantagescope.org/tab-reference/swerve/
Logger.recordOutput("Swerve/ModuleStates", m_drive.getModuleStates());

Analysis Workflow

How to debug effectively:

  • Download the log file from the robot after a run.
  • Open in AdvantageScope. (Loading Data Guide)
  • Drag 'Odometry/RobotPose' to the '3D Field' tab to verify location. (3D Field View Guide)
  • Drag target vs actual values (e.g. 'Arm/Target' vs 'Arm/Actual') to a 'Line Graph' to check PID tuning. (Graph View Guide)
  • If investigating a crash/error, look at the 'Console' tab. (Console View Guide)
  • Sync match video if available to correlate physical behavior with data. (Video Sync Guide)

Resources

Open full interactive app