Skip to content

Modify Turret code to use PID controller built into TalonFX #88

@CanineSatsuma6

Description

@CanineSatsuma6

Today, we use a PID controller running on the RoboRIO to control the direction the turret faces. This works well, but there's two main issues with this approach:

  1. There's tight coupling between the output gear on the shaft of the turret motor and the turret ring gear, but there's a little bit of slop between the turret ring gear and the gear connected to the potentiometer. The tight coupling between the motor and the turret itself can lead to more "tight" and responsive control that should jitter less due to less slop.
  2. The PID controller in the motor controller executes faster and closer to the motor itself, meaning that overall smoother, snappier motion is possible with a well-tuned PID on the motor controller compared to using the RoboRIO PID we do today.

We'll want to build in some safety provisions to ensure that if the turret motor browns out or resets that it updates its position with the potentiometer. Additionally, rather than just using a simple PID controller, we should investigate using the Motion Magic feature built into the TalonFX motor controller.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions