The first few posts of this thread are useful.
http://www.chiefdelphi.com/forums/sh...ad.php?t=98300
I've spent alot of time looking at CD threads about using PIDController and picked up some useful tips about pid and java. Try searching and reading what others have posted.
We tried creating two PID controllers in our drive train subsystem. One uses two encoders(averaged) on the drive train and the other uses a gryo. In the PID constructors we specified a different PIDOutput class/object that did not write data to jaguars unless we set vars to allow it. See
http://code.google.com/p/frc2876/sou...riveTrain.java
And this is the command we use to combine the distance/turn PIDs to make robot drive in a straight line:
http://code.google.com/p/frc2876/sou...dStraight.java
We did not get a chance to finish testing this before having to bag the robot so I can't say if it works. But based on the CD thread I found above plenty of teams are doing something like this.