Telemetry Mastery
Driving blindly is a thing of the past. In MARSLib, we use the power of Discovery through data. We use Mechanical Advantage’s AdvantageKit to create a transparent, deterministic record of every robot action. This ensures that every technical decision is backed by evidence, maximizing our Impact on the field while creating a culture of experimental persistence.
1 AdvantageKit Basics
Section titled “1 AdvantageKit Basics”Every real hardware output (e.g. TalonFX ticks, Pigeon2 yaw, or CANdle states) must be logged through an IO abstraction layer using an AutoLogged object.
When you add a variable like public double motorCurrentAmps = 0.0; inside an IO struct, AdvantageKit immediately picks it up and pushes it to NetworkTables dynamically. The Robot.java loop uses this logged struct identically, whether running in physical competition or in Replay mode.
2 AdvantageScope vs. Shuffleboard
Section titled “2 AdvantageScope vs. Shuffleboard”While MARSLib fundamentally relies on AdvantageScope for sophisticated 3D visualizations, log replay, and time-series graphing, we still use Shuffleboard for certain live operations.
Shuffleboard is typically reserved for simple boolean toggles (like selecting auto routines from the driver station), sending basic string configurations prior to a match, or when rapid drag-and-drop dashboarding is required without setting up rigid JSON layouts.
Installing AdvantageScope
Section titled “Installing AdvantageScope”-
Navigate to the official AdvantageScope Releases page.
-
Download the installer specifically for your operative system.
-
Install and open the application. When on the robot network, set the Data Source to
NetworkTables.
3 Importing MARS Layout Templates
Section titled “3 Importing MARS Layout Templates”AdvantageScope use layout.json files that arrange tabs specifically to enhance driver feedback. To avoid creating views from scratch every time, import our central template!
-
In AdvantageScope, go to the upper right Layouts icon and select Import Layout….
-
Locate the
layoutsfolder in the root of the MARSLib directory you cloned earlier. -
Select
MARS_Standard_Layout.jsonto load a unified driver and debugging UI explicitly designed for 2614.
4 Replay Mode & Diagnostics
Section titled “4 Replay Mode & Diagnostics”Did a mechanism break during a match? No problem. We have a bit-perfect replay of the software logic.
-
Download the
.wpilognatively from the Robot using the Log Auto-Uploader or AdvantageScope’s file downloader. -
Open AdvantageScope locally, change the Source down arrow over to Log File, and target your
.wpilogfile. -
You can scrub back and forward using the slider—you’ll see exactly what angles the Swerve modules were targeting right as the error occurred.
5 Simulation Replay Tuning
Section titled “5 Simulation Replay Tuning”AdvantageKit provides an unparalleled workflow called Simulation Replay. Because all sensor inputs are completely decoupled from control logic, you can execute a recorded log, but inject modified robot logic while the log replays.
This approach allows engineers to endlessly tweak feedforward loops, vision confidence tuning, and superstructure kinematic logic using a single match’s data until it’s perfected—without ever turning on the physical robot.
📖 Further Reading & External Resources
Section titled “📖 Further Reading & External Resources”-
FRC Log Replay and Simulation - Mechanical Advantage’s definitive 2024 Championship presentation on the why behind the IO-Layer abstraction.
-
AdvantageKit structure - The core repository governing deterministic replay loops on the RIO.
-
AdvantageScope Documentation - Visualizing 3D logs natively in real-time.