diff --git a/controller/python/localpid.py b/controller/python/localpid.py index 0ba22fe9e7db6b46251dd00ccca8ce72d2eb353d..79138b352db1c9c361513eba36d232a43224a9d2 100644 --- a/controller/python/localpid.py +++ b/controller/python/localpid.py @@ -50,7 +50,7 @@ def advance(c, distance, max_speed): ): stable_for += 1 if stable_for >= 10: - c.set_motor_speed(None, None) + c.set_raw_motor_speed(None, None) break else: stable_for = 0 @@ -67,7 +67,7 @@ def advance(c, distance, max_speed): prev_err_left, prev_err_right = err_left, err_right command_left = command(err_left, acc_err_left, der_err_left) command_right = command(err_right, acc_err_right, der_err_right) - c.set_motor_speed(command_left, command_right) + c.set_raw_motor_speed(command_left, command_right) print( f"target = {target}, pos = {(pos_left, pos_right)},", f"speed = {(command_left, command_right)}", @@ -94,4 +94,4 @@ try: # advance(c, -10000, 50) except KeyboardInterrupt: print("Stopping engine") - c.set_motor_speed(None, None) + c.set_raw_motor_speed(None, None)