allwpilib icon indicating copy to clipboard operation
allwpilib copied to clipboard

Some SysID unit tests have overly large tolerances and incorrect kPs

Open brettle opened this issue 5 months ago • 1 comments

The following 2 lines allow tests to pass with incorrect kPs:

https://github.com/wpilibsuite/allwpilib/blob/11c60df3e02062aa06b8d57711f1a3885229967f/sysid/src/test/native/cpp/analysis/FeedbackAnalysisTest.cpp#L88

https://github.com/wpilibsuite/allwpilib/blob/11c60df3e02062aa06b8d57711f1a3885229967f/sysid/src/test/native/cpp/analysis/FeedbackAnalysisTest.cpp#L103

Note that the tolerances are larger than the expected values, so even some negative kPs would be accepted.

The expected kPs themselves appear to actually be wrong but this went undetected due to the tolerances being too high.

brettle avatar Mar 11 '24 21:03 brettle