We were asking some questions about CAN jaguars in
this topic, and some questions came up that we figured were more closely related to programming. I quote the statement that brought up my question:
Quote:
Regarding the Jaguars -
Assuming that you intend to do PID wheel speed control inside the Jaguar (which is a fine distributed processing architecture), the Jaguar must be connected to the cRIO via CAN (not PWM) and the encoder is connected directly to the Jaguar.
I strongly recommend doing a CD search for old threads on PID and Jaguar for more info. Velocity loops are tuned differently than position loops in that the loop must integrate the encoder error to get the control velocity. The recommend method of tuning is to start with P=0, I=small, D=0 and increase I until just before speed is unstable. Then increase P to further improve stability.
As mentioned in post 2, the gyro outputs angular velocity and I don't believe it will interface directly with the Jaguar. The standard WPI mecanum code I believe does handle the gyro for you on the cRIO, but I have never used that code. The WPI code may also assume that the encoders are hooked to the cRIO and not the Jaguars - you will need to verify that first.
|
So I am wondering if the API assumes that encoders are plugged into the cRIO , or the Jaguar. The object constructors for the encoders calls for a DigitialSource object, and the javadoc for that only says that it can be analog or digital. If someone could help explain, that would be very helpful. Some help learning how to code CAN jags in general would be helpful-The screensteps from FIRST are a little lacking from what I could find from a search on CAN jaguar a minute ago. (If you can skype then that might be good.)I hate to create a second topic for this but it seems to be a little beyond the knowledge of the people in the sensors section.