ArbitraryFeedForward with AuxPID1 not sending FF term to slave TalonSRX

I’m playing with a very simple differential drive setup which I thought to configure with the fancy new ArbitraryFeedForward and AuxPID features.

The code is quite simple and merely attempts to steer the drive based off of the encoder, while accepting a throttle as a feedforward value.

It seems though, that only the master talon responds to the arbitrary feedforward. The slave reacts only to the PID.

So the slave is getting commands from the master, but the master doesn’t seem to be adding the feedforward term to the AuxPID1 output.

This especially boggles me as a nearly identical setup was working perfectly several months ago, and even reverting to the 3.8 firmware seems to have no effect.

Any ideas of what went wrong here?

1 Like

You set the follower to be an aux1 follower. That means follower = masterPID0 - masterPID1. But PID1(aux) is not running, and therefore is zero. Instead you appear to be running PIDF0 + arbFF.

I think you intended that the follower match the master exactly, so change your call to slave.follow(master) or slave.follow(master, PercentOutput) - they do the same thing.

Make sense?

Aux1 follower is great for differential systems where you have a right-master and a left-slave, where
master = PID0 + PID1, and
slave = PID0-PID1.

Wow! From the source, and so quickly!

Looking at the diagram in the software manual, I was under the impression that it would be possible to have

PIDF0 + arbFF on the master and PIDF0 - arbFF on AUX1

Would I need to confugure PIDF1 to a simple feedforward of 1 to get that code to trigger the behavior I’m looking for?

Thanks again for the quick reply.

What you can do is use PIDF1-aux to produce essentially a feed forward term. Set the gains for PIDF1 so its kF only. Then whatever target you specify for aux1 will just get multiplied by KF (essentially a feed forward),

This works on my setup…

Although I’m not sure what physical mechanism this would be useful for.
I guess doing a single-axis servo, and then applying an open-loop differential could be useful depending on where the sensor is.

Just got into the shop a few hours ago and tried this. Works like a charm! Thanks for coming to my rescue.

As for the physical mechanism, this is being used to steer with a closed loop and control throttle with an open loop. The quadrature input simulates a gyro that I don’t have yet.