What our electrical team did was they wired optical encoders onto the axel and into the jag. Inside of the DriveTrain subsystem, I called a method on each of the jags to inform them that they have encoders. That portion of code looked like this:
Quote:
|
rightFront.setPercentMode(CANJaguar.kQuadEncoder, encoderCounts);
|
Below that, I enabled encoder control on each of the jags:
Quote:
|
rightFront.enableControl();
|
I was then able to use the encoders in other programs.
I wouldn't know without looking at the javadocs, but if I were to make an educated guess I would say that setting up encoders would be similar to this but with talons instead of jaguars.