Skip to content
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

Controllers can't set motor voltages #6

Open
NoRePercussions opened this issue Feb 8, 2023 · 0 comments
Open

Controllers can't set motor voltages #6

NoRePercussions opened this issue Feb 8, 2023 · 0 comments

Comments

@NoRePercussions
Copy link

Is your feature request related to a problem? Please describe.
With some systems, such as high-mass high-speed flywheels, the built-in motor PID controllers can have significant oscillation. Allowing for controllers to directly set motor velocities gives an option for more direct control, while still being safe.

Describe the solution you'd like
An inner class to AbstractMotor which implements ControllerOutput which directly sets voltage.

Pros:

  • Similar to AbstractMotor::getEncoder for getting controller inputs
  • Can prevent duplication of

Describe alternatives you've considered

  1. A subtype of Motor – this is the implementation I use in my own project.

    Pros:

    • The motor can be passed into Controller builders rather than manual instantiation

    Problems:

    • A duplicate wrapper would be necessary for MotorGroups
    • It isn't technically a subtype of Motor
  2. An external wrapper class

    Pros:

    • Straightforward

    Cons:

    • Multiple such wrappers may be instantiated and compete

Versions
OkapiLib 5 / PurdueSigBots maintenance fork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant