Two climber arms with two separate motors and PID

My team has a two armed robot for climbing. We were hoping to have one motor per arm and use a leader/follower in PID, but we’re having issues with them keeping pace with each other. When the arms extend they seem ok, but when they retract, the leader motor arm reaches to the low limit while the follower arm is about an inch from the limit.

We’re using TalonSRX on both motors and latest firmware. 775pro. They each have a Vex Robotics Planetary Encoder with the data cable attached. Each gearbox is 100:1 and the encoder is nearest the shaft.

Are there some special settings that are needed in the code, in the controller settings? I’m not even sure that having the encoder and cable in the follower motor is even doing anything.

Thank you

Would it be possible to upload a sample of your code / the file where you’re doing the control?
Off of the top of my head, it seems like you may want to set the follower with
follower.follow(leader, FollowerType.AuxOutput1); if you are not already. This should pull from the leader’s PID output instead of just following it with percent output.
I don’t think that CTRE’s leader follower functionality can run a separate PID controller on a follower though, if the arms on your bot can move independently of each other (i.e. they are not mechanically linked), then it seems like using a separate control loop for each arm would be advantageous.

This thread might be helpful.

1 Like

We tried keeping it with one pid loop and the suggested code change, but still found that it wasn’t staying in sync. The programming team did end up creating two pid loops which worked wonderfully. Thank you.

This is exactly what I was looking for. Thank you. Two pid loops is the way to go with independent mechanisms.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.