-
Notifications
You must be signed in to change notification settings - Fork 614
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
[wpiunits] Add Feedforward unit types #7064
base: main
Are you sure you want to change the base?
Conversation
/pregen |
/pregen |
So what's causing the pregen to fail? |
The pregen command wasn't updated to regenerate wpiunits. I'll work on fixing this, but in the meantime, if you can install Python and Jinja ( |
Thank you. Am I corect in that the generator doesn't generate the Unit classes in first\units. it just creates the files stored in generated? |
Yes. The pregen scripts write the generated files to |
At this point I've added all of the linear and angular units for the feedforward constants (kv, ka). I am not married to the names of these units and will rename them when prompted. Also if it hasn't been said enough @SamCarlberg did a wonderful job on the rewrite. |
@narmstro2020 What do you see this providing that |
Really just ease of use from the student perspectice. I think the named units shouldn’t rely on the syntax of generics for the type whenever possible. Makes housing these in constants a bit easier to read. That being said I’m open to modifications to the name |
That's fair, though I'm personally ambivalent. A similar set of units for PID constants would also be useful in conjunction with these so users don't have a mix of generic |
Note that not all feedback controllers output voltage. The variety of unit possibilities is why PIDController is unitless. |
I thought about that which I why I left it out in this PR. I guess I could just make them for the common motor usages, but I will defer to the reviewers as to what would be best. |
I'll go ahead and add a PID set for motor control voltage/position and motor control voltage/velocity. |
So I haven't added units for the common PID. |
@narmstro2020 I'm ambivalent, and we can always add them later |
I will consider this PR done in regards to new features then. I'll make changes as requested of course. |
I'm the kind of person who will use the Units class for these constants and I wanted to test the waters.
Hence why this is a draft. Also not 100% sure how the pregen will go.
Also I've only added one for kV for linear velocity.
Feedback (Haha get it) is always appreciated.