Post-match troubleshooting requires deterministic telemetry. Rather than relying on operator impressions, high-speed telemetry logging records signals every robot cycle to a .wpilog binary file stored on the roboRIO USB drive.
The Modern Telemetry Pipeline
Section titled “The Modern Telemetry Pipeline”[ Subsystem Sensors & State ] | v[ Epilogue (@Logged) / DataLogManager ] --(Every 20ms)--> [ Flash USB Drive (/u/logs/*.wpilog) ] | v [ AdvantageScope ] (Post-match analysis: 2D Field, 3D Swerve, Plots, Video Sync)WPILib DataLogManager and Epilogue Setup
Section titled “WPILib DataLogManager and Epilogue Setup”Enabling binary logging with automated annotation-driven telemetry requires minimal setup in Robot.java:
package frc.robot;
import edu.wpi.first.wpilibj.TimedRobot;import edu.wpi.first.wpilibj.DataLogManager;import edu.wpi.first.wpilibj.DriverStation;import edu.wpi.first.epilogue.Epilogue;import edu.wpi.first.epilogue.Logged;
@Loggedpublic class Robot extends TimedRobot { @Override public void robotInit() { // Starts logging NetworkTables and Driver Station telemetry to flash drive DataLogManager.start();
// Log Driver Station match metadata and joysticks DriverStation.startDataLog(DataLogManager.getLog());
// Bind Epilogue annotation processor Epilogue.bind(this); }
@Override public void robotPeriodic() { // Publishes all annotated fields to NetworkTables and DataLog Epilogue.update(this); }}AdvantageScope Visualization
Section titled “AdvantageScope Visualization”AdvantageScope is an open-source visualizer that opens .wpilog files directly:
- 3D Swerve Module View: View individual wheel angles and speeds matching on-field robot motion.
- 2D Field Trajectory: Overlay actual odometry paths on top of planned PathPlanner paths.
- Mechanism2d Playback: Watch animated elevators and arms move throughout the match.
- Motor Diagnostic Curves: Plot commanded voltage, actual velocity, and stator current on the same graph to identify mechanical binding or low battery voltage.
Log Review After Every Match
Make it standard pit protocol to pull the USB flash drive or download the .wpilog over Ethernet to verify mechanism currents before your next match.
Verified Sources & Standards
- WPILib Telemetry & On-Robot Logging Architecturedocs.wpilib.orgWPILib Standard
- WPILib Robot Telemetry with Annotations (Epilogue)docs.wpilib.orgWPILib Standard