So this year, for our swerve steering sensors, we are switching from the CANCoder to the Thrifty Absolute Encoder. This should simplify our wiring and reduce CAN bus traffic, so in general it’s probably the right decision for us.
But one other thing we were considering doing was moving our steering control loop from the motor controller to the roboRIO. The issue is, if we want to use a
ProfiledPIDController on board the RIO for steering, we would want to characterize the steering as a simple motor so that we can run velocity control on steering with a feedforward. But our new encoder can’t read velocity, only position – so we cannot characterize based on this sensor.
As I see it, we have three options:
- Stick to using the motor controller’s PID loop for steering, and use Motion Magic.
- Stick to using the motor controller’s PID loop for steering, and use pure position control (this apparently works decently for some teams and is easier to tune?)
- Use pure position control PID on board the RIO. I’m not sure why we would do this over option 2 – if we’re not running the control loop on velocity (and therefore not using a feedforward) I think there’s little advantage to running the PID loops where we would have a slower update rate.
- Characterize the motors using the Falcons’ built in encoders, then apply a conversion factor to the generated constants, then use a
ProfiledPIDControllerand feedforward control with those constants on board the RIO. This seems like it would be an okay option, but I’m not sure if its worth the trouble over using the Talon’s built in control loops.
What would be the best option for precise steering control?