|
Re: Drivetrain PID tuning
Quote:
Originally Posted by ollien
How do you accomplish this? Do you just set your setpoint proportional to the position of the stick?
|
Code:
Robot.drivetrain.arcadeDrive(DriveForwardSpeed, (Robot.drivetrain.getGyroAngle().getAngle()));
You might want/need to multiply the gyro angle by a Kp or -Kp. We actually ended up with the following:
Code:
Robot.drivetrain.arcadeDrive(-DriveForwardSpeed, (-(Robot.drivetrain.getGyroAngle().getAngle()) * Kp+.1));
__________________
Team 451 The Cat Attack, Student Alumni (2005)
Team 1646 Precision Guessworks, Mentor (2006-2008)
Team 2936 Gatorzillas, Mentor (2011-2014)
Team 5414 Pearadox, Mentor (2015-Present)
|