From 19f48c94780761bcc8311c7ef0918ed2b9e06312 Mon Sep 17 00:00:00 2001 From: Rick Rongen Date: Mon, 18 May 2020 20:15:53 +0200 Subject: [PATCH] feat: fixed inverse angle --- control/walle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/control/walle.py b/control/walle.py index 63a139e..837a0f9 100644 --- a/control/walle.py +++ b/control/walle.py @@ -49,7 +49,7 @@ class WallE: velocity_l = 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 - sin_angle) * force velocity_l = sin_angle * force elif cos_angle > sin_angle: velocity_r = sin_angle * force