Closed jwbonner closed 7 months ago
Other than the datalog loading functionality, it appears the SysIdState in this file doesn't use the correct naming. What the tool expects is lowercase-names (e.g. quasistatic-forward, dynamic-reverse), but what's in the file is kQuasistaticForward, kDynamicReverse.
Thanks, switching it to the correct names seems to have solved the issue. One aspect which is slightly confusing is that the recordState
consumer accepts a State
enum rather than a string. I was inadvertently logging the enum directly, which AdvantageKit records using the name (to support replaying it from the log). More generally, someone who accidentally uses .name()
instead of .toString()
would encounter the same problem.
In the interest of avoiding API changes at this point (like making it a string consumer), I think it would be helpful to have SysId not display any runs with an invalid name. Seeing the list of four runs with a count of samples for each made it appear that the runs were identified correctly (and of course, any sort of feedback beyond crashing would be good on macOS).
BTW, I think this issue is unrelated to #6193. This one involves logs produced directly by AdvantageKit, while that issue is about logs exported by AdvantageScope. Looks like we never opened a corresponding issue for that one.
Looking at this a bit more, it seems like the issue is here. Any test state called "none" is rejected, but everything else is accepted by default. It seems like this should be the other way around; only valid test states should be accepted.
@Oblarg any thoughts here?
For now we should reject anything that doesn't have the standard naming. We can become more flexible later when we improve the fit.
Ok. Currently there's just the 4 valid names? (quasistatic and dynamic / forward and reverse combinations)
And none
, yeah.
The attached log file was produced using AdvantageKit in simulation, with very minor noise added to the voltage samples to ensure reasonable sampling for the dynamic tests (even with duplicate values removed). Trying to run the SysId analysis using the fields below produces the message "Not enough data to run Acceleration Calculation..." on Windows and causes the application to crash on macOS (not tested on Linux).
/RealOutputs/SysIdState
/Drive/LeftVelocityRadPerSec
/Drive/LeftPositionRad
/Drive/LeftAppliedVolts
The console log for the macOS crash shows:
SysId_AdvantageKit.wpilog.zip
Running with WPILib 2024.1.1 on Windows 10 and macOS 13.5.