Commit Graph

289 Commits

Author SHA1 Message Date
HaraldSchafer 3afc818433 Long policy: strictly squared stopped equivalence function (#23118)
* new ref

* never let lead stopped equivalence go down

* no overbraking

* stricter again

* cleanup

* updated refs
old-commit-hash: 0dcdf9c30fdb14e907015cb2b0195238e6121b05
2021-12-03 16:12:30 -08:00
Willem Melching 23ef06428a add desired angle to log (#23115)
* add desired angle to log

* update ref

* bump cereal
old-commit-hash: bbd0f94d9d72e86fec79269b9decd424d0050872
2021-12-03 21:35:34 +01:00
Willem Melching b8ab21bd64 add CarParams.wheelSpeedFactor (#23079)
* add CarParams.wheelSpeedFactor

* Fudge speed for Lexus RX

* should have been the TSS2 model

* bump cereal

* refactor into function

* update refs
old-commit-hash: e6180738fdc4c55ba913905e6591de5435966eb1
2021-12-03 14:57:53 +01:00
HaraldSchafer c6964152bb Reaction buffer on follow distance (#23112)
* Reaction time buffer

* new ref
old-commit-hash: 5b0e10ea33e89fb1c8132cf9014a3a927e93bd6f
2021-12-02 23:56:02 -08:00
HaraldSchafer 08ac1b33ba Human inspired follow distance (#22937)
* Add cost for creep

* more reasonable cost

* seems better than before

* science tune

* more chill

* closer follow

* stopping takes some leeway

* better cruise

* needed to be cumsum all along

* jerk not even needed

* matches better

* 6 is too much

* add back

* a little extra buffer is good for badly tuned cars

* new refs

* refs again
old-commit-hash: 46fd5892bf41add3dc15d413bced81693d0f8853
2021-12-02 14:42:13 -08:00
Adeeb Shihadeh 6c2182c026 Newer sounds (#23091)
* new prompt sound

* padding

* prompt distracted

* debug

* fix spelling

* lower min volume

* better volume at low speeds

* revert debug

* revert that

* fix tests

* update refs

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 3b367e68728c29eea057d99f3948d64ed6cbfa92
2021-12-02 00:28:25 -08:00
HaraldSchafer e3f9919b5c Set accel trajectory to a_ego when not engaged (#23100)
* Set accel trajectory to a_ego when not engaged

* update ref
old-commit-hash: 68015f75ed7f60a5901af728d31b6c11b98edbf4
2021-12-01 23:12:11 -08:00
Adeeb Shihadeh dccb8b4010 New sounds (#22652)
* new engage/disengage + amp config

* first family

* cleanup audible alerts

* tici isn't special

* fix up debug cycle alerts

* these were better

* extend range

* use distracted sound

* log scaling

* getting closer

* slightly louder

* prompt

* update tests

* update refs

* fix c2 test

* resolve todo

* adjust tolerance

* revert for now

* should work

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: e679d05d9e98e267047c21c0b6b67fe9d61f8ed6
2021-11-30 19:47:33 -08:00
HaraldSchafer 4d9d215996 Toyota pedal rewrite (#23067)
* pedal redo

* add offset to compensate for creep and windbrake

* offset in standard units

* wrong size

* better creep values

* update ref
old-commit-hash: eda69930430da564251581814fd3962ca7af0372
2021-11-30 10:50:06 -08:00
HaraldSchafer fb1cf5b1bf Longcontrol : pid error should be 0 when plan is followed (#23066)
* v_pid error should be 0 when plan is followed

* update ref
old-commit-hash: 048cc3ac9f86ed2b3b9fe82cb28ec243cc8e7bac
2021-11-29 15:22:02 -08:00
Vivek Aithal d537897e9a locationd: Fix Nav localization reliability (#22959)
* modify reset logic

* remove debug statements

* use ecef pos and vel covariances during reset

* reset orientations initialized to 0,0,GPSbearing

* refactor nav fix

* add fake gps observations to control ecef pos and ecef vel std

* replace fake_P with individual fake cov

* set gps mode flag

* add gps invalid flag names

* update refs

* more accurate gps accuracy check + update refs
old-commit-hash: 8b6a14758329eb977beb5cba73403dd113495aeb
2021-11-24 15:24:25 -08:00
Adeeb Shihadeh ec6eb5b582 process replay: add cx9 route to migration list
old-commit-hash: 5bcb4c03581fac92dd1418ed94b5125d180461e9
2021-11-24 14:08:46 -08:00
Adeeb Shihadeh e9f5b17ed1 update refs for new mazda name
old-commit-hash: eb55226c2bc53b787834eb51997d2df1900cc892
2021-11-24 13:31:02 -08:00
Vivek Aithal 16d9fcbd80 Revert ecef std until real fix (#22982)
* too low

* update refs

Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
old-commit-hash: 94d59314e28c484c8a4a9fb36c8ab659ea79da57
2021-11-19 12:49:32 -08:00
HaraldSchafer 6eb5dce881 Lateral planner: lower max cost (#22960)
* prevent ping pong when tuning is not so great

* update refs
old-commit-hash: 24aadaf1f35d61f26637377bc353539d25989f94
2021-11-17 20:24:10 -08:00
HaraldSchafer 345d52e957 Add cost to long plan change for smoother lag comp (#22923)
* add plan changing cost

* fix compile

* set weights

* try this cost

* horizon problem

* looks pretty good

* update refs

* update refs

* smoother plan changes
old-commit-hash: b3b45c8d29d0afb741c829fea8145fb47ffa7462
2021-11-16 17:57:55 -08:00
Adeeb Shihadeh 5247da772d update refs after alert disable
old-commit-hash: f262725705c8cd5bfb46cf5c6e893432e5743cc0
2021-11-15 21:45:18 -08:00
Adeeb Shihadeh 9f84f9ad97 put cruiseMismatch event in logging only mode
old-commit-hash: 33022390138df73199ac626cb7b5ab7fac1a89a6
2021-11-15 21:16:54 -08:00
Vivek Aithal 27a6dc0c08 locationd : Acceleration Bias in locationd (#22879)
* add accel bias to filter for offline calculation

* bugfix acc bias in live_kf

* add no_accel obsertvation

* increase initial certainty of acc-bias and reduce PN

* increase initial certainty of acc-bias and reduce PN

* increase accel bias PN

* increase obs noise for no_accel observation

* style fixes

* update refs
old-commit-hash: 534bf697eeb3b72643abc713649ce2eef5f75820
2021-11-12 15:55:16 -08:00
HaraldSchafer d17ec32e0b Give car interface roll and pitch (#22891)
* Give car interface roll and pitch

* fixup

* whitespace
old-commit-hash: a04114f68c118caae5d9b3e19e70e885e87544ff
2021-11-12 12:21:22 -08:00
Vivek Aithal d49fbbfbed locationd: Set ECEF_POS valid flag to false if in no-gps mode (#22857)
* set ECEF_POS valid flag to false if in no-gps mode

* modify valid flag for all ecef states before gps

* add calibrated valid when no gps

* update refs

* remove extra whitespace

* add invalid flag to all NED values pre gps

* update refs

* update correct refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: c7be73b826b21947197f24c6a60fc5a7098e42af
2021-11-11 21:34:17 -08:00
sshane 9c994173ed Longcontrol: do not clip vEgo to minSpeedCan (#22832)
* fix tss2 slow reacceleration in sng

(should) preserve stopping behavior

add comments since it's confusing

fix

* Revert "fix tss2 slow reacceleration in sng"

This reverts commit 42abde0eb945d8bc5ad9b502d1d89b3e3dc16f8a.

* don't max(vEgo)

* update ref

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: bdaea086f8bd5ea079c4ea98abc5a3d48ca08401
2021-11-11 13:24:38 +01:00
Adeeb Shihadeh a142638899 increase engagement alerts duration
old-commit-hash: 327464fb845dd01533f390ac89d9fd78fbfb02d7
2021-11-10 22:11:14 -08:00
Adeeb Shihadeh d6c42f11f4 controlsd: alert on cruise mismatch for >1s (#22841)
* controlsd: alert on cruise mismatch for >1s

* bump cereal

* update refs

* bump allowed soundd cpu

* bump cereal
old-commit-hash: 035bc0c20fd27490cc353a33f3c373201288a10a
2021-11-10 13:01:42 -08:00
Adeeb Shihadeh 448d5f9e93 alerts: use a single duration for sound, text, and HUD (#22856)
* alerts: use a single duration for sound, text, and HUD

* little cleanup

* update refs
old-commit-hash: c5d6b85c9014386b8d1cb2a17f8767abef3afd57
2021-11-10 11:54:12 -08:00
Adeeb Shihadeh 450471058b controlsd: optimize alert management (#22846)
* controlsd: optimize alert management

* little cleanup

* dataclass is nice

* fix tests

* update refs

* sort by start frame

* update refs

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 93ba52c76c20baf36e07c25d28a98bc8e9ea6219
2021-11-10 10:54:18 -08:00
Jason Young a283e88f37 Fix momentary false blind spot alerts when changing lanes (#22819)
* reset LaneChangeDirection after finishing

* update ref

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 2006fff2b66329e2d11300691301bf7a4531b18a
2021-11-10 17:21:36 +01:00
HaraldSchafer caa01d2f95 ACADOS: partial condensing (#22830)
* partial condense

* new refs

* new ref

* newerest refs
old-commit-hash: 35d6ed10148adbb07c2a4b0c787342b6e101aa05
2021-11-09 19:29:55 -08:00
Jafar Al-Gharaibeh 6c74dc1366 Mazda: disable hud alerts until we find a way to silence audible alerts (#22808)
* Mazda: disable hud alerts for now until we find a way to silence audible warnings

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Mazda: add hud alert for steer lockout

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* show when above min steer speed

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 2621e5301da0e10a70a68672db5052ea5037db9b
2021-11-09 15:24:18 -08:00
Vivek Aithal 6bc1c7b502 locationd: Make live_kf robust to no GPS (#22774)
* add no gps observations

* use correct ecef_location, orientation vals and stds for nogps states

* remove earth radius obs

* move initial loc to the ocean

* remove unnecessary changes

* update refs
old-commit-hash: 5c810a45b0e7614bfbd7a1b6898547df499964e0
2021-11-09 14:45:47 -08:00
Jafar Al-Gharaibeh 24d1105a2a Mazda: fix occasional steer fault at initial lkas enable (#22806)
* Mazda: fix occasional steer fault at initial lkas enable

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 8c38e9c49e23d6e1030d9c302ae2cc404e5cc6b7
2021-11-08 14:40:26 -08:00
sshane 8472503305 Toyota: handle brake hold (#22810)
* disallow engagement if brake hold active

* we can check once

* move to common events

revert

* fix

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: a0e5eccb70ac9209307d0994252f5bf089ae48ae
2021-11-08 14:26:30 -08:00
cydia2020 02f6ca414a Toyota: Increment by 5 km/h (5 mph) on long press (#22678)
* Allow 5km/h speed increments on Toyota

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: d66f0fcc8773efd746fbe68a6f75614f731206fc
2021-11-04 14:53:32 -07:00
Adeeb Shihadeh e0456c4989 Mazda: move CX-9 out of dashcam mode (#22717)
* move cx9 out of dashcam

* no alc below 28

* process replay route
old-commit-hash: 2252c6bba76c15916dcc91aa4da95fa77be65302
2021-10-31 22:02:36 -07:00
Robbe Derks dbe4641e04 Multipanda support (#22402)
* squash all PR commits for easy rebase

* merged all panda rx can into one message

* fix buffers in can_send

* more cleanup and minor fixes

* fix even more stuff

* fix non-allocated send buffer

* make connecting more robust

* fix bus offset

* fix controls_mismatch?

* simplify mismatch check

* C++ style struct

* fix connect loop

* update ref

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 585c16cd2aba6e2504c2427aaf1855b97035eb41
2021-10-29 13:04:26 +02:00
Jason Young a399abf438 GM: EPS fault workaround (#22404)
* seems legit

* panda -> loopback

* fix comment

* add some "why" comments for the next guy

* re-test with stock 50Hz rate

* ugly test

* Update selfdrive/car/gm/carstate.py

Co-authored-by: qadmus <42746943+qadmus@users.noreply.github.com>

* update refs

* Update selfdrive/car/gm/carstate.py

Co-authored-by: qadmus <42746943+qadmus@users.noreply.github.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: b49f518782436f2d58ae6c6b11956b4625d28441
2021-10-28 16:54:12 -07:00
Robbe Derks 39d9bd31b0 Make longitudinal planning triggered on model (#22641)
* Make long planning triggered on model

* fix process replay

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: efb5abec41e349e4a8a667b96f6265825f75a2ce
2021-10-28 12:27:09 +02:00
Vivek Aithal b16c806e9e plannerd: add useLaneLines to lateralPlan (#22699)
* add laneless toggle in lateral plan message

* update cereal

* add refs
old-commit-hash: 2ea4feffb9a70483eee63331f91962ce6e51d485
2021-10-26 14:32:41 -07:00
Adeeb Shihadeh 05aa510c25 always show lane lines on HUD (#22693)
* always show lane lines on HUD

* update refs
old-commit-hash: f2b48a1803eed1512962ee80e0f4c9718f40d44b
2021-10-25 23:47:12 -07:00
qadmus b88eea00b5 GM: improved Volt lateral tuning (#22621)
* GM Volt lateral tuning and feedforward function

* improve comments, lower P 5% to 0.17, which matches all my notes over time, 0.18 was a last test change.

* don't justify actuator delay for now

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 2e0bc9d3653defb51e229d45e0c68447c51785a4
2021-10-21 14:10:41 -07:00
cydia2020 85bfd29c72 Toyota longitudinal: Illuminate PCS Warning Light If DSU is Unplugged (#22631)
* display amber "PCS Off" indicator when DSU is unplugged

* Update opendbc

* update ref

* Update opendbc

* update ref

* bump opendbc

* bump opendbc

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 9a2ecec1a839e063347d0cbbb563ffaf28dba40e
2021-10-20 15:41:31 -07:00
cydia2020 260b065e0e Toyota longitudinal: display PCS off when DSU is unplugged and no SDSU is found (#22626)
* display pcs off in car settings when DSU is unplugged

* Update opendbc

* fix checks

* bump opendbc

* use 0

* update refs

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 0b6b9b595ddf646dd3afb9e64a1cae28737468e7
2021-10-19 22:01:47 -07:00
ZwX1616 d4cbef299b wider FOV DM on comma three (#22286)
* c3 is straightforward

* c2 transform

* c3 preview

* alpha model

* Revert "alpha model": wrong quantization data

This reverts commit b50e5739735b30d960aca22bcf3cbe23b0121e13.

* yuv looks good

* a55b

* const int

* block top deadzone

* new box alpha curve

* update k

* fix debug

* rhd use same offset

* box shift for rhd

* 7e3e

* set new thresh

* update ref

* explain

* remove e2e

* same metric thresh

* process isocc

* model

* cancel extra policy

* update numbers

* new model

* update cereal

* up cereal

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 8574e79fecff6dba6c68486b627c73499d4b3d03
2021-10-13 17:00:46 -07:00
HaraldSchafer b7aba92661 Remove accel cost in long MPC (#22527)
* ACCEL not useful

* new ref
old-commit-hash: c4510024da75b7684cdfb300aaab639078b3f62b
2021-10-11 17:20:40 -07:00
HaraldSchafer 4814c30667 ACADOS fix non-convergence when long_plan changes (#22495)
* debug commit

* cleanup

* some indexing bugs

* need more its

* BALANCE is way better it seems

* fix test

* this converges in 2000segs

* new ref

* less cpu
old-commit-hash: 04cf12cb0064f42e507fd6ae907564cecf140d28
2021-10-10 00:05:29 -07:00
Robbe Derks 58c99158a1 Make pandaState and safetyMode a list (#22454)
* wip: move to pandaStates

* bump cereal

* wip: SafetyMode struct

* move to safetyMode

* fix typo

* this can be None

* fix potential empty pandaStates list

* fix thermald

* fix controlsd

* rename safetyModes to safetyConfigs

* update process_replay

* fix test_models

* bump cereal
old-commit-hash: 91987f38d425e2a5dc61d09571933cffb9536113
2021-10-08 17:54:34 +02:00
Vivek Aithal 9f96d63520 paramsd: Sort messages in each update iteration before processing (#22403)
* sort livelocationKalman and carState messages in each update iteration before processing

* update refs

* update refs

* update refs

* update again

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 83a53618b3a04377ee55561da7460a6f5da7d8d1
2021-10-07 18:21:11 -07:00
Willem Melching 6dea543246 Honda Bosch longitudinal tuning (#22407)
* revert changes to standstill logic

* start with mostly open loop

* Revert "revert changes to standstill logic"

This reverts commit d737d858e7708aedaf09cfc068b85398161e9bbe.

* proper clipping

* less lag

* less gas command

* start gas from -0.2

* controls should take care of that

* use CarControllerParams

* switch to braking sooner

* Revert "switch to braking sooner"

This reverts commit cf11dae334ccb369f625d4b13b7cd4176156a446.

* 2.5x more P

* use active

* engage on rising edge

* Revert "engage on rising edge"

This reverts commit c972956cb460eedaff3d0169a40673a6ea933385.

* update ref
old-commit-hash: 6c29a4c7fb83f9a4935d6003970b6b3442cccfd8
2021-10-07 16:37:02 +02:00
HaraldSchafer 5a1e44c417 Long MPC cleanup (#22462)
* cleaner extrapolation

* some comments

* new ref

* more comments

* new ref
old-commit-hash: a4bc1bbb74a1560d196a8e5f207c4e39f4464130
2021-10-06 17:51:23 -07:00
Vivek Aithal c0ff654602 Add paramsd Stdev to message (#22443)
* add STD to message

* use modified names for car_kf state stdev atttributes

* update refs

* add modofied cereal

* update refs
old-commit-hash: 244fbde56e90a937c887b3a24edce7da2ee5c699
2021-10-06 16:22:18 -07:00