mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
Re-tuned PID for PacGoat.
Change-Id: I0355db7dcfa2c9147845cdcc37322208e5271d98
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user