|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: CAN follower mode
Can you post more code please?
|
|
#2
|
|||
|
|||
|
Re: CAN follower mode
This is all the code to make our robot move forward the specified feet. leftMot is on id 4, rightMot is on id 3 and diameter is just a constant.
void driveFeet(double feet=10,double speed=.5){ leftMot->SetPosition(0); rightMot->SetPosition(0); rightMot->SetControlMode(rightMot->kFollower); rightMot->Set(4); double distance=abs(feet/(3.1415*diameter)*1000.0); while(abs(leftMot->GetEncPosition())<distance){ leftMot->Set((feet>0?speed:-speed)*(1-(abs(leftMot->GetEncPosition())/distance))); } leftMot->Set(0); } |
|
#3
|
||||
|
||||
|
Re: CAN follower mode
Be sure to update your Talon SRX Firmware to latest.
|
|
#4
|
|||
|
|||
|
Re: CAN follower mode
We are having a similar problem.. can't get slave/follower talon to work follow masters. Individually the talons all work if we make them masters. All fw is up to date. Don't see any faults in web ui. We tried steps in sw manual section "16.31.3. Confirm Slave/Follower Talons are driving ". When the master is output signal, the follower is doing nothing. We don't see leds change from solid orange. We use smartdashboard to change the follower to be in percentvbus mode and talon works fine. When talon is in follower mode, the webui self-test shows mode as "mode 5 follower". All this used to work and we aren't sure what may have broken it. Any ideas what to check next?
Thanks. -Maciej |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|