Skip to content

Controllers can't set motor voltages #6

Open
@NoRePercussions

Description

@NoRePercussions

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions