Replaced sqrt(x**2+y**2) with hypot in PathTracking/model_predictive_speed_and_steer_control/model_predictive_speed_and_steer_control.py

This commit is contained in:
Guillaume Jacquenot
2019-12-07 22:19:05 +01:00
parent 4ef4658f82
commit 9f5b0a25cc

View File

@@ -348,7 +348,7 @@ def check_goal(state, goal, tind, nind):
# check goal
dx = state.x - goal[0]
dy = state.y - goal[1]
d = math.sqrt(dx ** 2 + dy ** 2)
d = math.hypot(dx, dy)
isgoal = (d <= GOAL_DIS)