experimental mode (#26416)

* experimental mode

* rename param

* red lights
old-commit-hash: 9a3f468051
taco
Adeeb Shihadeh 2 years ago committed by GitHub
parent 34adf259e8
commit 74979a7c76
  1. 8
      RELEASES.md
  2. 2
      common/params.cc
  3. 2
      selfdrive/controls/controlsd.py
  4. 2
      selfdrive/controls/lib/longitudinal_planner.py
  5. 2
      selfdrive/controls/tests/test_cruise_speed.py
  6. 2
      selfdrive/controls/tests/test_following_distance.py
  7. 4
      selfdrive/test/longitudinal_maneuvers/test_longitudinal.py
  8. 41
      selfdrive/ui/qt/offroad/settings.cc
  9. 4
      selfdrive/ui/qt/onroad.cc
  10. 24
      selfdrive/ui/translations/main_ja.ts
  11. 24
      selfdrive/ui/translations/main_ko.ts
  12. 24
      selfdrive/ui/translations/main_pt-BR.ts
  13. 24
      selfdrive/ui/translations/main_zh-CHS.ts
  14. 24
      selfdrive/ui/translations/main_zh-CHT.ts
  15. 2
      selfdrive/ui/ui.cc
  16. 2
      selfdrive/ui/ui.h

@ -1,9 +1,13 @@
Version 0.8.17 (2022-XX-XX)
Version 0.8.17 (2022-11-XX)
========================
* New driving model
* Internal feature space accuracy increased tenfold during training, this makes the model dramatically more accurate.
* New driver monitoring model
* New end-to-end distracted trigger
* Experimental driving mode
* End-to-end longitudinal control
* Stops for red lights and stop signs
* openpilot defaults to chill mode, enable experimental in settings
* Self-tuning torque lateral controller parameters
* Parameters learned live for each car
* Torque controller used on all Toyota, Lexus, Hyundai, Kia, and Genesis models
@ -12,7 +16,7 @@ Version 0.8.17 (2022-XX-XX)
* Matched speeds shown on car's dash
* Improved update experience
* Border turns grey while overriding steering
* Added button to bookmark events while driving; view them later in comma connect
* Bookmark events while driving; view them in comma connect
* AGNOS 6
* tools: new and improved cabana thanks to deanlee!
* Genesis GV70 2022-23 support thanks to zunichky and sunnyhaibin!

@ -102,7 +102,7 @@ std::unordered_map<std::string, uint32_t> keys = {
{"DashcamOverride", PERSISTENT},
{"DisableLogging", CLEAR_ON_MANAGER_START | CLEAR_ON_IGNITION_ON},
{"DisablePowerDown", PERSISTENT},
{"EndToEndLong", PERSISTENT},
{"ExperimentalMode", PERSISTENT},
{"ExperimentalLongitudinalEnabled", PERSISTENT}, // WARNING: THIS MAY DISABLE AEB
{"DisableUpdates", PERSISTENT},
{"DisengageOnAccelerator", PERSISTENT},

@ -147,7 +147,7 @@ class Controls:
if not self.CP.experimentalLongitudinalAvailable:
self.params.remove("ExperimentalLongitudinalEnabled")
if not self.CP.openpilotLongitudinalControl:
self.params.remove("EndToEndLong")
self.params.remove("ExperimentalMode")
self.CC = car.CarControl.new_message()
self.CS_prev = car.CarState.new_message()

@ -66,7 +66,7 @@ class LongitudinalPlanner:
self.solverExecutionTime = 0.0
def read_param(self):
e2e = self.params.get_bool('EndToEndLong') and self.CP.openpilotLongitudinalControl
e2e = self.params.get_bool('ExperimentalMode') and self.CP.openpilotLongitudinalControl
self.mpc.mode = 'blended' if e2e else 'acc'
def parse_model(self, model_msg, model_error):

@ -26,7 +26,7 @@ class TestCruiseSpeed(unittest.TestCase):
def test_cruise_speed(self):
params = Params()
for e2e in [False, True]:
params.put_bool("EndToEndLong", e2e)
params.put_bool("ExperimentalMode", e2e)
for speed in np.arange(5, 40, 5):
print(f'Testing {speed} m/s')
cruise_speed = float(speed)

@ -27,7 +27,7 @@ class TestFollowingDistance(unittest.TestCase):
def test_following_distance(self):
params = Params()
for e2e in [False, True]:
params.put_bool("EndToEndLong", e2e)
params.put_bool("ExperimentalMode", e2e)
for speed in np.arange(0, 40, 5):
print(f'Testing {speed} m/s')
v_lead = float(speed)

@ -143,11 +143,11 @@ def run_maneuver_worker(k):
params = Params()
man = maneuvers[k]
params.put_bool("EndToEndLong", True)
params.put_bool("ExperimentalMode", True)
print(man.title, ' in e2e mode')
valid, _ = man.evaluate()
self.assertTrue(valid, msg=man.title)
params.put_bool("EndToEndLong", False)
params.put_bool("ExperimentalMode", False)
print(man.title, ' in acc mode')
valid, _ = man.evaluate()
self.assertTrue(valid, msg=man.title)

@ -36,6 +36,21 @@ TogglesPanel::TogglesPanel(SettingsWindow *parent) : ListWidget(parent) {
"../assets/offroad/icon_openpilot.png",
false,
},
{
"ExperimentalMode",
tr("Experimental mode"),
"",
"../assets/offroad/icon_road.png",
false,
},
{
"ExperimentalLongitudinalEnabled",
tr("Experimental openpilot longitudinal control"),
tr("<b>WARNING: openpilot longitudinal control is experimental for this car and will disable AEB.</b><br>\
openpilot defaults to the car's built-in ACC instead of openpilot's longitudinal control on this car. Enable this to switch to openpilot longitudinal control."),
"../assets/offroad/icon_speed_limit.png",
true,
},
{
"IsLdwEnabled",
tr("Enable Lane Departure Warnings"),
@ -64,20 +79,6 @@ TogglesPanel::TogglesPanel(SettingsWindow *parent) : ListWidget(parent) {
"../assets/offroad/icon_disengage_on_accelerator.svg",
false,
},
{
"EndToEndLong",
tr("🌮 End-to-end longitudinal (extremely alpha) 🌮"),
"",
"../assets/offroad/icon_road.png",
false,
},
{
"ExperimentalLongitudinalEnabled",
tr("Experimental openpilot longitudinal control"),
tr("<b>WARNING: openpilot longitudinal control is experimental for this car and will disable AEB.</b>"),
"../assets/offroad/icon_speed_limit.png",
true,
},
#ifdef ENABLE_MAPS
{
"NavSettingTime24h",
@ -116,9 +117,15 @@ void TogglesPanel::showEvent(QShowEvent *event) {
}
void TogglesPanel::updateToggles() {
auto e2e_toggle = toggles["EndToEndLong"];
auto e2e_toggle = toggles["ExperimentalMode"];
auto op_long_toggle = toggles["ExperimentalLongitudinalEnabled"];
const QString e2e_description = tr("Let the driving model control the gas and brakes. openpilot will drive as it thinks a human would. Super experimental.");
const QString e2e_description = tr("\
openpilot defaults to driving in <b>chill mode</b>.\
Experimental mode enables <b>alpha-level features</b> that aren't ready for chill mode. \
Experimental features are listed below:\
<br> \
<h4>🌮 End-to-End Longitudinal Control 🌮</h4> \
Let the driving model control the gas and brakes. openpilot will drive as it thinks a human would, including stopping for red lights and stop signs.");
auto cp_bytes = params.get("CarParamsPersistent");
if (!cp_bytes.empty()) {
@ -140,7 +147,7 @@ void TogglesPanel::updateToggles() {
} else {
// no long for now
e2e_toggle->setEnabled(false);
params.remove("EndToEndLong");
params.remove("ExperimentalMode");
const QString no_long = tr("openpilot longitudinal control is not currently available for this car.");
const QString exp_long = tr("Enable experimental longitudinal control to enable this.");

@ -461,7 +461,7 @@ void AnnotatedCameraWidget::drawLaneLines(QPainter &painter, const UIState *s) {
// paint path
QLinearGradient bg(0, height(), 0, height() / 4);
float start_hue, end_hue;
if (scene.end_to_end_long) {
if (scene.experimental_mode) {
const auto &acceleration = (*s->sm)["modelV2"].getModelV2().getAcceleration();
float acceleration_future = 0;
if (acceleration.getZ().size() > 16) {
@ -567,7 +567,7 @@ void AnnotatedCameraWidget::paintGL() {
} else if (v_ego > 15) {
wide_cam_requested = false;
}
wide_cam_requested = wide_cam_requested && s->scene.end_to_end_long;
wide_cam_requested = wide_cam_requested && s->scene.experimental_mode;
// TODO: also detect when ecam vision stream isn't available
// for replay of old routes, never go to widecam
wide_cam_requested = wide_cam_requested && s->scene.calibration_wide_valid;

@ -966,22 +966,10 @@ location set</source>
<source>Upload data from the driver facing camera and help improve the driver monitoring algorithm.</source>
<translation></translation>
</message>
<message>
<source>🌮 End-to-end longitudinal (extremely alpha) 🌮</source>
<translation>🌮 (α) 🌮</translation>
</message>
<message>
<source>Experimental openpilot longitudinal control</source>
<translation>openpilotによるアクセル制御</translation>
</message>
<message>
<source>&lt;b&gt;WARNING: openpilot longitudinal control is experimental for this car and will disable AEB.&lt;/b&gt;</source>
<translation>&lt;b&gt;警告: openpilotによるアクセル制御は実験段階でありAEBを無効化します&lt;/b&gt;</translation>
</message>
<message>
<source>Let the driving model control the gas and brakes. openpilot will drive as it thinks a human would. Super experimental.</source>
<translation>openpilotに任せますopenpilotが人間と同じように運転します</translation>
</message>
<message>
<source>openpilot longitudinal control is not currently available for this car.</source>
<translation>openpilotによるアクセル制御は</translation>
@ -1014,6 +1002,18 @@ location set</source>
<source>Show map on left side when in split screen view.</source>
<translation></translation>
</message>
<message>
<source>Experimental mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;b&gt;WARNING: openpilot longitudinal control is experimental for this car and will disable AEB.&lt;/b&gt;&lt;br&gt; openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control on this car. Enable this to switch to openpilot longitudinal control.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source> openpilot defaults to driving in &lt;b&gt;chill mode&lt;/b&gt;. Experimental mode enables &lt;b&gt;alpha-level features&lt;/b&gt; that aren&apos;t ready for chill mode. Experimental features are listed below: &lt;br&gt; &lt;h4&gt;🌮 End-to-End Longitudinal Control 🌮&lt;/h4&gt; Let the driving model control the gas and brakes. openpilot will drive as it thinks a human would, including stopping for red lights and stop signs.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Updater</name>

@ -966,22 +966,10 @@ location set</source>
<source>Upload data from the driver facing camera and help improve the driver monitoring algorithm.</source>
<translation> .</translation>
</message>
<message>
<source>🌮 End-to-end longitudinal (extremely alpha) 🌮</source>
<translation>🌮 e2e ( ) 🌮 </translation>
</message>
<message>
<source>Experimental openpilot longitudinal control</source>
<translation>openpilot ()</translation>
</message>
<message>
<source>&lt;b&gt;WARNING: openpilot longitudinal control is experimental for this car and will disable AEB.&lt;/b&gt;</source>
<translation>&lt;b&gt;경고: openpilot AEB를 .&lt;/b&gt;</translation>
</message>
<message>
<source>Let the driving model control the gas and brakes. openpilot will drive as it thinks a human would. Super experimental.</source>
<translation> openpilot은 . ( )</translation>
</message>
<message>
<source>openpilot longitudinal control is not currently available for this car.</source>
<translation> openpilot .</translation>
@ -1014,6 +1002,18 @@ location set</source>
<source>Show map on left side when in split screen view.</source>
<translation> .</translation>
</message>
<message>
<source>Experimental mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;b&gt;WARNING: openpilot longitudinal control is experimental for this car and will disable AEB.&lt;/b&gt;&lt;br&gt; openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control on this car. Enable this to switch to openpilot longitudinal control.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source> openpilot defaults to driving in &lt;b&gt;chill mode&lt;/b&gt;. Experimental mode enables &lt;b&gt;alpha-level features&lt;/b&gt; that aren&apos;t ready for chill mode. Experimental features are listed below: &lt;br&gt; &lt;h4&gt;🌮 End-to-End Longitudinal Control 🌮&lt;/h4&gt; Let the driving model control the gas and brakes. openpilot will drive as it thinks a human would, including stopping for red lights and stop signs.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Updater</name>

@ -970,22 +970,10 @@ trabalho definido</translation>
<source>Upload data from the driver facing camera and help improve the driver monitoring algorithm.</source>
<translation>Upload dados da câmera voltada para o motorista e ajude a melhorar o algoritmo de monitoramentor.</translation>
</message>
<message>
<source>🌮 End-to-end longitudinal (extremely alpha) 🌮</source>
<translation>🌮 End-to-end longitudinal (experimental) 🌮</translation>
</message>
<message>
<source>Experimental openpilot longitudinal control</source>
<translation>Controle longitudinal experimental openpilot</translation>
</message>
<message>
<source>&lt;b&gt;WARNING: openpilot longitudinal control is experimental for this car and will disable AEB.&lt;/b&gt;</source>
<translation>&lt;b&gt;AVISO: o controle longitudinal openpilot é experimental para este carro e irá desabilitar AEB.&lt;/b&gt;</translation>
</message>
<message>
<source>Let the driving model control the gas and brakes. openpilot will drive as it thinks a human would. Super experimental.</source>
<translation>Deixe o modelo controlar o acelerador e os freios. openpilot irá conduzir como pensa que um humano faria. Super experimental.</translation>
</message>
<message>
<source>openpilot longitudinal control is not currently available for this car.</source>
<translation>controle longitudinal openpilot não está disponível para este carro.</translation>
@ -1018,6 +1006,18 @@ trabalho definido</translation>
<source>Show map on left side when in split screen view.</source>
<translation>Exibir mapa do lado esquerdo quando a tela for dividida.</translation>
</message>
<message>
<source>Experimental mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;b&gt;WARNING: openpilot longitudinal control is experimental for this car and will disable AEB.&lt;/b&gt;&lt;br&gt; openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control on this car. Enable this to switch to openpilot longitudinal control.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source> openpilot defaults to driving in &lt;b&gt;chill mode&lt;/b&gt;. Experimental mode enables &lt;b&gt;alpha-level features&lt;/b&gt; that aren&apos;t ready for chill mode. Experimental features are listed below: &lt;br&gt; &lt;h4&gt;🌮 End-to-End Longitudinal Control 🌮&lt;/h4&gt; Let the driving model control the gas and brakes. openpilot will drive as it thinks a human would, including stopping for red lights and stop signs.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Updater</name>

@ -964,22 +964,10 @@ location set</source>
<source>Upload data from the driver facing camera and help improve the driver monitoring algorithm.</source>
<translation></translation>
</message>
<message>
<source>🌮 End-to-end longitudinal (extremely alpha) 🌮</source>
<translation>🌮 🌮</translation>
</message>
<message>
<source>Experimental openpilot longitudinal control</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;b&gt;WARNING: openpilot longitudinal control is experimental for this car and will disable AEB.&lt;/b&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Let the driving model control the gas and brakes. openpilot will drive as it thinks a human would. Super experimental.</source>
<translation>openpilot将会模仿人类司机的驾驶方式</translation>
</message>
<message>
<source>openpilot longitudinal control is not currently available for this car.</source>
<translation type="unfinished"></translation>
@ -1012,6 +1000,18 @@ location set</source>
<source>Show map on left side when in split screen view.</source>
<translation></translation>
</message>
<message>
<source>Experimental mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;b&gt;WARNING: openpilot longitudinal control is experimental for this car and will disable AEB.&lt;/b&gt;&lt;br&gt; openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control on this car. Enable this to switch to openpilot longitudinal control.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source> openpilot defaults to driving in &lt;b&gt;chill mode&lt;/b&gt;. Experimental mode enables &lt;b&gt;alpha-level features&lt;/b&gt; that aren&apos;t ready for chill mode. Experimental features are listed below: &lt;br&gt; &lt;h4&gt;🌮 End-to-End Longitudinal Control 🌮&lt;/h4&gt; Let the driving model control the gas and brakes. openpilot will drive as it thinks a human would, including stopping for red lights and stop signs.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Updater</name>

@ -966,22 +966,10 @@ location set</source>
<source>Upload data from the driver facing camera and help improve the driver monitoring algorithm.</source>
<translation></translation>
</message>
<message>
<source>🌮 End-to-end longitudinal (extremely alpha) 🌮</source>
<translation>🌮 🌮</translation>
</message>
<message>
<source>Experimental openpilot longitudinal control</source>
<translation>使 openpilot </translation>
</message>
<message>
<source>&lt;b&gt;WARNING: openpilot longitudinal control is experimental for this car and will disable AEB.&lt;/b&gt;</source>
<translation>&lt;b&gt; openpilot (AEB)&lt;/b&gt;</translation>
</message>
<message>
<source>Let the driving model control the gas and brakes. openpilot will drive as it thinks a human would. Super experimental.</source>
<translation>openpilot將會模仿人類司機的駕駛方式</translation>
</message>
<message>
<source>openpilot longitudinal control is not currently available for this car.</source>
<translation>openpilot </translation>
@ -1014,6 +1002,18 @@ location set</source>
<source>Show map on left side when in split screen view.</source>
<translation></translation>
</message>
<message>
<source>Experimental mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;b&gt;WARNING: openpilot longitudinal control is experimental for this car and will disable AEB.&lt;/b&gt;&lt;br&gt; openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control on this car. Enable this to switch to openpilot longitudinal control.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source> openpilot defaults to driving in &lt;b&gt;chill mode&lt;/b&gt;. Experimental mode enables &lt;b&gt;alpha-level features&lt;/b&gt; that aren&apos;t ready for chill mode. Experimental features are listed below: &lt;br&gt; &lt;h4&gt;🌮 End-to-End Longitudinal Control 🌮&lt;/h4&gt; Let the driving model control the gas and brakes. openpilot will drive as it thinks a human would, including stopping for red lights and stop signs.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Updater</name>

@ -174,7 +174,7 @@ void ui_update_params(UIState *s) {
auto params = Params();
s->scene.is_metric = params.getBool("IsMetric");
s->scene.map_on_left = params.getBool("NavSettingLeftSide");
s->scene.end_to_end_long = params.getBool("EndToEndLong");
s->scene.experimental_mode = params.getBool("ExperimentalMode");
}
void UIState::updateStatus() {

@ -104,7 +104,7 @@ typedef struct UIScene {
QPointF lead_vertices[2];
float light_sensor;
bool started, ignition, is_metric, map_on_left, longitudinal_control, end_to_end_long;
bool started, ignition, is_metric, map_on_left, longitudinal_control, experimental_mode;
uint64_t started_frame;
} UIScene;

Loading…
Cancel
Save