graham.robots
06-01-2014, 12:15
Hello,
Our team just recently got a working CANJaguar setup going. We are now trying to tune the PID loop to work with an encoder and speed control for the jaguar. We aren't really sure how to tune the PID loop to get a stable loop going.
Here is our initialization code:
try
{
jag1 = new CANJaguar(1, CANJaguar.ControlMode.kSpeed);
jag1.setPID(0,4,0); //What goes here?
jag1.configEncoderCodePerRev(250);
jag1.setSpeedReference(CANJaguar.SpeedReference.kE ncoder);
jag1.enableControl();
}catch(Exception e){e.printStackTrace();}
Later on, we actually run the jag:
jag1.setX(60);
When we print the speed using the getSpeed() method, we get values all over the place. How can we tune it to stabilize at the set point?
Thanks,
Team 4024
Our team just recently got a working CANJaguar setup going. We are now trying to tune the PID loop to work with an encoder and speed control for the jaguar. We aren't really sure how to tune the PID loop to get a stable loop going.
Here is our initialization code:
try
{
jag1 = new CANJaguar(1, CANJaguar.ControlMode.kSpeed);
jag1.setPID(0,4,0); //What goes here?
jag1.configEncoderCodePerRev(250);
jag1.setSpeedReference(CANJaguar.SpeedReference.kE ncoder);
jag1.enableControl();
}catch(Exception e){e.printStackTrace();}
Later on, we actually run the jag:
jag1.setX(60);
When we print the speed using the getSpeed() method, we get values all over the place. How can we tune it to stabilize at the set point?
Thanks,
Team 4024