From 8f78b673b2112cc82b1c4bb5628188a025ac8b03 Mon Sep 17 00:00:00 2001 From: Rick Rongen Date: Mon, 18 May 2020 20:46:06 +0200 Subject: [PATCH] feat: some more improvements --- control/walle.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/control/walle.py b/control/walle.py index 837a0f9..6dc5bc2 100644 --- a/control/walle.py +++ b/control/walle.py @@ -46,12 +46,12 @@ class WallE: velocity_l = sin_angle * force elif cos_angle < sin_angle: velocity_r = sin_angle * force - velocity_l = cos_angle * force + velocity_l = (1 - cos_angle) * force elif cos_angle < 0 and sin_angle > 0: if abs(cos_angle) < sin_angle: - velocity_r = (1 - sin_angle) * force + velocity_r = (1 - cos_angle) * force velocity_l = sin_angle * force - elif cos_angle > sin_angle: + elif abs(cos_angle) > sin_angle: velocity_r = sin_angle * force velocity_l = cos_angle * force else: