Skip to main content

What's New in 2025?

Log Replay, Streamlined

๐Ÿ  All-New Template Projectsโ€‹

The AdvantageKit template projects have been reimagined from the ground up with improved features and documentation:

  • The reimagined swerve templates for robots based on the Spark and TalonFX support advanced features like high-frequency odometry, on-controller feedback loops, and automated characterization routines. The TalonFX version of the template now optionally integrates with CTRE's swerve project generator for calibration.
  • The brand new vision template project demonstrates how AdvantageKit can be used to create a deterministic and replayable pose estimation pipeline, with support for high-frequency sampling, simulation with PhotonLib, and advanced filtering options.
  • All other template projects have been cleaned up and streamlined.
  • Every template project includes now detailed setup and tuning instructions, available here.

We recommend checking the documentation pages linked above for more information about the new features available in each template project.

info

Every AdvantageKit template is open-source and fully customizable:

  • No black boxes: Users can view and adjust all layers of the control stack, including advanced features of the swerve and vision templates.
  • Customizable: IO implementations can be adjusted to support any hardware configuration, including a combination of devices from multiple vendors.
  • Replayable: Every aspect of the control logic, pose estimation, etc. can be replayed and logged in simulation using AdvantageKit's deterministic replay features with guaranteed accuracy.

๐ŸŽ‰ No Shimsโ€‹

Since its initial release, AdvantageKit has relied on shimming some WPILib classes to enable deterministic replay. Thanks to a collaborative effort with the WPILib team, we are thrilled to announce that AdvantageKit no longer uses WPILib shims. Deterministic logging and replay is still fully supported with minimal changes to the user experience. See this page for details on the data available during replay.

warning

Deterministic timestamps are now provided by the RobotController.getTime() and Timer.getTimestamp() methods, used by default by built-in WPILib classes. The older RobotController.getFPGATime() and Timer.getFPGATimestamp() methods are now used for accessing the real (non-deterministic) timestamp, and should only be used within IO implementations or for performance profiling.

...

No shims

โฑ๏ธ Replay Watchโ€‹

Replay watch is a new feature allowing rapid iteration of replayed code, taking advantage of AdvantageKit's deterministic replay features to replay faster than real time without losing accuracy. The video below shows how replay watch can be used to rapidly iterate on simple code. Check the pose estimation example and documentation for more detail.

tip

This update includes additional features to streamline the log replay process, even without replay watch:

  • Log files automatically open in AdvantageScope when replay completes. This behavior can be configured using the WPILOGWriter class.
  • The filenames for replayed logs use number indices when replaying multiple times (e.g. mylog_sim_2.wpilog instead of mylog_sim_sim.wpilog)

๐Ÿ“‹ Record Loggingโ€‹

Custom record classes can be logged as structs, including support for single values and arrays as inputs or outputs. This enables efficient logging of custom complex data types, such as pose observations. Check the documentation for details.

Record struct

This code below shows how this feature is used in the new vision template for logging pose observations:

@AutoLog
public static class VisionIOInputs {
public PoseObservation[] poseObservations = new PoseObservation[0];
}

public static record PoseObservation(
double timestamp,
Pose3d pose,
double ambiguity,
int tagCount,
double averageTagDistance,
PoseObservationType type) {}

public static enum PoseObservationType {
MEGATAG_1,
MEGATAG_2,
PHOTONVISION
}

๐Ÿ”ข 2D Array Loggingโ€‹

In addition to single values and arrays, 2D arrays can now be logged as inputs or outputs. All data types supported by standard array logging also support 2D arrays, including primitives, structs, and records. Check the documentation for details.

Translation2d[][] visionSamples = new Translation2d[][] {
new Translation2d[] { new Translation2d(), new Translation2d() },
new Translation2d[] { new Translation2d(), new Translation2d() }
}

Logger.recordOutput("VisionSamples", visionSamples);

๐Ÿšจ Alerts Loggingโ€‹

The state of any alerts created through WPILib's persistent alerts API will be automatically logged as outputs. These alerts can be visualized using AdvantageScope's ๐Ÿ“‰ Line Graph tab. Check the documentation for details.

Alerts screenshot

๐Ÿ“ก Radio Loggingโ€‹

Status data from the VH-109 radio is automatically logged. This includes useful information about the connection status, bandwidth usage, etc. Check the documentation for details.

Radio data

๐Ÿ“– New Documentation Siteโ€‹

You're viewing the updated version of the AdvantageKit documentation, with a reorganized layout and detailed template project documentation. The new documentation site also supports easier navigation via the sidebar, a built-in search feature, and a refined mobile interface.

tip

Check the log replay comparison page for a breakdown of AdvantageKit's features and capabilities compared to similar logging tools like Hoot Replay.

Documentation screenshot

๐Ÿšง Build System Updatesโ€‹

AdvantageKit is currently transitioning to a new build system, which will simplify development and the process of external contribution. We will have more updates to share soon. Additionally, AdvantageKit is in the process of moving Maven hosting from GitHub Packages to the WPILib Artifactory site. This change is intended to provide a more stable and seamless experience when installing and using AdvantageKit. AdvantageKit v4.0.0-beta-1 remains hosted on GitHub Packages, but look for updates soon.