View Single Post
  #4   Spotlight this post!  
Unread 25-01-2014, 16:28
wolfspell12 wolfspell12 is offline
Registered User
FRC #3244
 
Join Date: Jan 2014
Location: Minnesota
Posts: 16
wolfspell12 is an unknown quantity at this point
Re: Gyros in place of potentiometers?/Gyro intergration with jaguars

Quote:
Originally Posted by gpetilli View Post
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.
While this is becoming more of a programming question, I am a little concerned about the last thing you said. I did a little searching, but it wasn't much help. At least that verified that you could connect to the jaguars or the cRIO. I looked at the java docs, and some of the constructors use a DigitalSource object. I dont know if this object is an input on the cRIO or the jaguar. If its on the jaguar its no problem, if its on the cRIO then i need to know how to tell the robot that these are connected to the jaguars. Does someone know for certain if a digital source connects to the cRIO or jaguar? If it connects to the cRIO how do i tell the robot that it needs data from the jaguars?
Reply With Quote