Skip to content

Commit

Permalink
Merge pull request commaai#21 from roxasthenobody98/retropilot-transit
Browse files Browse the repository at this point in the history
Merge Retropilot-Transit Initial commits.
  • Loading branch information
roxasthenobody98 authored May 29, 2021
2 parents f4ea393 + 547b215 commit 69cc34b
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 6 deletions.
2 changes: 1 addition & 1 deletion common/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def get_token(self):


def api_get(endpoint, method='GET', timeout=None, access_token=None, **params):
backend = "https://api.commadotai.com/"
backend = "https://api.retropilot.org/"

headers = {}
if access_token is not None:
Expand Down
4 changes: 2 additions & 2 deletions common/op_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ def __init__(self):
'alca_min_speed': Param(20, VT.number, 'Speed limit to start ALC in MPH'),
'alca_nudge_required': Param(False, bool, "Require nudge to start ALC"),
'apaAcknowledge': Param(False, bool, "acknowledge the safety constraints and limitations"),
'athenaAllowed': Param(False, bool, "Enable Comma Athena. Not recommended. Comma get access to everything on your device."),
'athenaAllowed': Param(True, bool, "Enable Comma Athena. Not recommended. Comma get access to everything on your device."),
'autoUpdate': Param(True, bool, 'Whether to auto-update'),
'camera_offset': Param(0.06, VT.number, 'Your camera offset to use in lane_planner.py', live=True),
'cloak': Param(False, bool, "make comma believe you are on their fork"),
'supercloak': Param(False, bool, "give comma a fake dongle ID, sparing your old one. Still carries a risk of your device being banned."),
'supercloak_reregister': Param(False, bool, "dump your supercloak Dongle ID if it gets banned"),
'uploadsAllowed': Param(False, bool, "Allow uploads to Comma. Not recommended. If you are not cloaked and supercloaked, you risk your device being banned."),
'uploadsAllowed': Param(True, bool, "Allow uploads to Comma. Not recommended. If you are not cloaked and supercloaked, you risk your device being banned."),
#'use_car_caching': Param(True, bool, 'Whether to use fingerprint caching'),
}

Expand Down
18 changes: 18 additions & 0 deletions selfdrive/car/ford/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,24 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=[]): # pyl
ret.steerRateCost = 1.0
ret.centerToFront = ret.wheelbase * 0.44
tire_stiffness_factor = 0.5328
elif candidate == CAR.TRANSIT:
ret.wheelbase = 3.04
ret.steerRatio = 14.8
ret.mass = 3900. * CV.LB_TO_KG + STD_CARGO_KG
ret.lateralTuning.init('indi')
ret.lateralTuning.indi.innerLoopGainBP = [0.]
ret.lateralTuning.indi.innerLoopGainV = [4.0]
ret.lateralTuning.indi.outerLoopGainBP = [0.]
ret.lateralTuning.indi.outerLoopGainV = [3.5]
ret.lateralTuning.indi.timeConstantBP = [0.]
ret.lateralTuning.indi.timeConstantV = [2.0]
ret.lateralTuning.indi.actuatorEffectivenessBP = [0.]
ret.lateralTuning.indi.actuatorEffectivenessV = [1.0]
ret.steerActuatorDelay = 0.3
ret.steerLimitTimer = 0.8
ret.steerRateCost = 1.0
ret.centerToFront = ret.wheelbase * 0.44
tire_stiffness_factor = 0.5328
elif candidate in [CAR.FUSION, CAR.FUSIONSG, CAR.MONDEO]:
ret.wheelbase = 2.85
ret.steerRatio = 14.8
Expand Down
20 changes: 17 additions & 3 deletions selfdrive/car/ford/values.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class CarControllerParams:
ANGLE_MAX_BP = [0., 11., 36.]
ANGLE_MAX_V = [410., 25., 15.]
ANGLE_MAX_V = [410., 35., 15.]
ANGLE_DELTA_BP = [0., 5., 15.]
ANGLE_DELTA_V = [5., .8, .15] #windup
ANGLE_DELTA_VU = [5., 3.5, 0.4] #unwind
Expand Down Expand Up @@ -129,6 +129,20 @@ class CAR:
(Ecu.srs, 0x737, None): [
b'GR3T-14C028-AA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
],
},
CAR.TRANSIT: {
(Ecu.eps, 0x730, None): [
b'HV6T-14C217-AC\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
],
(Ecu.srs, 0x737, None): [
b'DT1T-14C028-BA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
],
(Ecu.esp, 0x760, None): [
b'DV61-14C036-AG\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
],
(Ecu.engine, 0x7e0, None): [
b'DV6A-14C204-CG\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
],
}
}
#FEATURES = {
Expand All @@ -149,7 +163,7 @@ class CAR:
#CAR.TAURUS:
#CAR.FLEX:
#CAR.FOCUS:
#CAR.TRANSIT:
CAR.TRANSIT: 1.,
#CAR.AVIATOR:
#CAR.CONTINENTAL:
#CAR.CORSAIR:
Expand Down Expand Up @@ -177,7 +191,7 @@ class CAR:
#CAR.TAURUS: dbc_dict('placeholder', 'placeholder'),
#CAR.FLEX: dbc_dict('placeholder', 'placeholder'),
#CAR.FOCUS: dbc_dict('placeholder', 'placeholder'),
#CAR.TRANSIT: dbc_dict('placeholder', 'placeholder'),
CAR.TRANSIT: dbc_dict('ford_lincoln_base_pt', None),
#Lincoln
#CAR.AVIATOR: dbc_dict('placeholder', 'placeholder'),
#CAR.CONTINENTAL: dbc_dict('placeholder', 'placeholder'),
Expand Down

0 comments on commit 69cc34b

Please sign in to comment.