Description
Describe the bug
I plotted the values returned by the calculateInflectionPoint function added to the sample code. I noticed the profile looks fine (velocity & position) but the inflection point velocity and position oscillates between the goal and setpoint after the actual inflection point. This seems to depend on both the kV value and the setpoint/setpoint delta. e.g. the default values in the template are fine, but tweaking slightly generates this type of issue.
To Reproduce
Drive the sim elevator up/down to the points referenced in the code
- Link to code: https://github.com/FRC3005/exponential-profile
Expected behavior
This inflection point is important to the profile generation. The question I have is, how is it stable if the inflection point is wrong, and if the inflection point is wrong, should this internal state not be a public API?
Screenshots
From sim in the project
From robot code (similar structure)
Desktop (please complete the following information):
- OS: Windows 11
- Project Information:
Additional context