Skip to content

Commit

Permalink
Fix get_relative_velocity Call
Browse files Browse the repository at this point in the history
  • Loading branch information
arne182 authored Mar 9, 2019
1 parent 14dd76a commit 27c5baf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions selfdrive/controls/lib/planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,10 +429,10 @@ def update(self, CS, CP, VM, PP, live20, live100, md, live_map_data):
self.lead_2 = live20.live20.leadTwo

try:
LongitudinalMpc.get_relative_velocity(self.lead_1.vRel)
LongitudinalMpc().get_relative_velocity(self.lead_1.vRel)
except: #if no lead car
try:
LongitudinalMpc.get_relative_velocity(0.0)
LongitudinalMpc().get_relative_velocity(0.0)
except TypeError:
None

Expand Down

0 comments on commit 27c5baf

Please sign in to comment.