Skip to content

Commit

Permalink
Merge pull request commaai#160 from arne182/release2
Browse files Browse the repository at this point in the history
update
  • Loading branch information
sshane authored Jun 24, 2019
2 parents 20549cd + 47c189b commit 5a974ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions selfdrive/mapd/mapd_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def max_speed_ahead(self, current_speed_limit, lat, lon, heading, lookahead):
way_pts = way.points_in_car_frame(lat, lon, heading)

# Check current lookahead distance
max_dist = np.linalg.norm(way_pts[-1, :])
max_dist = min(np.linalg.norm(way_pts[1, :]),np.linalg.norm(way_pts[-1, :]))

if max_dist > 2 * lookahead:
#print "max_dist break"
Expand All @@ -242,7 +242,7 @@ def max_speed_ahead(self, current_speed_limit, lat, lon, heading, lookahead):
#print spd
if spd < current_speed_limit:
speed_ahead = spd
min_dist = np.linalg.norm(way_pts[1, :])
min_dist = min(np.linalg.norm(way_pts[1, :]),np.linalg.norm(way_pts[-1, :]))
speed_ahead_dist = min_dist
#print "slower speed found"

Expand Down

0 comments on commit 5a974ff

Please sign in to comment.