diff --git a/opendbc_repo b/opendbc_repo index dfa6807ebf..b59f8bdcca 160000 --- a/opendbc_repo +++ b/opendbc_repo @@ -1 +1 @@ -Subproject commit dfa6807ebf9f0edb593189a703b857c834a88a75 +Subproject commit b59f8bdcca8d375b4a5a652d2f2d2ec9cd3503d3 diff --git a/selfdrive/car/tests/test_models.py b/selfdrive/car/tests/test_models.py index 8996ad6460..94f5b33231 100644 --- a/selfdrive/car/tests/test_models.py +++ b/selfdrive/car/tests/test_models.py @@ -183,7 +183,7 @@ class TestCarModelBase(unittest.TestCase): if tuning == 'pid': self.assertTrue(len(self.CP.lateralTuning.pid.kpV)) elif tuning == 'torque': - self.assertTrue(self.CP.lateralTuning.torque.kf > 0) + self.assertTrue(self.CP.lateralTuning.torque.latAccelFactor > 0) else: raise Exception("unknown tuning") diff --git a/selfdrive/controls/lib/latcontrol_torque.py b/selfdrive/controls/lib/latcontrol_torque.py index fbef5828e6..f2b1e0b669 100644 --- a/selfdrive/controls/lib/latcontrol_torque.py +++ b/selfdrive/controls/lib/latcontrol_torque.py @@ -24,6 +24,9 @@ from openpilot.common.pid import PIDController LOW_SPEED_X = [0, 10, 20, 30] LOW_SPEED_Y = [15, 13, 10, 5] +KP = 1.0 +KI = 0.3 +KD = 0.0 class LatControlTorque(LatControl): @@ -32,7 +35,7 @@ class LatControlTorque(LatControl): self.torque_params = CP.lateralTuning.torque.as_builder() self.torque_from_lateral_accel = CI.torque_from_lateral_accel() self.lateral_accel_from_torque = CI.lateral_accel_from_torque() - self.pid = PIDController(self.torque_params.kp, self.torque_params.ki, rate=1/self.dt) + self.pid = PIDController(KP, KI, k_d=KD, rate=1/self.dt) self.update_limits() self.steering_angle_deadzone_deg = self.torque_params.steeringAngleDeadzoneDeg self.LATACCEL_REQUEST_BUFFER_NUM_FRAMES = int(1 / self.dt) @@ -76,7 +79,7 @@ class LatControlTorque(LatControl): low_speed_factor = (np.interp(CS.vEgo, LOW_SPEED_X, LOW_SPEED_Y) / max(CS.vEgo, MIN_SPEED)) ** 2 setpoint = lat_delay * desired_lateral_jerk + expected_lateral_accel error = setpoint - measurement - error_lsf = error + low_speed_factor / self.torque_params.kp * error + error_lsf = error + low_speed_factor / KP * error # do error correction in lateral acceleration space, convert at end to handle non-linear torque responses correctly pid_log.error = float(error_lsf) diff --git a/selfdrive/test/process_replay/ref_commit b/selfdrive/test/process_replay/ref_commit index 538aa34f2a..dd73ed12f7 100644 --- a/selfdrive/test/process_replay/ref_commit +++ b/selfdrive/test/process_replay/ref_commit @@ -1 +1 @@ -5342f5684c2498a33d6178f3b59efd5e83b73acc \ No newline at end of file +55e82ab6370865a1427ebc1d559921a5354d9cbf \ No newline at end of file diff --git a/selfdrive/ui/tests/test_translations.py b/selfdrive/ui/tests/test_translations.py index 2ae3356bb8..edd9a30412 100644 --- a/selfdrive/ui/tests/test_translations.py +++ b/selfdrive/ui/tests/test_translations.py @@ -93,7 +93,7 @@ class TestTranslations: def test_bad_language(self): IGNORED_WORDS = {'pédale'} - match = re.search(r'_([a-zA-Z]{2,3})', self.file) + match = re.search(r'([a-zA-Z]{2,3})', self.file) assert match, f"{self.name} - could not parse language" try: diff --git a/selfdrive/ui/translations/main_ar.ts b/selfdrive/ui/translations/ar.ts similarity index 100% rename from selfdrive/ui/translations/main_ar.ts rename to selfdrive/ui/translations/ar.ts diff --git a/selfdrive/ui/translations/main_de.ts b/selfdrive/ui/translations/de.ts similarity index 100% rename from selfdrive/ui/translations/main_de.ts rename to selfdrive/ui/translations/de.ts diff --git a/selfdrive/ui/translations/main_en.ts b/selfdrive/ui/translations/en.ts similarity index 100% rename from selfdrive/ui/translations/main_en.ts rename to selfdrive/ui/translations/en.ts diff --git a/selfdrive/ui/translations/main_es.ts b/selfdrive/ui/translations/es.ts similarity index 100% rename from selfdrive/ui/translations/main_es.ts rename to selfdrive/ui/translations/es.ts diff --git a/selfdrive/ui/translations/main_fr.ts b/selfdrive/ui/translations/fr.ts similarity index 100% rename from selfdrive/ui/translations/main_fr.ts rename to selfdrive/ui/translations/fr.ts diff --git a/selfdrive/ui/translations/main_ja.ts b/selfdrive/ui/translations/ja.ts similarity index 100% rename from selfdrive/ui/translations/main_ja.ts rename to selfdrive/ui/translations/ja.ts diff --git a/selfdrive/ui/translations/main_ko.ts b/selfdrive/ui/translations/ko.ts similarity index 100% rename from selfdrive/ui/translations/main_ko.ts rename to selfdrive/ui/translations/ko.ts diff --git a/selfdrive/ui/translations/languages.json b/selfdrive/ui/translations/languages.json index 132b5088d7..b0674dee82 100644 --- a/selfdrive/ui/translations/languages.json +++ b/selfdrive/ui/translations/languages.json @@ -1,14 +1,14 @@ { - "English": "main_en", - "Deutsch": "main_de", - "Français": "main_fr", - "Português": "main_pt-BR", - "Español": "main_es", - "Türkçe": "main_tr", - "العربية": "main_ar", - "ไทย": "main_th", - "中文(繁體)": "main_zh-CHT", - "中文(简体)": "main_zh-CHS", - "한국어": "main_ko", - "日本語": "main_ja" + "English": "en", + "Deutsch": "de", + "Français": "fr", + "Português": "pt-BR", + "Español": "es", + "Türkçe": "tr", + "العربية": "ar", + "ไทย": "th", + "中文(繁體)": "zh-CHT", + "中文(简体)": "zh-CHS", + "한국어": "ko", + "日本語": "ja" } diff --git a/selfdrive/ui/translations/main_nl.ts b/selfdrive/ui/translations/nl.ts similarity index 100% rename from selfdrive/ui/translations/main_nl.ts rename to selfdrive/ui/translations/nl.ts diff --git a/selfdrive/ui/translations/main_pl.ts b/selfdrive/ui/translations/pl.ts similarity index 100% rename from selfdrive/ui/translations/main_pl.ts rename to selfdrive/ui/translations/pl.ts diff --git a/selfdrive/ui/translations/main_pt-BR.ts b/selfdrive/ui/translations/pt-BR.ts similarity index 100% rename from selfdrive/ui/translations/main_pt-BR.ts rename to selfdrive/ui/translations/pt-BR.ts diff --git a/selfdrive/ui/translations/main_th.ts b/selfdrive/ui/translations/th.ts similarity index 100% rename from selfdrive/ui/translations/main_th.ts rename to selfdrive/ui/translations/th.ts diff --git a/selfdrive/ui/translations/main_tr.ts b/selfdrive/ui/translations/tr.ts similarity index 100% rename from selfdrive/ui/translations/main_tr.ts rename to selfdrive/ui/translations/tr.ts diff --git a/selfdrive/ui/translations/main_zh-CHS.ts b/selfdrive/ui/translations/zh-CHS.ts similarity index 100% rename from selfdrive/ui/translations/main_zh-CHS.ts rename to selfdrive/ui/translations/zh-CHS.ts diff --git a/selfdrive/ui/translations/main_zh-CHT.ts b/selfdrive/ui/translations/zh-CHT.ts similarity index 100% rename from selfdrive/ui/translations/main_zh-CHT.ts rename to selfdrive/ui/translations/zh-CHT.ts diff --git a/tools/op.sh b/tools/op.sh index ae12809eb9..8b5062ad9b 100755 --- a/tools/op.sh +++ b/tools/op.sh @@ -284,7 +284,7 @@ function op_venv() { function op_adb() { op_before_cmd - op_run_command tools/scripts/adb_ssh.sh + op_run_command tools/scripts/adb_ssh.sh "$@" } function op_ssh() { diff --git a/tools/scripts/adb_ssh.sh b/tools/scripts/adb_ssh.sh index 43c8e07de6..2fe2873a3d 100755 --- a/tools/scripts/adb_ssh.sh +++ b/tools/scripts/adb_ssh.sh @@ -4,4 +4,4 @@ set -e # this is a little nicer than "adb shell" since # "adb shell" doesn't do full terminal emulation adb forward tcp:2222 tcp:22 -ssh comma@localhost -p 2222 +ssh comma@localhost -p 2222 "$@"