Motor Following clarification (both CTRE and REV)

When using follower modes in CTRE and REV if I use position control, velocity control, etc will the motors follow or will they only follow if I use direct voltage or current control. I ask because both vendor examples don’t show using their own velocity/position control modes.

This seems like the perfect thing to test empirically (without a mechanical link between the two motors to avoid damage)

Agreed, I just wanted to know if it was already the case. Like with CTRE if I use PositionVoltage requests. Does the following motor comply. Or am I limited to VoltageOut requests, etc.

I would be surprised if it didnt work that way. But definitely test to confirm.

Can confirm that it works with Rev. Have not tested CTRE on this.

1 Like

We used the CTRE follower with PID control (VelocityVoltage command) on our shooter with a mechanical link. I recommend running each motor independently first to make sure they go the right direction.

In previous editions, we had each motor with independent velocity PID control with the mechanical link, and it goes bad… Basically if the motors are a little off, one is trying to correct for the error, then the other one corrects for that error, and you cascade error… Follower is definitely the right way to go.

1 Like

I believe follower mode is implemented via communication between the motors, not originating from requests from the RIO.

What I mean is, if I tell B to follow A, A will broadcast its duty-cycle at some frequency, and B will listen to that value and set its own to the same value (with an optional polarity flip).

Regardless of how A’s output is determined (direct voltage, duty cycle, feedback control) B will follow A’s duty-cycle command.

2 Likes

To my knowledge, this is correct. I believe they do this as the one motor actually watches the CAN frames of the primary and reacts to them as if it was that ID. It makes follower mode almost “free” on the CAN bus.

1 Like