From cccea8ef37f64d9a4e42d2319b952c695fcacaf2 Mon Sep 17 00:00:00 2001 From: TG <tarik.graba@telecom-paris.fr> Date: Fri, 6 Sep 2024 16:46:48 +0200 Subject: [PATCH] Local PID example: rename raw speed methods --- controller/python/localpid.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/controller/python/localpid.py b/controller/python/localpid.py index 0ba22fe..79138b3 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) -- GitLab