Re-tuned PID for PacGoat.

Change-Id: I0355db7dcfa2c9147845cdcc37322208e5271d98
This commit is contained in:
Alex Henning
2014-06-26 19:35:25 -07:00
parent 1ba20bc1eb
commit 56cf731680
9 changed files with 21 additions and 21 deletions

View File

@@ -8,13 +8,13 @@
#include "Commands/Shoot.h"
DriveAndShootAutonomous::DriveAndShootAutonomous() {
AddSequential(new CloseClaw());
AddSequential(new WaitForPressure(), 2);
#ifdef REAL
// NOTE: Simulation doesn't currently have the concept of hot.
AddSequential(new CheckForHotGoal(2));
#endif
AddSequential(new CloseClaw());
AddSequential(new SetPivotSetpoint(45));
AddSequential(new DriveForward(8, 0.4));
AddSequential(new DriveForward(8, 0.3));
AddSequential(new Shoot());
}

View File

@@ -29,7 +29,7 @@ DriveTrain::DriveTrain() :
// Configure encoders
rightEncoder = new Encoder(1, 2, true, Encoder::k4X);
leftEncoder = new Encoder(5, 6, false, Encoder::k4X); // TODO: Correct encoder module.
leftEncoder = new Encoder(3, 4, false, Encoder::k4X);
rightEncoder->SetPIDSourceParameter(PIDSource::kDistance);
leftEncoder->SetPIDSourceParameter(PIDSource::kDistance);

View File

@@ -7,8 +7,8 @@ Pivot::Pivot() :
GetPIDController()->SetContinuous(false);
#ifdef SIMULATION
// PID is different in simulation.
GetPIDController()->SetPID(0.5, 0.00001, 4.5);
SetAbsoluteTolerance(2.5);
GetPIDController()->SetPID(0.5, 0.001, 2);
SetAbsoluteTolerance(5);
#endif
// Motor to move the pivot.