View Full Version : Troubles with Talon SRX in Follower mode
jfitz0807
28-01-2015, 19:31
I have 4 Talon SRXs controlling 4 CIMs on the KoP chassis drive train. CAN ID 1 is front left, 2 is back left, 3 is front right and 4 is back right. I set both 2 and 4 to follow 1 and 3, respectively. In this configuration, it looks like 2 and 4 have stopped driving. The red and green lights no longer light up when driving.
Also, when running the Talon self test from the roboRIO configuration window with the robot enabled, Talons 2 and 4 do not report any current. Similarly, GetCurrent returns values of zero.
Is this expected behavior for a Talon in follower mode? If not, any suggestions?
Did you update the firmware? See Talon SRX Software reference manual
So what are the the LEDs doing? Solid orange? Did you follow the examples in the software ref manual?
jfitz0807
28-01-2015, 19:45
I followed the examples. The lights are not doing anything.
By not doing anything do you mean both LEDs are off as though the Talon is not powered? If so double check your wiring with a voltmeter. Also check if the breaker is in place on the PDP. If they both look ok contact support@crosstheroadelectronics.com.
jfitz0807
29-01-2015, 18:43
The lights are actually solid orange. We put a voltmeter on one of the follower Talons and read 26mV; ie, nothing.
So that means the Talons are being command to zero throttle. Either the mode is not correct or it's following the wrong Talon or the Master Talon isn't present on the bus.
If you use the self-test you can check the mode of the followers to confirm they are in slave follower mode. (section 2.4 in Talon SRX software reference manual).
Double check the Set() calls to your slave Talons. Remember the Set() is used to specify the master Talon ID. (section 9 in Talon SRX software reference manual).
jfitz0807
01-02-2015, 19:02
The self test shows that the talons are in follower mode. When I run the self test with the motors running, the lead talons show a non-zero current value, but the following talons show 0 current.
Here is the code we are using to set the talon:
driveSubsystemMotorControllerBackLeft->SetControlMode(CANSpeedController::kFollower);
driveSubsystemMotorControllerBackLeft->Set(3);
driveSubsystemMotorControllerBackLeft is Talon 4.
If I understand correctly, this should set Talon 4 to follow Talon 3. We have similar code for Talon 2 to follow Talon 1.
Am I doing something wrong?
Yeah that looks right to me. The only thing I can think of is if the firmware is old. Did you update to 1.1 or 1.4?
RufflesRidge
01-02-2015, 20:26
How are you commanding the "lead" Talons?
jfitz0807
02-02-2015, 09:26
Talons were updated to 1.1.
The lead Talons are being commanded via ArcadeDrive. They are in ControlMode kPercentVbus=0. When Talons 2 and 4 are set to this mode, they behave correctly (lights go red or green depending on direction, current reads non-zero in Self Test while driving). It's only when they are set to ControlMode kFollower=5 that the lights stay orange and no current is read.
Thanks for all the suggestions.
My next plan is to move the Talon breakouts from Talons 1 and 3 to Talons 2 and 4, respectively and then make them the lead Talons and set 1 and 3 to followers just to see if anything is different.
I'm running out of ideas and we really need to get this to work.
RufflesRidge
02-02-2015, 09:33
Are you passing just the two lead motors to the Arcade drive or all 4?
Can you post the source? Or send it to support@crosstheroadelectronics.com
jfitz0807
02-02-2015, 12:25
Our RobotDrive is using the 4 motor constructor. Should we just change it to the 2 motor constructor?
RufflesRidge
02-02-2015, 12:48
Our RobotDrive is using the 4 motor constructor. Should we just change it to the 2 motor constructor?
Yes, the RobotDrive object is calling Set on your follower Talons with a value from -1 to 1 which is causing your issue.
Alan Anderson
02-02-2015, 14:01
Unless you expect to be running the first two Talons in a closed-loop mode, you'll probably be better off just leaving things as a 4 Motor drive and removing the Follow setup completely.
jfitz0807
02-02-2015, 22:43
I'll change it to a two motor drive. We're using the closed loop for our autonomous.
Thanks for all the help.
jmullins16
08-03-2015, 00:13
...additional Talon follower (kFollower) mode info...
We had a problem where Talon follower mode was initialized in our Chassis subsystem constructor, but those talons would not follow when first powering on the robot.
If we just restarted the robot code using the driver station, follower mode worked correctly.
We discovered that if we instantiated RobotDrive, did a single call to set the drive motors to zero, and then set up follower mode in the constructor, it all worked correctly.
As a failsafe we will be re-initializing the drive system followers in TeleopInit and AutonomousInit.
This sounds exactly like what was fixed in the 2-24-2015 update in wpilib (C++). Are you using C++?
This is explained in a team update....
http://contentviewer.adobe.com/s/FIRST/29d775cf-7df1-5bea-97a2-3309a6deda88/FRCTeamUpdates/16TeamUpdate2015-02-24.html#page_0
And re-explained in section 21.18 in the Talon SRX software ref manual.
http://crosstheroadelectronics.com/control_system.html
Your workaround is also documented as well.
jmullins16
09-03-2015, 00:51
We are using C++.
The update was definitely installed prior to our testing/fix yesterday. It did not appear to address this issue in any way.
And I can see how the C++ update description is intended to apply to CAN enabling, but we were debugging the fact that the only Talons affected were in follower mode, we didn't quite read the description that way. All other CAN Talons were operating normally.
Regardless, an immediate Set() is the right thing to do, and we're on track now. Just hoping to help others who might be having problems with follower mode.
So you updated your eclipse plugins and rebuilt your application? Redeployed, rebooted and still found that your slave Talons were not driving? Were they blinking orange or solid orange?
jmullins16
10-03-2015, 00:16
Yes, we had rebuilt our application (clean), redeployed, rebooted (also tried powering off completely), and the slave Talons were not following at first power on. Rebooting the cRIO did not correct the problem. Restarting the code *did* correct the problem.
Both sets of following Talons were flashing orange similar to disabled state.
If we get time to try this again without the workaround this weekend, would it be useful to have the results?
can you confirm what lib version shows up for wpilib C++ in the driverstation?
Diagnostic tab..
http://wpilib.screenstepslive.com/s/4485/m/24192/l/144976-frc-driver-station-software
our lib version for c++ is 1.2.0
the plugin version for c++ that we have is: 0.1.0.20152241928
That sounds right. If you can, send your source to support@crosstheroadelectronics.com with your workaround commented out.
Don't worry about it being "not pretty", just leave it as is.
At least that way we can get the root-cause nailed down and better help other teams.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.