Skip to content

Commit

Permalink
MagicNumberz for tuning (commaai#105)
Browse files Browse the repository at this point in the history
Reduce EonToFront

Fix overpass speed being detected
  • Loading branch information
SippieCup authored and BogGyver committed Oct 11, 2019
1 parent 4aee0bd commit 4fc758c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion selfdrive/car/tesla/PCC_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ def __init__(self,carcontroller):

def max_v_by_speed_limit(self,pedal_set_speed_ms ,speed_limit_ms, CS):
# if more than 10 kph / 2.78 ms, consider we have speed limit
if (CS.maxdrivespeed > 0) and CS.useTeslaMapData and (CS.mapAwareSpeed or (CS.baseMapSpeedLimitMPS <2.7)):
# if the difference is more than 20 MPH, ignore the speed limit as it is probably wrong (an overpass' speed instead of the current road)
if ((CS.maxdrivespeed > 0) and CS.useTeslaMapData and (CS.mapAwareSpeed or (CS.baseMapSpeedLimitMPS <2.7)) and ((pedal_set_speed_ms-speed_limit_ms) < 46.3)):
#do we know the based speed limit?
sl1 = 0.
if CS.baseMapSpeedLimitMPS >= 2.7:
Expand Down
2 changes: 1 addition & 1 deletion selfdrive/car/tesla/carstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def __init__(self, CP):
self.radarEpasType = 0
self.fix1916 = False
self.forceFingerprintTesla = False
self.eonToFront = 0.9
self.eonToFront = 0.1
#read config file
read_config_file(self)
### END OF MAIN CONFIG OPTIONS ###
Expand Down
2 changes: 1 addition & 1 deletion selfdrive/car/tesla/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def get_params(candidate, fingerprint, vin="", is_panda_black=False):
ret.openpilotLongitudinalControl = True
ret.steerLimitAlert = False
ret.startAccel = 0.5
ret.steerRateCost = 1.0
ret.steerRateCost = .516673
ret.radarOffCan = not CarSettings().get_value("useTeslaRadar")

return ret
Expand Down

0 comments on commit 4fc758c

Please sign in to comment.