diff --git a/controller/python/localpid.py b/controller/python/localpid.py index b0bd33a665630c482c7c7d4c0158fcc7a1622dd9..7a793a2a37c6e7009ef73c10faf82fab28b6a828 100644 --- a/controller/python/localpid.py +++ b/controller/python/localpid.py @@ -5,15 +5,15 @@ from controller import Controller import time -k_p = 0.3 -k_i = 0.005 +k_p = 0.25 +k_i = 0.004 k_d = 0 min_speed = 0 precision = 10 -# distance and max_speed are in ticks +# distance and max_speed are in ticks, max_motor_speed def advance(c, distance, max_speed): # Configure motor speed c.set_max_percentage(100) @@ -93,7 +93,7 @@ def command(err, acc, der): c = Controller() assert c.who_am_i() == 0x57 try: - advance(c, 20000, 50) + advance(c, 20000, 40) # advance(c, -10000, 50) except KeyboardInterrupt: print("Stopping engine")