pid: eyeballed for a fully charged battery

Made a video showing the result. Apparently the center of mass is not exactly at the center of the
robot and the battery needs to stick out a bit at the front to rebalance it.

Also my desk is a bit tilted so the pitch is heavily affected by the yaw, the video shows it
clearly. Next step: a inner control loop for the yaw.
main
EmaMaker 2024-01-05 14:39:03 +01:00
parent f2e85c4629
commit 23e63c7625
1 changed files with 4 additions and 3 deletions

View File

@ -19,9 +19,9 @@ Kd = KpTd/Tc
*/
constexpr double KP = 6;
constexpr double KI = 0.2;
constexpr double KD = 0.1;
constexpr double KP = 6.2;
constexpr double KI = 0.25;
constexpr double KD = 0.15;
//double setpoint = -0.015;
double setpoint = 0.0;
@ -51,6 +51,7 @@ void setup(void) {
// myController.setWindUpLimits(-0.2 , 0.02);
myController.setSampleTime(1);
myController.start();
digitalWrite(LED_BUILTIN, LOW);