From b61f75a8fbf7558b0fe03f98f0d4c85cacb78669 Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Sun, 4 Aug 2024 09:10:43 -0400 Subject: [PATCH 1/3] remove from sync --- .git-crypt/.gitattributes | 4 ---- .../106E1EB7856273777A0C8BB4EF8EA444C1E7B69C.gpg | Bin 725 -> 0 bytes .../91D8EDBE6BD70DFB803D59292470ADBDD426DEB5.gpg | Bin 725 -> 0 bytes .../E08F802F45946A6A3E16AD1B1609CD53B15C2462.gpg | Bin 735 -> 0 bytes release/release_files.py | 2 -- selfdrive/car/interfaces.py | 2 -- system/manager/process_config.py | 1 - 7 files changed, 9 deletions(-) delete mode 100644 .git-crypt/.gitattributes delete mode 100644 .git-crypt/keys/default/0/106E1EB7856273777A0C8BB4EF8EA444C1E7B69C.gpg delete mode 100644 .git-crypt/keys/default/0/91D8EDBE6BD70DFB803D59292470ADBDD426DEB5.gpg delete mode 100644 .git-crypt/keys/default/0/E08F802F45946A6A3E16AD1B1609CD53B15C2462.gpg diff --git a/.git-crypt/.gitattributes b/.git-crypt/.gitattributes deleted file mode 100644 index 665b10e8f0..0000000000 --- a/.git-crypt/.gitattributes +++ /dev/null @@ -1,4 +0,0 @@ -# Do not edit this file. To specify the files to encrypt, create your own -# .gitattributes file in the directory where your files are. -* !filter !diff -*.gpg binary diff --git a/.git-crypt/keys/default/0/106E1EB7856273777A0C8BB4EF8EA444C1E7B69C.gpg b/.git-crypt/keys/default/0/106E1EB7856273777A0C8BB4EF8EA444C1E7B69C.gpg deleted file mode 100644 index 97b89be16eef468dea1688448132cd49bc1a9205..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 725 zcmV;`0xJE50t^Eiti!r3*)-+>5CEM;BTRKyWmz_3gO6PMXMbPN8+OdA6CadusYg9^ zWEg3Hz?fKrSv+uXx{Tssm0G=WQZdR4NKEO3c+2^|&X>&>$KG$#mLSy6=!V~-Blgi< z4rbWQe~-g;X9ORi=kxVsUp%TuJzT8$KfwL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M)P(Kq>$`lN{RFr{12*0F2 znlSADOAt%tK)Tu_aX3x5P=wumS{_Dv-_i20k{~-J6SYQl>~UN0JXnmf;WYQ+ zl=rpmLzyLjcWaVY!<;pOvWuLA(=M<#_tbnAXLS)ki|#8FaJ)whiG&coR=Z_ikWR>? zFBgrx0Tgi?(Q}^(EIoM>nkS(~sCSo~1hPsEAML=nFNbsqHIK9R^QNoeBBF7c`X>Pv z2tZj&5Q(v;8Tl^wn9uy`m|qfw_BRewH3nw`$fLi)1Zji~Pel2nzBJymh@fGl!s)#%;n5V(c*u;yCs?@dDe?5QF{V6*~;eqdI%ym|q}v^cIxfgJah zqPTravGaxq?yS&u?A~3E+J@@>Am<`ioGZhA`B?4FL%P5Ju*TZc+T%>mQZjHZ3PF!AeqNfQ7bGbH`6kQ_jEj zxk`Gih-)5$|KoWu-$MlpAwwb|lTjPXCnRW-KEjg+vFbb8bf`&zYCkC94P{ekg-Euy zRaURgwANGWf>8S~<}tx-0%z3@hQAg0*mp#WlH>^*hKrdC1X+)1(5^$P0q!#8j`fGP zk8f_lbc5xFGx{2PXsOrdN6YR9AJA=?S=57 RnAcT|%MwwGhU?B@M#$H9W Date: Sun, 4 Aug 2024 09:11:02 -0400 Subject: [PATCH 2/3] only for hkg --- selfdrive/controls/lib/longcontrol.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/controls/lib/longcontrol.py b/selfdrive/controls/lib/longcontrol.py index d0727be8bf..1ee8a7b013 100644 --- a/selfdrive/controls/lib/longcontrol.py +++ b/selfdrive/controls/lib/longcontrol.py @@ -75,7 +75,7 @@ class LongControl: if output_accel > self.CP.stopAccel: output_accel = min(output_accel, 0.0) output_accel -= self.CP.stoppingDecelRate * DT_CTRL - elif output_accel < self.CP.stopAccel: + elif output_accel < self.CP.stopAccel == 0.0: output_accel = min(output_accel, 0.0) output_accel += self.CP.stoppingDecelRate * DT_CTRL self.reset() From 251716a67dc7e57c96114aacaf792f3092e87128 Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Sun, 4 Aug 2024 11:02:06 -0400 Subject: [PATCH 3/3] less aggressive start, lower stop accel, send 0 accel at standstill --- selfdrive/car/hyundai/carcontroller.py | 6 +++--- selfdrive/car/hyundai/interface.py | 5 ++--- selfdrive/controls/lib/longcontrol.py | 3 --- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/selfdrive/car/hyundai/carcontroller.py b/selfdrive/car/hyundai/carcontroller.py index b5cd6dad8a..c4cf51f42a 100644 --- a/selfdrive/car/hyundai/carcontroller.py +++ b/selfdrive/car/hyundai/carcontroller.py @@ -293,7 +293,7 @@ class CarController(CarControllerBase): # TODO: unclear if this is needed jerk = 3.0 if actuators.longControlState == LongCtrlState.pid else 1.0 use_fca = self.CP.flags & HyundaiFlags.USE_FCA.value - self.make_accel(actuators) + self.make_accel(CS, actuators) can_sends.extend(hyundaican.create_acc_commands(self.packer, CC.enabled and CS.out.cruiseState.enabled, self.accel_raw, self.accel_val, self.jerk_l, self.jerk_u, int(self.frame / 2), hud_control, set_speed_in_units, stopping, CC.cruiseControl.override, use_fca, CS, escc, self.CP, self.lead_distance, self.cb_lower, self.cb_upper)) @@ -521,12 +521,12 @@ class CarController(CarControllerBase): self.cb_upper = clip(0.9 + accel * 0.2, 0, 1.2) self.cb_lower = clip(0.8 + accel * 0.2, 0, 1.2) - def make_accel(self, actuators): + def make_accel(self, CS, actuators): long_control = actuators.longControlState is_ice = not self.CP.flags & (HyundaiFlags.HYBRID | HyundaiFlags.EV) rate_up = 0.1 rate_down = 0.1 - if long_control == LongCtrlState.off: + if long_control == LongCtrlState.off or CS.out.standstill: self.accel_raw, self.accel_val = 0, 0 else: #self.accel_val = clip(self.accel_raw, self.accel_last - rate_down, self.accel_last + rate_up) diff --git a/selfdrive/car/hyundai/interface.py b/selfdrive/car/hyundai/interface.py index 1a50d98b12..20dace7228 100644 --- a/selfdrive/car/hyundai/interface.py +++ b/selfdrive/car/hyundai/interface.py @@ -104,9 +104,8 @@ class CarInterface(CarInterfaceBase): ret.stoppingControl = True ret.startingState = True ret.vEgoStarting = 0.1 - ret.startAccel = 1.8 - ret.stopAccel = 0.0 - ret.stoppingDecelRate = 10 + ret.startAccel = 1.6 + ret.stopAccel = -1.0 ret.longitudinalActuatorDelay = 0.5 if DBC[ret.carFingerprint]["radar"] is None: diff --git a/selfdrive/controls/lib/longcontrol.py b/selfdrive/controls/lib/longcontrol.py index 1ee8a7b013..e3cd4bb654 100644 --- a/selfdrive/controls/lib/longcontrol.py +++ b/selfdrive/controls/lib/longcontrol.py @@ -75,9 +75,6 @@ class LongControl: if output_accel > self.CP.stopAccel: output_accel = min(output_accel, 0.0) output_accel -= self.CP.stoppingDecelRate * DT_CTRL - elif output_accel < self.CP.stopAccel == 0.0: - output_accel = min(output_accel, 0.0) - output_accel += self.CP.stoppingDecelRate * DT_CTRL self.reset() elif self.long_control_state == LongCtrlState.starting: