wpilibsuite / allwpilib

Official Repository of WPILibJ and WPILibC
https://wpilib.org/
Other
1.07k stars 613 forks source link

Holonomic Drive Controller - Inconsistent FeedForward Application #4132

Open gerth2 opened 2 years ago

gerth2 commented 2 years ago

Describe the bug

The existing holonomic drive controller classes inconsistently incorporate feedforward.

To Reproduce Comments reference this code

Expected behavior Feedforward calculations should likely be in a different class. At a minimum, thetaFF should come from some calculation of the expected rotational velocity at that point in the trajectory.

Screenshots N/A

Desktop (please complete the following information):

Additional context We have patched this in userland with this class. While it may not be the exact correct answer, it represents something that is functional.

Additional discord context

calcmogul commented 2 years ago

Also, thetaFF is currently a feedback calculation instead of feedforward.