Help with AdvantageKit

Hello, I have recently been working to install Advantagekit and get it working with advantagescope. When running in simulation (replay mode) it correctly opens a log file, but it doesn’t seem to be the one from the real robot. I could be mistaken, but the file is called “akit_25-02-07_13-41-49_sim”, followed by the iteration of the run. This is odd, because there is no actual log file that doesn’t say sim in the drive. The values in the sim files seem reasonable including things like power levels and joystick movement, but it said 6m of footage even though we only ran the robot for 20 seconds. If anyone here knows more about errors in advantagekit or could assist in our setup, that would be great. Our current robotcode is located here: GitHub - FRC1466/robot-code-2025 and the current version will be found in the branch AdvantageKitBeta. Thank you for the assistance.

When replay starts you can check the console output, there should be a line that says which log file is used for replay.
Also, note that if you want to be able to run your robot code in simulation without replay, you should check in code whether this is a real robot, regular simulation run, or replay simulation run. You can check the AdvantageKit template projects to see how this should be handled.

When replaying, AdvantageKit creates another log file, with the original inputs and RealOutputs, but also with a new ReplayOutputs table. The new file has a _sim suffix, as you can see in the line here:

1 Like

What kind of data would be in this replayoutputs tab? Does that mean you can modify the code, run it in sim, and see what it would look like with those changes? Or is that something different I would have to set up. Thank you for the help.

Basically, yes. Check the AdvantageKit docs for more information.
In general I wouldn’t work mid-season to refactor your code to use AdvantageKit, it takes time and effort to implement and fully grasp the concept. I recommend studying it in the off-season.
Note that you do not need to use AdvantageKit to use AdvantageScope.

1 Like