Skip to content

Commit

Permalink
Merge pull request #67 from ultrainstinct30/VariableThresh
Browse files Browse the repository at this point in the history
Made threshold in getPointBehindBall function variable
  • Loading branch information
thebhatman authored Jun 25, 2019
2 parents fbb88a3 + fa54e17 commit 6031170
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions utils/math_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 6031170

Please sign in to comment.