AdvantageScope: Data Logging and Analysis

intermediate35 min

What is AdvantageScope?

AdvantageScope is for analyzing robot data—not driving. Open log files (WPILOG, RLOG, Hoot) or live NT4 streams, then graph signals, view the field in 3D, and sync video to a timestamp.

It pairs with AdvantageKit but works with any WPILib project that logs.

Documentation | Download

Key Features

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

2. 3D Field Visualization: Pose, mechanism state, and trajectories for odometry and auto debugging. (3D field)

3. Video Synchronization: Align match video with the log; click a graph to jump the video. (Video sync)

4. Swerve Visualization: Module state vectors for drive debugging. (Swerve view)

5. Console Log Review: Filter console output on the same timeline as signals. (Console)

Using AdvantageScope with WPILib

On a stock WPILib robot, enable DataLogManager to record to USB or the RIO. (Recording data)

Structured Data: WPILib struct serialization logs types like Pose2d efficiently; AdvantageScope can plot them as vectors or field objects. (Struct units)

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());

Naming Log Keys

AdvantageScope builds its tree from the slashes in a key, so Intake/Position and Intake/velocity group together automatically. Start every key with the subsystem name and stay consistent — a key nobody can find during a match may as well not have been recorded.

Keys worth having open, and what they answer

Key patternShowsUseful for
Mechanism/targetPos vs Mechanism/PositionCommanded and actual positionTuning — overshoot, steady-state error
Shooter/leftVelocity, /rightVelocityBoth flywheel sidesSpin-up time and recovery after a shot
Mechanism/dutyCycle vs /velocityCommanded output and resulting speedSpotting a stalled mechanism
Drive/Module0 … Module3Per-module IO inputsA module that is disconnected or fighting
Odometry/TrajectoryThe active PathPlanner pathAutonomous path tracking on the 2D/3D field
TunableNumbers/*Every tunable value at the timeConfirming what the robot was actually running
CommandName/*A command's intermediate valuesWhether a miss was the pose estimate or the math
RealMetadata/GitSHA, /GitDirtyThe exact code on the robot"Which build was this?"

The single most useful habit is to log commanded alongside measured. If your setters return the value they set and carry @AutoLogOutput (see Subsystems), both halves are already recorded — and dragging a target key and its matching measured key onto one line graph is the standard first move for any tuning question.

Analysis Workflow

How to debug effectively:

  • Download the log file from the robot after a run. AdvantageKit writes it to the USB stick at /U/logs — no stick, no log.
  • Open in AdvantageScope. (Loading Data Guide)
  • Check RealMetadata/GitSHA and GitDirty first, so you know what code produced the log.
  • Drag ‘Odometry/RobotPose’ to the ‘3D Field’ tab to verify location. (3D Field View Guide)
  • Drag target vs actual values (e.g. ‘Intake/targetPos’ vs ‘Intake/Position’) to a ‘Line Graph’ to check 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