We were testing code for our drivetrain yesterday and was testing current limiting that is similar to what we had last year. We are able to drive perfectly fine without current limiting. All motors are going in the right directions when they are supposed to and nothing is fighting against each other. However, when we enable current limiting, the robot will go crazy after a second or two of driving, even when we release the controls. It’s fairly unpredictable how it reacts and oftentimes, talons on the same side of the drivetrain start fighting against each other. The only difference on our code is whether we enable current limiting or not. All Talon SRX’s are updated to the latest firmware, roborio is updated, and the power distribution board is updated and on id 0. We have also updated our libraries and code for the Phoenix Framework.
Our related current limiting code is configured like this for all 6 of our drivetrain talons:
While I’m not entirely sure of your error, I think having current limiting on all the talons on one side of the robot enabled might be an issue. I could imaging the current limit fighting each other if it’s enabled on several motors who are set to follow each other. Unless you’re doing some funky stuff with weird gear ratios or bad motors, all the motors should always be the same current anyway, so try just limiting the “master” talon on each gearbox.
We have tried this method as well a couple times with similar results. We figured that if the drivetrain is acting as crazy as it is, that there must be something else that is wrong. We had current limiting enabled for the masters and slaves last year with no issue as well.