-
Notifications
You must be signed in to change notification settings - Fork 615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[wpimath] Remove units from trapezoid profile classes #7276
[wpimath] Remove units from trapezoid profile classes #7276
Conversation
Does TrapezoidProfile give incorrect answers if you pass in a non-SI unit? The profile should still work as long as the units are consistent. |
It works if measurement inputs are provided in terms of the SI base units. But people setting everything in terms of the same non-SI unit (such as degrees or inches or native sensor ticks) would have the math break |
That should work, actually. The equations in TrapezoidProfile don't care what the length unit is. |
Can confirm we ran into this issue ourselves, we were using the profiled pid classes with trapezoid profiles and thought using units would be good but quickly found out everything was wonky when we didn't use what the class internally expected |
Right. They just care that units are consistent. If you create constraints with the unit-taking constructor |
Units-safe trapezoid profiles should arguably be a separate class. |
They were assuming inputs were always going to be in SI units, which is not the case