From a1a49bc68c09932b597f2c88ab990d0d8bb680b5 Mon Sep 17 00:00:00 2001 From: "J.Random" Date: Fri, 13 Aug 2021 14:22:37 +0300 Subject: [PATCH] Update RoverComputer.cs ThrottlePID needs a non-zero Ki to be able to keep the speed down slope. With Ki=0 it underthrottles, which, combined with game's torque curve implementation (the faster you go, the less torque budget you have) creates a positive feedback loop. --- src/RemoteTech/FlightComputer/RoverComputer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RemoteTech/FlightComputer/RoverComputer.cs b/src/RemoteTech/FlightComputer/RoverComputer.cs index 50775628d..2efd390e9 100644 --- a/src/RemoteTech/FlightComputer/RoverComputer.cs +++ b/src/RemoteTech/FlightComputer/RoverComputer.cs @@ -81,7 +81,7 @@ private float RoverSpeed public RoverComputer(FlightComputer fc, double kp, double ki, double kd) { - throttlePID = new PIDLoop(1, 0, 0); + throttlePID = new PIDLoop(1, 0.5, 0); steerPID = new PIDLoop(1, 0, 0); pidController = fc.PIDController; //don't think of putting second copy of PID here