Commit Graph

287 Commits

Author SHA1 Message Date
Adeeb Shihadeh 2293b4bcae update speedTooHigh alert sound (#21484)
old-commit-hash: 8dce135279c846a5f960e3d30dfe0afcc3f9ed0b
2021-07-04 19:23:09 -07:00
HaraldSchafer 7e87930a20 Refactor lateral lag compensation (#21334)
* add T_IDXS

* refactor

* fix test

* unused

* typo

* needs casting

* Update selfdrive/controls/lib/drive_helpers.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* deprecate field

* regen all

* new segs

* add todo

* split back

* clean

* bad names

* do in controls

* add arg

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 6838e1c82c5abb9f347228006219d96744b3fbb5
2021-06-30 14:19:39 -07:00
Adeeb Shihadeh b449a2a7d9 fix warning -> userPrompt
old-commit-hash: 8e36a7d07c29ecfb265cdf3218a2ae2402fbfa13
2021-06-28 21:46:26 -07:00
Adeeb Shihadeh 2c3d136d32 make speed too high alert orange
old-commit-hash: 880435f6a28cd30a45e37f09f2e493a32c0de618
2021-06-28 21:42:25 -07:00
Chris McCammon e8904916a6 steer unavailable below speed audible alert (#21209)
old-commit-hash: 317afa335f16deae21b6613203f8d92a31928a23
2021-06-17 14:10:24 -07:00
ShaneSmiskol 23ea456f4f Fixup joystick (#21129)
* some common changes

* rename to joystick

* add alert and update controlsd to work with joystick

* update joystickd

* Update Joystick readme

* assume we have inputs

* only send gb or steer when engaged_toggle is true

* Update instructions

* fix --ip

* Easier to understand at a glance

* much better

* -a

* receive events and send msg in same loop

* always import

* Update selfdrive/controls/lib/events.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Update selfdrive/controls/lib/events.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* combine logic and clean up

* use argparse

* outdated, and use normal class

* rm

* bit of a refactor

* refactor part 2 / 3

* much better (3 / 3)

* Simplify

* bump cereal and update readme

* capitalize

* Update tools/joystick/joystickd.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Update tools/joystick/joystickd.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* make joystick abstraction class clearer

* use interp, clearer without comments

* no need to use apply_deadzone

* more explicit

* define btns and axes once

* split function by use_keyboard again, but simpler

* we can use handle_button as a reset function

* need to flip sign

* remove

* invert axes map for kb, easier to read the button mapping

* apply changes from review

* new lateral log for debug mode

* bump

* add saturated

* static alert

* joystick_mode

* conditionally subscribe

* Update selfdrive/controls/controlsd.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* move params instantiation

* Spoof active and enabled

* Only allow car to engage

* no startup alert if joystick

* Update controlsd.py

* Should be orange not enabled, green enabled

* no more button states

* should work

* blue

* submaster conflates, so only send when we have an update

* final change

* remove msg

* clean up a bit

sort of clean up

clean up a bit

remove msg

* this was right

* Apply suggestions from code review

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* lowercase

* suggestions from code review

* forgot laptop

* bump to latest

* fixes

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: vanillagorillaa <31773928+vanillagorillaa@users.noreply.github.com>
old-commit-hash: ae77f693a26527ffbee044f852cc4185718c2433
2021-06-11 14:33:17 -07:00
Dean Lee 147b355dde add space after function name and if statement (#21225)
old-commit-hash: e4e669bb0fc1a919dfb38800099f8e3ad52346f1
2021-06-11 10:17:52 +02:00
Willem Melching eb0fdfecf1 Alerts documentation (#21172)
* Alerts documentation

* fingerprinting

* comment not necessary

* spelling

* openpilot

* Apply suggestions from code review

Co-authored-by: Chris McCammon <chrismccammon123@gmail.com>

* Apply suggestions from code review

Co-authored-by: Chris McCammon <chrismccammon123@gmail.com>
old-commit-hash: ec17fad41a851369383173530bdaa3dfbfc1c671
2021-06-09 10:58:01 +02:00
CrispinFlowerday 4f02e178db Subaru: show LDW on dash for correct lane (#20934)
* Emit correct alerts for LDW Left & Right on Subarus

This change switches the ldw event to use VisualAlert.ldw and
alters all cars to use the prior behaviour for that alert, except
global subarus - they emit the correct warning to the dash

* Remove whitespace, and add comment about not overwriting stock alerts

Co-authored-by: Crispin Flowerday <crispin@theflowerdays.com>
old-commit-hash: 7458e143e3c0123a95680b0b2db6c7a1f94405fa
2021-06-07 15:06:28 -07:00
Adeeb Shihadeh c2875eea66 fix mpc compilation (#21178)
old-commit-hash: 524aa55b93dbe883c8bdd69f5ca04f5a41e47386
2021-06-07 15:01:29 -07:00
Adeeb Shihadeh 5dfc430d47 startup alert for no fw returned (#21177)
old-commit-hash: d4ab1f1e274bc5e36b47fb9e6f76a977e04d1f1a
2021-06-07 14:15:09 -07:00
speedking456 2bcc0c0ada Add chime to lane changed blocked alert (#21159)
* Update carcontroller.py

* Lane change blocked orange + audible alert

* Actually make it make sound

* Update carcontroller.py

* leave priority the same
old-commit-hash: 24b6b4a341bbd02551756b3e0fd5ba2120e66eef
2021-06-07 01:38:08 -07:00
Adeeb Shihadeh e7cb6f6512 bump cereal
old-commit-hash: f2a9b134980e5ef7af86da71a13f01f2b23d017f
2021-06-04 16:06:57 -07:00
Willem Melching 51eb52fec4 Determine lane chane direction in preLaneChange state (#21119)
* Determine lane chane direction in preLaneChange state

* cleanup

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: de34d1a527799acd8dde755bdb6dba2d0625b096
2021-06-04 10:03:13 +02:00
HaraldSchafer f0f36a0a06 Many localizer resets alert (#21116)
* add excessive reset

* add alert

* add event
old-commit-hash: 1c926d23da0c73ceb246ca6d61db6ed1c48a1ab9
2021-06-03 09:26:53 -07:00
HaraldSchafer 5c5dfe5415 Safe interpolation in lane_planner (#20995)
* safe idxs

* make thread more safe
old-commit-hash: d6fcf6fa84bf897f4a2be7eff6a95d5431aa4853
2021-05-21 16:34:17 -07:00
Adeeb Shihadeh 41f8f5c7ce per camera alerts (#20992)
* per camera alert

* bump cereal

* cleanup

* space
old-commit-hash: 12ed986333856086c774b3142659dfbaecdf654b
2021-05-21 14:53:30 -07:00
Adeeb Shihadeh 340a080c3b alert for errors in camera stack (#20932)
* camera error alert

* check crcs

* cleanup

* bump cereal

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 2defc730db18f7f9c0b08b0c8b0f6806cc513ac4
2021-05-19 21:28:16 -07:00
Adeeb Shihadeh 29a2bef998 offroad alert for missing nvme (#20931)
* offroad alert for missing nvme

* remove that

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 313741062ea28a9d0601ff11399d20e9bd1a50bf
2021-05-17 13:35:24 -07:00
Adeeb Shihadeh 3fbeb1299e boardd: set can and pandaState valid flags (#20899)
* boardd: set can and pandaState valid flags

* add event

* bump cereal

* consistency
old-commit-hash: e694f0b4d6f8cfe55e2c8d36a78cf86fe0c86f1a
2021-05-14 21:26:02 -07:00
Adeeb Shihadeh 8002b848b6 offroad alert for unregistered devices (#20870)
* offroad alert for unregistered devices

* update tests

* add param

* fix stretch
old-commit-hash: b93ccc465dbc8b847b65f7d062182465344dac4d
2021-05-11 03:18:45 -07:00
Dean Lee e333e4f189 Cleanup selfdrive/ includes (#20822)
* cleanup include path

* continue

* format includes

* fix testraw.cc

* remove include path from SConstruct

* regroup

* rebase master

* almost done

* apply review

* rename FileReader.xx to filereader.xx

* rename Unlogger.x->unlogger.x

* rename FrameReader.xx -> framereader.xx

* apply reviews

* ui.h

* continue

* fix framebuffer.cc build error:mv util.h up

* full path to msm_media_info

* fix qcom2 camerad

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 7222d0f20dc8edfe0d2f3417d1ce7c84fbd32805
2021-05-08 22:15:17 -07:00
Willem Melching 523c00acdc Improve community feature alert text (#20803)
old-commit-hash: b38e57eb2b1c5b6b438fb238b1752f40b4a9e188
2021-05-03 11:59:01 +02:00
Adeeb Shihadeh ec7913cbe5 delay controls start (#20761)
* delay controls start

* shouldn't need this stuff anymore

* only delay board

* bail after 2s

* fix loopback test

* fix process replay

* update refs

* bump cereal

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: f9a961f6fb69f36f8a113246920b2d71e6af8ae1
2021-04-30 13:55:17 -07:00
Willem Melching 002057e1f1 Fix ability to change lane change direction while in progress (#20765)
old-commit-hash: a57f10c202fe7dc63023d45ef612c4ec849882ab
2021-04-29 13:03:16 -07:00
Adeeb Shihadeh cc29fdfed2 less harsh steering unavailable alert when overriding (#20718)
* less harsh steering unavailable alert when overriding

* just steer

* 1s

* orange

* update refs
old-commit-hash: 836668f1050e1dbc185af7d472e2016627711aeb
2021-04-20 21:01:28 -07:00
Willem Melching ee0e80a6d4 Fuzzy match on ECU FW versions (#20687)
* Fuzzy match on 3+ ECUs

* reuse dict

* exclude some shared ecus to be sure

* show alert for fuzzy match

* use title case

* require community toggle

* refactor

* do both exact and fuzzy in test script

* update test script

* add fuzz test and lower matches to >= 2

* strip alert length

* sort mismatches

* add fw tests to test_startup

* bump cereal
old-commit-hash: e4f73fbda5c2dd07cbb15816ac1bf30b010408fe
2021-04-20 12:00:36 +02:00
HaraldSchafer 3833a80305 MPC retune for laneless fix (#20616)
* was making wrong policy more aggresive

* allow to be set from simulator

* update refs

* put params together
old-commit-hash: 0e10b74a61a8e06e7a27b414b21bfe85be827698
2021-04-08 12:56:47 -07:00
Adeeb Shihadeh 99b2c0d024 Alerts update (#20567)
* steer temp unavailable should be a soft disable

* no mute

* these should be no entries

* sound

* better name

* deprecated

* make vehicleModelInvalid a soft disable

* update refs

* bump cereal

* bump cereal

* update refs
old-commit-hash: 2fa1b2572dfb63e367cfe2868da576090b227ca4
2021-04-07 12:18:58 -07:00
Willem Melching 00b19b6351 ecam toggle (#20597)
* use ecam in ui

* needs reboot

* use in modeld

* typo

* effective FL is longer in center

* normalize zoom by focal dist

* read param before init

* make 2x as wide

* review comments

* more explicit

* fix camera offset

Co-authored-by: ZwX1616 <zwx1616@gmail.com>
old-commit-hash: 1fc7bcca43e9ef75d95ae8689e3b1cd8c4f8041e
2021-04-07 19:12:35 +02:00
Willem Melching 8f4a445171 add putBool/getBool wrappers to cython params class (#20611)
* add putBool/getBool wrappers to cython class

* use new API

* some more puts

* fix mockparams arguments

* add get_bool to MockParams

* typo
old-commit-hash: ae094042ade44815fdba50196c15ba552bbf33d7
2021-04-07 15:36:37 +02:00
HaraldSchafer 1d36adf351 no heading cost (#20594)
* no heading cost

* live mpc weight config

* need to add stds

* make work on empty data

* no divide by 0

* update refs

* update model replay

* update proc replat

* new model replay ref
old-commit-hash: d72d433ec7a3c9f0bb2f90d196b3826d48d9b1a0
2021-04-06 23:49:29 -07:00
Adeeb Shihadeh 7850141e1a lower min lane change speed to 30mph (#20586)
* lower min lane change speed to 30mph

* update refs
old-commit-hash: 2319d726fbc81d949fc7313c7536a7f5e2e7e8c5
2021-04-05 15:38:53 -07:00
Adeeb Shihadeh 092db4eadc show persistent dashcam mode alert (#20483)
* always show dashcam mode alert

* show persistent dashcam mode alert

* lowest

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 367aec54d1c4c5ed8d3f651d0b2f8b80fb0ac0e5
2021-03-25 21:37:38 -07:00
HaraldSchafer eae1fa481c New KL model + laneless toggle (#20454)
* New model: 0bf38240-6b55-42b0-bcfb-da08ff5cd0b9/650

* laneless baby

* hardcode model difference for now

* kale toggle

* kale emoji

* sensible description

* make clear it is not just for ui

* emojis dont work yet

* 9671a8fe-539f-4a04-a163-54571df21139/650

* new model

* only read param on rising edge of ignition

* update toggle text

* fix that

* update refs

Co-authored-by: mitchell <mitchellgoffpc@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 7ee79c99236f749d02a6779b006ee1ab187e0612
2021-03-24 01:10:31 -07:00
Adeeb Shihadeh 5cfc42911b Remove lane change toggle and default LDW to off (#20442)
* remove lane change toggle and default LDW to off

* update refs
old-commit-hash: 43ce7165c4eee9af167a650decdb8c3f11195d8d
2021-03-22 20:55:57 -07:00
HaraldSchafer c07a1ad57b Sane curvature rate limit in plannerd (#20366)
* safety limit

* should be in RADs

* add raw

* update refs
old-commit-hash: 27035131cc97afdf19f682911f580bd689493794
2021-03-16 15:00:03 -07:00
Willem Melching f1dc58a5f6 make vehicleModelInvalid a NoEntry
old-commit-hash: 2ca5bf99920dd20162957f1897b461e6db746444
2021-03-15 12:15:27 +01:00
Willem Melching 4bd1929d2b LateralPlanner should only compute curvature (#20289)
* get curvature from planner

* no need to check active

* remove that

* remove self

* liveParams not needed

* cast

* fix test bug

* fixes

* fix ui.py

* fix radians

* update refs

* update refs

* bump cereal

* bump cereal

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: c23ec9f75389c9ad86400e9a9d23ee6bc5b648a2
2021-03-11 21:08:51 -08:00
HaraldSchafer 7b243b8747 Better high speed alert message (#20322)
old-commit-hash: 0223578461bd30ef3a388891ede60c8e0d01cf8d
2021-03-11 17:01:29 -08:00
wolterhv 56f48a03bc Replace hardcoded values for Pi (#20235)
* Avoid redefining pi, use instead math.pi or M_PI from math.h

* Revert overwriting of the gpsPi variable, which is part the GPS standard.

* Move standard library imports to top, remove standard library import comments.
old-commit-hash: 93911a7dbedcd06383cb9fea94ed78133442f687
2021-03-03 14:22:06 -08:00
Marius Larsen 3879b9dfc8 Fxing some typos in vehicle_model.py comments (#20220)
old-commit-hash: e998d6d93f786733468756d51df2d11494389d7c
2021-03-03 11:40:22 +01:00
Willem Melching ddc95515d0 only allow INDI wind down on user override (#20080)
old-commit-hash: 280192ed1443f112463417c2d815ea8ee2762fbd
2021-02-23 16:39:40 -08:00
HaraldSchafer e88b2ecfeb Always linearize, better way of compensating for lag (#20133)
* need to divide diff by 2

* simple linearization seems to work best

* update refs
old-commit-hash: 8df76b398021827c18b19a4d1437b671dd859223
2021-02-23 12:56:12 +01:00
HaraldSchafer df9381abd4 Do not allow engagement outside of training distribution (#20112)
* higher is out of the training distribution

* Update RELEASES.md

* Update RELEASES.md

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: a0cdacbb2ad6a26012ca374723539e838488dcc5
2021-02-18 17:16:20 -08:00
Adeeb Shihadeh 05eb44115e cereal cleanup part 2 (#20092)
* car stuff

* thermal

* Revert "car stuff"

This reverts commit 77fd1c65ebd01abfa8493ae12c9e6b14f7ada976.

* panda state

* camera stuff

* start deg

* most is building

* builds

* planner + controls run

* fix up paramsd

* cleanup

* process replay passes

* fix webcam build

* camerad

* no more frame

* thermald

* ui

* paramsd

* camera replay

* fix long tests

* fix camerad tests

* maxSteeringAngle

* bump cereal

* more frame

* cereal master
old-commit-hash: 312b681a46b8153314a8420611b6479dd6f70dfc
2021-02-16 21:39:32 -08:00
Igor bebc21ca09 Fix division by zero in lateral_planner.py (#20071)
* Fix division by zero

* Change fix logic
old-commit-hash: 8f9ee10b8a1aeeac26c5b269c1137984b172b378
2021-02-16 11:43:11 +01:00
HaraldSchafer 2f66f98523 fix low speed lateral (#20053)
* fix low speed lateral

* update ref

* fix failing CI jobs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 0c900c8ce11409ddf574f5b7ff7bbab8b5536c36
2021-02-09 15:36:58 -08:00
HaraldSchafer 5092214913 Different lag comp (#20024)
* more sensible

* different names for different segs

* new ref

* this is checked somewhere
old-commit-hash: c3707328f51c4cec051b375a195b41d7456d27a6
2021-02-05 14:01:22 -08:00
HaraldSchafer 61b3840c7f camera offsets (#20022)
* camera offsets

* runs on pc so is 0 in proc replay
old-commit-hash: bad68e466316a75f3c7b34c4e6f911f33e01b1c0
2021-02-04 15:50:53 -08:00