Thanks for the info. We’re actually moving our Maven hosting to the WPILib artifactory for the next release to avoid the authentication problem altogether, which should be a cleaner solution long-term.
Will and Alpha 2 version be released for the beta 2 verion of WPILib? I’m having big problems because I need to update WPILib to the second beta, but I can’t because AKit doesn’t have a compatible version
We will release a version of AdvantageKit compatible with the second WPILib beta soon.
Is there any changelog or alike for the coming version of Advantage Kit 2025? I read the release page and it had said that the current 2025 alpha 1 version is no different from 2024, and is simply just for those updating to the 2025 beta. When can we expect to see the new advantage kit?
The 2025 beta of AdvantageKit is now released!
in my team we use advantage kit replay and are looking into an option to run certain subsystems at higher frequencies (for better accuracy onsomesensors), but so far we saw that the only way to do that with replay is to opoen another thread and store the data between 50hz cycles in an array for example (like you do in the swerve drive project). we are interested if there is an easier way to do this such as setting specific log tables to run on faster periods, thanks.
We have a documentation page explaining the issue with multithreading and supported alternatives:
Fundamentally, the problem is that threads will always interfere with deterministic replay because they don’t execute at a consistent speed that can be recreated in replay (especially when replay is running faster than real time). However, threads can be freely used for recording inputs or settings outputs as long as they’re isolated to an IO implementation. This means losing the ability to replay that specific thread of course, but the input logging that isolates it from the rest of the code preserves deterministic replay for other functions.
The correct solution really depends on what you’re trying to do specifically. The swerve drive project uses an array to log inputs from a thread, but that’s only because the high-frequency data from that thread needs to be processed by the pose estimator (which is in the “replayable” part of the code). If you’re just running a high-frequency feedback loop, that can be handled end-to-end in the thread without any input logging. You’re essentially free to do whatever you want within an IO implementation; there’s no require to record input values unless they need to be used in the main code.
Hey, I am attempting to use the 2024 AdvantageKit Advanced swerve template and we used it successfully on the 2024 season, however we were using neos, now we are using krakens for the first time.
I got the swerve working, however it’s not field oriented… Is there a variable I am missing that would fix this? I tried messing around, however no luck
I don’t see any immediate issues with your code. Have you verified that the odometry rotation of the robot is accurate? You can find it under /RealOutputs/Odometry/Robot/rotation
.
Hello, I’m attempting to use the new Vision template for an offseason bot. However, I’m getting these two errors
VisionIOInputsAutoLogged.java:22: error: no suitable method found for get(String,TargetObservation)
latestTargetObservation = table.get("LatestTargetObservation", latestTargetObservation);
VisionIOInputsAutoLogged.java:14: error: no suitable method found for put(String,PoseObservation[])
table.put("PoseObservations", poseObservations);
Here is my VisionIO.java
package frc.robot.subsystems.vision;
import org.littletonrobotics.junction.AutoLog;
import edu.wpi.first.math.geometry.Pose3d;
import edu.wpi.first.math.geometry.Rotation2d;
public interface VisionIO {
@AutoLog
public static class VisionIOInputs {
public boolean connected = false;
public String name = "";
public TargetObservation latestTargetObservation =
new TargetObservation(new Rotation2d(), new Rotation2d());
public PoseObservation[] poseObservations = new PoseObservation[0];
public int[] tagIds = new int[0];
}
/** Represents the angle to a simple target, not used for pose estimation. */
public static record TargetObservation(Rotation2d tx, Rotation2d ty) {}
/** Represents a robot pose sample used for pose estimation. */
public static record PoseObservation(
double timestamp,
Pose3d pose,
double ambiguity,
int tagCount,
double averageTagDistance,
PoseObservationType type) {}
public static enum PoseObservationType {
PHOTONVISION
//QuestNav? maybe todo
}
public default void updateInputs(VisionIOInputs inputs) {}
}
I’ve ran into this issue before, not being able to serialize, how do you solve it? It seems to use custom records, which to my knowledge isn’t possible with AKit logging. Thanks so much!
Sorry for the quick response, the problem was that I was still on the Alpha AKit. I updated to the beta, and it built properly. That’s a great new feature to have!!!
Can you upload a log file where you see this behavior? I suspect it’s probably an issue with your hardware configuration, but a log file will be the quickest way to track down the source of the problem.
Hi, I noticed in the 2025 version you cant directly access LoggedDriverStation for joysticks values. we previously had a logged joystick class that uses the LoggedDriverStation Class to give joystick data. what can I do now?
As documented here, Driver Station data is automatically replayed and accessible via the normal DriverStation
and HID classes (Joystick
, XboxController
, etc). AdvantageKit has always worked this way because we want to minimize changes to user code like reading joystick data in a non-standard way.
Oh got it thanks, what was the old LoggedDriverStation for then btw?
LoggedDriverStation
was never intended to be used by the user. It published the same data as DriverStation
so there was no harm in exposing it, but it was primarily an internal class used by AdvantageKit (and is still used internally for handling data flow).
Also, just saw it today, I think LoggedDashboardNumber is deprecated. When using LoggedNetworkNumber, is specifying the dashboard name before the key like “/SmartDashboard/Drive/SomeField” enough?