diff --git a/common/params.cc b/common/params.cc index fa77a83c27..6a97392c1c 100644 --- a/common/params.cc +++ b/common/params.cc @@ -570,8 +570,6 @@ std::unordered_map keys = { {"RadarInterceptorEnabled", PERSISTENT}, {"NoMRCC", PERSISTENT}, {"NoFSC", PERSISTENT}, - {"ExperimentalLongTune", PERSISTENT}, - {"LongOutputGain", PERSISTENT}, {"BlendedACC", PERSISTENT}, {"ManualTransmission", PERSISTENT}, }; diff --git a/selfdrive/controls/lib/longcontrol.py b/selfdrive/controls/lib/longcontrol.py index 7e7c4f632f..dc5db8bfe1 100644 --- a/selfdrive/controls/lib/longcontrol.py +++ b/selfdrive/controls/lib/longcontrol.py @@ -98,9 +98,6 @@ class LongControl: self.gain_step = 0.0001 # Step size for increasing/decreasing gain self.params = Params() self.params_memory = Params("/dev/shm/params") - gain = self.params.get_float("LongOutputGain") - self.auto_tune = self.params.get_bool("ExperimentalLongTune") - self.output_gain = gain if gain != 0.0 and self.auto_tune else 1.0 # Initial output gain self.experimental_mode_last = False def reset(self): @@ -143,27 +140,8 @@ class LongControl: output_accel = self.pid.update(error, speed=CS.vEgo, feedforward=a_target) - output_accel = output_accel * self.output_gain self.last_output_accel = clip(output_accel, accel_limits[0], accel_limits[1]) - is_flat = abs(pitch) <= 0.05 - self.auto_tune = self.params.get_bool("ExperimentalLongTune") - if not self.auto_tune: - self.output_gain = 1.0 - if is_flat and self.auto_tune and active and self.last_output_accel == output_accel: # don't adjust when limited or inactive - # if the signs of accel and integrator match, increase the output gain - i = self.pid.i - if (i > 0.02 and a_target > 0.2) or (i < -0.02 and a_target < -0.2): - self.output_gain += self.gain_step - self.output_gain = max(0.5, min(self.output_gain, 2.0)) - self.params.put_float_nonblocking("LongOutputGain",self.output_gain) - self.pid.i = 0.0 - # if the signs of accel and integrator are opposite, decrease the output gain - elif (i < -0.02 and a_target > 0.2) or (i > 0.02 and a_target < -0.2): - self.output_gain -= self.gain_step - self.output_gain = max(0.5, min(self.output_gain, 2.0)) - self.params.put_float_nonblocking("LongOutputGain", self.output_gain) - self.pid.i = 0.0 return self.last_output_accel diff --git a/selfdrive/ui/qt/offroad/settings.cc b/selfdrive/ui/qt/offroad/settings.cc index 5aebe1b1f0..9c02ffa643 100644 --- a/selfdrive/ui/qt/offroad/settings.cc +++ b/selfdrive/ui/qt/offroad/settings.cc @@ -48,12 +48,6 @@ TogglesPanel::TogglesPanel(SettingsWindow *parent) : ListWidget(parent) { "", "../assets/img_experimental_white.svg", }, - { - "ExperimentalLongTune", - tr("Longitudinal Auto-Tune (Beta)"), - tr("Enable the longitudinal auto-tuning feature. Slowly adjusts the acceleration gain to minimize error"), - "../assets/offroad/icon_openpilot.png", - }, { "BlendedACC", tr("Blended Acc (Experimental)"), diff --git a/system/manager/manager.py b/system/manager/manager.py index b60b5304bb..010cd16300 100755 --- a/system/manager/manager.py +++ b/system/manager/manager.py @@ -363,8 +363,6 @@ def manager_init() -> None: ("WD40Score", "0"), ("WheelIcon", "frog"), ("WheelSpeed", "0"), - ("ExperimentalLongTune", "0"), - ("LongOutputGain", "1.0"), ("BlendedACC", "0"), ] if not PC: