From fa54e179cc864f9d4d16492a24ec98c3e0c217b3 Mon Sep 17 00:00:00 2001 From: Parth Mall Date: Tue, 25 Jun 2019 23:09:56 +0530 Subject: [PATCH] Made threshold in getPointBehindBall function variable --- utils/math_functions.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/math_functions.py b/utils/math_functions.py index 8236ffc0..5b7d4b39 100644 --- a/utils/math_functions.py +++ b/utils/math_functions.py @@ -245,9 +245,9 @@ def stan_inverse(self,y,x): return atan2(y,x)+3.14159265 -def getPointBehindTheBall(point ,theta): - x = point.x -(3.5 * BOT_RADIUS) *(math.cos(theta)) - y = point.y -(3.5 * BOT_RADIUS) *(math.sin(theta)) +def getPointBehindTheBall(point ,theta, factor=3.5): + x = point.x +(factor * BOT_RADIUS) *(math.cos(theta)) + y = point.y +(factor * BOT_RADIUS) *(math.sin(theta)) return Vector2D(int(x), int(y)) def vicinity_points(point1, point2, thresh=10):