Rename experimental long (#35011)

* now alpha long

* fix

* rename param

* thought i did this

* debug

* debug

* more

* more

* moar

* Revert "moar"

This reverts commit e347106246.

* Revert "more"

This reverts commit 0746e6d2e4.

* Revert "more"

This reverts commit 0db5a8792c.

* Revert "debug"

This reverts commit 72f235b137.

* Revert "debug"

This reverts commit 7871b69f8c.
pull/35018/head
Shane Smiskol 2 weeks ago committed by GitHub
parent dced8d7f87
commit abad7649d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      common/params_keys.h
  2. 2
      opendbc_repo
  3. 4
      selfdrive/car/card.py
  4. 2
      selfdrive/car/tests/test_car_interfaces.py
  5. 10
      selfdrive/car/tests/test_models.py
  6. 2
      selfdrive/debug/set_car_params.py
  7. 4
      selfdrive/selfdrived/selfdrived.py
  8. 4
      selfdrive/test/process_replay/process_replay.py
  9. 8
      selfdrive/ui/qt/offroad/developer_panel.cc
  10. 2
      selfdrive/ui/qt/offroad/settings.cc
  11. 4
      selfdrive/ui/qt/util.cc
  12. 2
      selfdrive/ui/tests/test_ui/run.py
  13. 2
      tools/sim/bridge/common.py

@ -34,7 +34,7 @@ inline static std::unordered_map<std::string, uint32_t> keys = {
{"DoReboot", CLEAR_ON_MANAGER_START},
{"DoShutdown", CLEAR_ON_MANAGER_START},
{"DoUninstall", CLEAR_ON_MANAGER_START},
{"ExperimentalLongitudinalEnabled", PERSISTENT | DEVELOPMENT_ONLY},
{"AlphaLongitudinalEnabled", PERSISTENT | DEVELOPMENT_ONLY},
{"ExperimentalMode", PERSISTENT},
{"ExperimentalModeConfirmed", PERSISTENT},
{"FirmwareQueryDone", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},

@ -1 +1 @@
Subproject commit d65fa99e2aa60a6d98cdfb5acb912665e9e6447e
Subproject commit 3b33a71a2bf08b57dd5b2bf77e26cc376dcd7cc9

@ -89,7 +89,7 @@ class Car:
if len(can.can) > 0:
break
experimental_long_allowed = self.params.get_bool("ExperimentalLongitudinalEnabled")
alpha_long_allowed = self.params.get_bool("AlphaLongitudinalEnabled")
num_pandas = len(messaging.recv_one_retry(self.sm.sock['pandaStates']).pandaStates)
cached_params = None
@ -98,7 +98,7 @@ class Car:
with car.CarParams.from_bytes(cached_params_raw) as _cached_params:
cached_params = _cached_params
self.CI = get_car(*self.can_callbacks, obd_callback(self.params), experimental_long_allowed, num_pandas, cached_params)
self.CI = get_car(*self.can_callbacks, obd_callback(self.params), alpha_long_allowed, num_pandas, cached_params)
self.RI = interfaces[self.CI.CP.carFingerprint].RadarInterface(self.CI.CP)
self.CP = self.CI.CP

@ -39,7 +39,7 @@ class TestCarInterfaces:
args = get_fuzzy_car_interface_args(data.draw)
car_params = CarInterface.get_params(car_name, args['fingerprints'], args['car_fw'],
experimental_long=args['experimental_long'], docs=False)
alpha_long=args['alpha_long'], docs=False)
car_params = car_params.as_reader()
car_interface = CarInterface(car_params)
assert car_params

@ -78,7 +78,7 @@ class TestCarModelBase(unittest.TestCase):
cls.elm_frame = None
cls.car_safety_mode_frame = None
cls.fingerprint = gen_empty_fingerprint()
experimental_long = False
alpha_long = False
for msg in lr:
if msg.which() == "can":
can = can_capnp_to_list((msg.as_builder().to_bytes(),))[0]
@ -91,7 +91,7 @@ class TestCarModelBase(unittest.TestCase):
elif msg.which() == "carParams":
car_fw = msg.carParams.carFw
if msg.carParams.openpilotLongitudinalControl:
experimental_long = True
alpha_long = True
if cls.platform is None:
live_fingerprint = msg.carParams.carFingerprint
cls.platform = MIGRATION.get(live_fingerprint, live_fingerprint)
@ -113,7 +113,7 @@ class TestCarModelBase(unittest.TestCase):
cls.car_safety_mode_frame = len(can_msgs)
assert len(can_msgs) > int(50 / DT_CTRL), "no can data found"
return car_fw, can_msgs, experimental_long
return car_fw, can_msgs, alpha_long
@classmethod
def get_testing_data(cls):
@ -146,13 +146,13 @@ class TestCarModelBase(unittest.TestCase):
raise unittest.SkipTest
raise Exception(f"missing test route for {cls.platform}")
car_fw, cls.can_msgs, experimental_long = cls.get_testing_data()
car_fw, cls.can_msgs, alpha_long = cls.get_testing_data()
# if relay is expected to be open in the route
cls.openpilot_enabled = cls.car_safety_mode_frame is not None
cls.CarInterface = interfaces[cls.platform]
cls.CP = cls.CarInterface.get_params(cls.platform, cls.fingerprint, car_fw, experimental_long, docs=False)
cls.CP = cls.CarInterface.get_params(cls.platform, cls.fingerprint, car_fw, alpha_long, docs=False)
assert cls.CP
assert cls.CP.carFingerprint == cls.platform

@ -15,7 +15,7 @@ if __name__ == "__main__":
else:
CP = car.CarParams.new_message()
CP.openpilotLongitudinalControl = True
CP.experimentalLongitudinalAvailable = False
CP.alphaLongitudinalAvailable = False
cp_bytes = CP.to_bytes()
for p in ("CarParams", "CarParamsCache", "CarParamsPersistent"):

@ -89,8 +89,8 @@ class SelfdriveD:
car_recognized = self.CP.brand != 'mock'
# cleanup old params
if not self.CP.experimentalLongitudinalAvailable:
self.params.remove("ExperimentalLongitudinalEnabled")
if not self.CP.alphaLongitudinalAvailable:
self.params.remove("AlphaLongitudinalEnabled")
if not self.CP.openpilotLongitudinalControl:
self.params.remove("ExperimentalMode")

@ -363,7 +363,7 @@ def get_car_params_callback(rc, pm, msgs, fingerprint):
with car.CarParams.from_bytes(cached_params_raw) as _cached_params:
cached_params = _cached_params
CP = get_car(*can_callbacks, lambda obd: None, Params().get_bool("ExperimentalLongitudinalEnabled"), cached_params=cached_params).CP
CP = get_car(*can_callbacks, lambda obd: None, Params().get_bool("AlphaLongitudinalEnabled"), cached_params=cached_params).CP
if not params.get_bool("DisengageOnAccelerator"):
CP.alternativeExperience |= ALTERNATIVE_EXPERIENCE.DISABLE_DISENGAGE_ON_GAS
@ -777,7 +777,7 @@ def generate_params_config(lr=None, CP=None, fingerprint=None, custom_params=Non
params_dict["CarParamsCache"] = CP.as_builder().to_bytes()
if CP.openpilotLongitudinalControl:
params_dict["ExperimentalLongitudinalEnabled"] = True
params_dict["AlphaLongitudinalEnabled"] = True
if CP.notCar:
params_dict["JoystickDebugMode"] = True

@ -26,7 +26,7 @@ DeveloperPanel::DeveloperPanel(SettingsWindow *parent) : ListWidget(parent) {
addItem(longManeuverToggle);
experimentalLongitudinalToggle = new ParamControl(
"ExperimentalLongitudinalEnabled",
"AlphaLongitudinalEnabled",
tr("openpilot Longitudinal Control (Alpha)"),
QString("<b>%1</b><br><br>%2")
.arg(tr("WARNING: openpilot longitudinal control is in alpha for this car and will disable Automatic Emergency Braking (AEB)."))
@ -68,8 +68,8 @@ void DeveloperPanel::updateToggles(bool _offroad) {
capnp::FlatArrayMessageReader cmsg(aligned_buf.align(cp_bytes.data(), cp_bytes.size()));
cereal::CarParams::Reader CP = cmsg.getRoot<cereal::CarParams>();
if (!CP.getExperimentalLongitudinalAvailable() || is_release) {
params.remove("ExperimentalLongitudinalEnabled");
if (!CP.getAlphaLongitudinalAvailable() || is_release) {
params.remove("AlphaLongitudinalEnabled");
experimentalLongitudinalToggle->setEnabled(false);
}
@ -78,7 +78,7 @@ void DeveloperPanel::updateToggles(bool _offroad) {
* - is not a release branch, and
* - the car supports experimental longitudinal control (alpha)
*/
experimentalLongitudinalToggle->setVisible(CP.getExperimentalLongitudinalAvailable() && !is_release);
experimentalLongitudinalToggle->setVisible(CP.getAlphaLongitudinalAvailable() && !is_release);
longManeuverToggle->setEnabled(hasLongitudinalControl(CP) && _offroad);
} else {

@ -152,7 +152,7 @@ void TogglesPanel::updateToggles() {
QString long_desc = unavailable + " " + \
tr("openpilot longitudinal control may come in a future update.");
if (CP.getExperimentalLongitudinalAvailable()) {
if (CP.getAlphaLongitudinalAvailable()) {
if (is_release) {
long_desc = unavailable + " " + tr("An alpha version of openpilot longitudinal control can be tested, along with Experimental mode, on non-release branches.");
} else {

@ -193,8 +193,8 @@ QPixmap bootstrapPixmap(const QString &id) {
bool hasLongitudinalControl(const cereal::CarParams::Reader &car_params) {
// Using the experimental longitudinal toggle, returns whether longitudinal control
// will be active without needing a restart of openpilot
return car_params.getExperimentalLongitudinalAvailable()
? Params().getBool("ExperimentalLongitudinalEnabled")
return car_params.getAlphaLongitudinalAvailable()
? Params().getBool("AlphaLongitudinalEnabled")
: car_params.getOpenpilotLongitudinalControl();
}

@ -56,7 +56,7 @@ def setup_settings_firehose(click, pm: PubMaster):
def setup_settings_developer(click, pm: PubMaster):
CP = car.CarParams()
CP.experimentalLongitudinalAvailable = True
CP.alphaLongitudinalAvailable = True
Params().put("CarParamsPersistent", CP.to_bytes())
setup_settings_device(click, pm)

@ -40,7 +40,7 @@ class SimulatorBridge(ABC):
def __init__(self, dual_camera, high_quality):
set_params_enabled()
self.params = Params()
self.params.put_bool("ExperimentalLongitudinalEnabled", True)
self.params.put_bool("AlphaLongitudinalEnabled", True)
self.rk = Ratekeeper(100, None)

Loading…
Cancel
Save