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());
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 pattern | Shows | Useful for |
|---|---|---|
Mechanism/targetPos vs Mechanism/Position | Commanded and actual position | Tuning — overshoot, steady-state error |
Shooter/leftVelocity, /rightVelocity | Both flywheel sides | Spin-up time and recovery after a shot |
Mechanism/dutyCycle vs /velocity | Commanded output and resulting speed | Spotting a stalled mechanism |
Drive/Module0 … Module3 | Per-module IO inputs | A module that is disconnected or fighting |
Odometry/Trajectory | The active PathPlanner path | Autonomous path tracking on the 2D/3D field |
TunableNumbers/* | Every tunable value at the time | Confirming what the robot was actually running |
CommandName/* | A command's intermediate values | Whether a miss was the pose estimate or the math |
RealMetadata/GitSHA, /GitDirty | The 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/GitSHAandGitDirtyfirst, 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)