Closed DeltaDizzy closed 1 year ago
A linear Kv of 0.00052047 m/s means that 12V results in a steady-state velocity of 23,056 m/s. The LUT is generated in 0.01 m/s increments, so there's 2.3056 million entries. On my machine, the LTV LQR instance takes 30 ms to construct each, so that's a total LUT generation time of 19 hours (and 7 minutes, 40 seconds in C++ because it takes 0.2 ms per instance).
A Kv in the correct size range should address the issue, altho we should emit a warning if the max velocity calculated from the drivetrain model is too high.
We should also look into smarter interpolation schemes so we don't need so many LUT entries. Based on the shape of the controller gain manifold from my experience trying to memoize the LTV controller gains before, a second-order or third-order Taylor series expansion may be sufficient.
Describe the bug When using the Java version LTVDifferentialDriveController, the constructor takes a very long time to complete. On our RIO 1 it ran for a little over 6 and a half minutes before the JVM crashes with an out of memory error. In sim, it ran for over 11 and a half minutes before i stopped it, still without finishing the constructor.
To Reproduce Steps to reproduce the behavior:
Expected behavior The two print statements should both print within a few seconds of each other, indicating that the LTVDifferentialDriveController object was successfully constructed and is ready for use.
Desktop (please complete the following information):