Open calcmogul opened 1 week ago
Is there any reason not to hardcode the seed across the board (ie, not just for tests)?
Either way, this requires a refactor of how noise is generated for the sim classes- the pseudorandom generator would need to be retained with the class instance rather than being recreated with a random seed each update.
The tests often use physics sim classes that inject measurement noise. We should hardcode the random seed so the tests are deterministic. This will eliminate a source of test flakiness we've been seeing.
The seed could probably be set in wpimath/src/test/native/cpp/main.cpp before the tests are run.