From 05bb3cdd7168cbb4fff24662713edd0d07cf517c Mon Sep 17 00:00:00 2001 From: James Kuszmaul Date: Wed, 5 Nov 2014 18:47:26 -0500 Subject: [PATCH] Upped the limits for the output on some PID tests. We were having issues with intermittent PID tests because one of the motors on the test stand was sticky and needed a bit of a push to start. Change-Id: Ic75cd38de867a74be3e4e445bd0d02323dfc4df8 --- .../wpilibC++IntegrationTests/src/MotorEncoderTest.cpp | 6 +++--- .../src/main/java/edu/wpi/first/wpilibj/PIDTest.java | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/wpilibc/wpilibC++IntegrationTests/src/MotorEncoderTest.cpp b/wpilibc/wpilibC++IntegrationTests/src/MotorEncoderTest.cpp index dfd078c155..4aac813eb8 100644 --- a/wpilibc/wpilibC++IntegrationTests/src/MotorEncoderTest.cpp +++ b/wpilibc/wpilibC++IntegrationTests/src/MotorEncoderTest.cpp @@ -124,9 +124,9 @@ TEST_P(MotorEncoderTest, ClampSpeed) { TEST_P(MotorEncoderTest, PIDController) { Reset(); - PIDController pid(0.003f, 0.001f, 0.0f, m_encoder, m_speedController); + PIDController pid(0.001f, 0.0005f, 0.0f, m_encoder, m_speedController); pid.SetAbsoluteTolerance(20.0f); - pid.SetOutputRange(-0.2f, 0.2f); + pid.SetOutputRange(-0.3f, 0.3f); pid.SetSetpoint(2500); /* 10 seconds should be plenty time to get to the setpoint */ @@ -136,7 +136,7 @@ TEST_P(MotorEncoderTest, PIDController) { RecordProperty("PIDError", pid.GetError()); - EXPECT_TRUE(pid.OnTarget()) << "PID loop did not converge within 5 seconds."; + EXPECT_TRUE(pid.OnTarget()) << "PID loop did not converge within 10 seconds."; } /** diff --git a/wpilibj/wpilibJavaIntegrationTests/src/main/java/edu/wpi/first/wpilibj/PIDTest.java b/wpilibj/wpilibJavaIntegrationTests/src/main/java/edu/wpi/first/wpilibj/PIDTest.java index 8e379bb129..6e3345210c 100644 --- a/wpilibj/wpilibJavaIntegrationTests/src/main/java/edu/wpi/first/wpilibj/PIDTest.java +++ b/wpilibj/wpilibJavaIntegrationTests/src/main/java/edu/wpi/first/wpilibj/PIDTest.java @@ -44,8 +44,8 @@ public class PIDTest extends AbstractComsSetup { private static final Logger logger = Logger.getLogger(PIDTest.class.getName()); private NetworkTable table; - private static final double absoluteTollerance = 30; - private static final double outputRange = 0.2; + private static final double absoluteTollerance = 20; + private static final double outputRange = 0.3; private PIDController controller = null; private static MotorEncoderFixture me = null; @@ -72,8 +72,8 @@ public class PIDTest extends AbstractComsSetup { public static Collection generateData(){ //logger.fine("Loading the MotorList"); Collection data = new ArrayList(); - double kp = 0.003; - double ki = 0.0015; + double kp = 0.001; + double ki = 0.0005; double kd = 0.0; for(int i = 0; i < 1; i++){ data.addAll(Arrays.asList(new Object[][]{