Skip to content

Commit

Permalink
car: remove lat lqr control
Browse files Browse the repository at this point in the history
  • Loading branch information
Edison-CBS committed Feb 8, 2024
1 parent b634e55 commit fad4604
Show file tree
Hide file tree
Showing 20 changed files with 0 additions and 208 deletions.
2 changes: 0 additions & 2 deletions common/params.cc
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ std::unordered_map<std::string, uint32_t> keys = {
{"DisableLogging", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
{"DisablePowerDown", PERSISTENT},
{"DisableUpdates", PERSISTENT},
{"LQR", PERSISTENT},
{"DisengageOnAccelerator", PERSISTENT},
{"DmModelInitialized", CLEAR_ON_ONROAD_TRANSITION},
{"DongleId", PERSISTENT},
Expand Down Expand Up @@ -210,7 +209,6 @@ std::unordered_map<std::string, uint32_t> keys = {
{"VisionRadarToggle", PERSISTENT},
{"WheeledBody", PERSISTENT},
// edison params
{"LQR", PERSISTENT},
{"ScreenOffTimer", PERSISTENT},
{"CruiseSpeedRewrite", PERSISTENT},
{"DriverCamera", PERSISTENT},
Expand Down
1 change: 0 additions & 1 deletion release/files_common
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ selfdrive/controls/lib/desire_helper.py
selfdrive/controls/lib/drive_helpers.py
selfdrive/controls/lib/events.py
selfdrive/controls/lib/latcontrol_angle.py
selfdrive/controls/lib/latcontrol_lqr.py
selfdrive/controls/lib/latcontrol_torque.py
selfdrive/controls/lib/latcontrol_pid.py
selfdrive/controls/lib/latcontrol.py
Expand Down
3 changes: 0 additions & 3 deletions selfdrive/car/tests/test_car_interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@ def test_car_interfaces(self, car_name, data):
self.assertTrue(len(tune.pid.kpV) > 0 and len(tune.pid.kpV) == len(tune.pid.kpBP))
self.assertTrue(len(tune.pid.kiV) > 0 and len(tune.pid.kiV) == len(tune.pid.kiBP))

elif tune.which() == 'lqr':
self.assertTrue(len(tune.lqr.a))

elif tune.which() == 'torque':
self.assertTrue(not math.isnan(tune.torque.kf) and tune.torque.kf > 0)
self.assertTrue(not math.isnan(tune.torque.friction) and tune.torque.friction > 0)
Expand Down
2 changes: 0 additions & 2 deletions selfdrive/car/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,6 @@ def test_car_params(self):
tuning = self.CP.lateralTuning.which()
if tuning == 'pid':
self.assertTrue(len(self.CP.lateralTuning.pid.kpV))
elif tuning == 'lqr':
self.assertTrue(len(self.CP.lateralTuning.lqr.a))
elif tuning == 'torque':
self.assertTrue(self.CP.lateralTuning.torque.kf > 0)
else:
Expand Down
2 changes: 0 additions & 2 deletions selfdrive/car/toyota/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ def _get_params(ret, candidate, fingerprint, car_fw, experimental_long, docs):
ret.steerRatio = 16.8
ret.tireStiffnessFactor = 0.5533
ret.mass = 3340. * CV.LB_TO_KG
if Params().get_bool("LQR"):
set_lat_tune(ret.lateralTuning, LatTunes.LQR_PV)

elif candidate in (CAR.RAV4, CAR.RAV4H):
stop_and_go = True if (candidate in CAR.RAV4H) else False
Expand Down
22 changes: 0 additions & 22 deletions selfdrive/car/toyota/tunes.py

This file was deleted.

5 changes: 0 additions & 5 deletions selfdrive/controls/controlsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from openpilot.selfdrive.controls.lib.latcontrol import LatControl, MIN_LATERAL_CONTROL_SPEED
from openpilot.selfdrive.controls.lib.longcontrol import LongControl
from openpilot.selfdrive.controls.lib.latcontrol_pid import LatControlPID
from openpilot.selfdrive.controls.lib.latcontrol_lqr import LatControlLQR
from openpilot.selfdrive.controls.lib.latcontrol_angle import LatControlAngle, STEER_ANGLE_SATURATION_THRESHOLD
from openpilot.selfdrive.controls.lib.latcontrol_torque import LatControlTorque
from openpilot.selfdrive.controls.lib.events import Events, ET
Expand Down Expand Up @@ -149,8 +148,6 @@ def __init__(self, CI=None):
self.LaC = LatControlAngle(self.CP, self.CI)
elif self.CP.lateralTuning.which() == 'pid':
self.LaC = LatControlPID(self.CP, self.CI)
elif self.CP.lateralTuning.which() == 'lqr':
self.LaC = LatControlLQR(self.CP, self.CI)
elif self.CP.lateralTuning.which() == 'torque':
self.LaC = LatControlTorque(self.CP, self.CI)

Expand Down Expand Up @@ -806,8 +803,6 @@ def publish_logs(self, CS, start_time, CC, lac_log):
controlsState.lateralControlState.angleState = lac_log
elif lat_tuning == 'pid':
controlsState.lateralControlState.pidState = lac_log
elif lat_tuning == 'lqr':
controlsState.lateralControlState.lqrState = lac_log
elif lat_tuning == 'torque':
controlsState.lateralControlState.torqueState = lac_log

Expand Down
84 changes: 0 additions & 84 deletions selfdrive/controls/lib/latcontrol_lqr.py

This file was deleted.

1 change: 0 additions & 1 deletion selfdrive/manager/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ def manager_init() -> None:

default_params: List[Tuple[str, Union[str, bytes]]] = [
("CompletedTrainingVersion", "0"),
("LQR", "0"),
("DisengageOnAccelerator", "0"),
("GsmMetered", "1"),
("HasAcceptedTerms", "0"),
Expand Down
6 changes: 0 additions & 6 deletions selfdrive/ui/qt/offroad/settings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,6 @@ TogglesPanel::TogglesPanel(SettingsWindow *parent) : ListWidget(parent) {
tr("Upload data from the driver facing camera and help improve the driver monitoring algorithm."),
"../assets/offroad/icon_monitoring.png",
},
{
"LQR",
tr("Use LQR on Lat Control for PA"),
tr("When enabled, using LQR on lat control for prius alpha."),
"../assets/offroad/icon_openpilot.png",
},
// screen off timer
{
"ScreenOffTimer",
Expand Down
8 changes: 0 additions & 8 deletions selfdrive/ui/translations/main_ar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1139,14 +1139,6 @@ This may take up to a minute.</source>
<source>Enable the openpilot longitudinal control (alpha) toggle to allow Experimental mode.</source>
<translation>تمكين التحكم الطولي من openpilot (ألفا) للسماح بالوضع التجريبي.</translation>
</message>
<message>
<source>Use LQR on Lat Control for PA</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>When enabled, using LQR on lat control for prius alpha.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Turn Off Display After 30 Seconds</source>
<translation type="unfinished"></translation>
Expand Down
8 changes: 0 additions & 8 deletions selfdrive/ui/translations/main_de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1033,14 +1033,6 @@ This may take up to a minute.</source>
<source>Upload data from the driver facing camera and help improve the driver monitoring algorithm.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use LQR on Lat Control for PA</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>When enabled, using LQR on lat control for prius alpha.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Turn Off Display After 30 Seconds</source>
<translation type="unfinished"></translation>
Expand Down
8 changes: 0 additions & 8 deletions selfdrive/ui/translations/main_fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1123,14 +1123,6 @@ Cela peut prendre jusqu&apos;à une minute.</translation>
<source>Enable the openpilot longitudinal control (alpha) toggle to allow Experimental mode.</source>
<translation>Activer le contrôle longitudinal d&apos;openpilot (en alpha) pour autoriser le mode expérimental.</translation>
</message>
<message>
<source>Use LQR on Lat Control for PA</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>When enabled, using LQR on lat control for prius alpha.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Turn Off Display After 30 Seconds</source>
<translation type="unfinished"></translation>
Expand Down
8 changes: 0 additions & 8 deletions selfdrive/ui/translations/main_ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1117,14 +1117,6 @@ This may take up to a minute.</source>
<source>Enable the openpilot longitudinal control (alpha) toggle to allow Experimental mode.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use LQR on Lat Control for PA</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>When enabled, using LQR on lat control for prius alpha.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Turn Off Display After 30 Seconds</source>
<translation type="unfinished"></translation>
Expand Down
8 changes: 0 additions & 8 deletions selfdrive/ui/translations/main_ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1119,14 +1119,6 @@ This may take up to a minute.</source>
<source>The driving visualization will transition to the road-facing wide-angle camera at low speeds to better show some turns. The Experimental mode logo will also be shown in the top right corner. When a navigation destination is set and the driving model is using it as input, the driving path on the map will turn green.</source>
<translation>주행 시각화는 저속으로 주행 시 도로를 향한 광각 카메라로 자동 전환되어 일부 곡선 경로를 더 잘 보여줍니다. 실험 모드 로고는 우측 상단에 표시됩니다. 내비게이션 목적지가 설정되고 주행 모델에 입력되면 지도의 주행 경로가 녹색으로 바뀝니다.</translation>
</message>
<message>
<source>Use LQR on Lat Control for PA</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>When enabled, using LQR on lat control for prius alpha.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Turn Off Display After 30 Seconds</source>
<translation type="unfinished"></translation>
Expand Down
8 changes: 0 additions & 8 deletions selfdrive/ui/translations/main_pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1033,14 +1033,6 @@ This may take up to a minute.</source>
<source>Upload data from the driver facing camera and help improve the driver monitoring algorithm.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use LQR on Lat Control for PA</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>When enabled, using LQR on lat control for prius alpha.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Turn Off Display After 30 Seconds</source>
<translation type="unfinished"></translation>
Expand Down
8 changes: 0 additions & 8 deletions selfdrive/ui/translations/main_th.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1119,14 +1119,6 @@ This may take up to a minute.</source>
<source>Enable the openpilot longitudinal control (alpha) toggle to allow Experimental mode.</source>
<translation>เปิดระบบควบคุมการเร่ง/เบรคโดย openpilot (alpha) เพื่อเปิดใช้งานโหมดทดลอง</translation>
</message>
<message>
<source>Use LQR on Lat Control for PA</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>When enabled, using LQR on lat control for prius alpha.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Turn Off Display After 30 Seconds</source>
<translation type="unfinished"></translation>
Expand Down
8 changes: 0 additions & 8 deletions selfdrive/ui/translations/main_tr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1117,14 +1117,6 @@ This may take up to a minute.</source>
<source>Enable the openpilot longitudinal control (alpha) toggle to allow Experimental mode.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use LQR on Lat Control for PA</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>When enabled, using LQR on lat control for prius alpha.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Turn Off Display After 30 Seconds</source>
<translation type="unfinished"></translation>
Expand Down
8 changes: 0 additions & 8 deletions selfdrive/ui/translations/main_zh-CHS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1119,14 +1119,6 @@ This may take up to a minute.</source>
<source>The driving visualization will transition to the road-facing wide-angle camera at low speeds to better show some turns. The Experimental mode logo will also be shown in the top right corner. When a navigation destination is set and the driving model is using it as input, the driving path on the map will turn green.</source>
<translation>行驶画面将在低速时切换到道路朝向的广角摄像头,以更好地显示一些转弯。实验模式标志也将显示在右上角。当设置了导航目的地并且驾驶模型正在使用它作为输入时,地图上的驾驶路径将变为绿色。</translation>
</message>
<message>
<source>Use LQR on Lat Control for PA</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>When enabled, using LQR on lat control for prius alpha.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Turn Off Display After 30 Seconds</source>
<translation type="unfinished"></translation>
Expand Down
8 changes: 0 additions & 8 deletions selfdrive/ui/translations/main_zh-CHT.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1119,14 +1119,6 @@ This may take up to a minute.</source>
<source>The driving visualization will transition to the road-facing wide-angle camera at low speeds to better show some turns. The Experimental mode logo will also be shown in the top right corner. When a navigation destination is set and the driving model is using it as input, the driving path on the map will turn green.</source>
<translation>行駛畫面將在低速時切換至道路朝向的廣角鏡頭,以更好地顯示一些轉彎。實驗模式圖示也將顯示在右上角。當設定了導航目的地並且行駛模型正在將其作為輸入時,地圖上的行駛路徑將變為綠色。</translation>
</message>
<message>
<source>Use LQR on Lat Control for PA</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>When enabled, using LQR on lat control for prius alpha.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Turn Off Display After 30 Seconds</source>
<translation type="unfinished"></translation>
Expand Down

0 comments on commit fad4604

Please sign in to comment.