Commit Graph

524 Commits (master)

Author SHA1 Message Date
sshane 737a79e556
longitudinal comments (#21898)
* cmt

* Update longcontrol.py
2021-08-11 01:33:59 -07:00
Mitchell Goff 3022f68fa7
Update long_mpc api for use with sim (#21890) 2021-08-10 10:51:38 -07:00
Adeeb Shihadeh 8aafbc78f6 add that back 2021-08-06 15:48:16 -07:00
HaraldSchafer aa689176fc
Cleaner lane change alerts (#21857)
* less is more

* small

* remove HUD warnings

* update ref

* safe

* update refs

* update again

Co-authored-by: Willem Melching <willem.melching@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-08-05 14:23:27 -07:00
sshane c900bce1b0
Use first order filter (#21411)
* Use first order filter in INDI

* use first order filter in LP as well

* Update selfdrive/controls/lib/lane_planner.py

Co-authored-by: Willem Melching <willem.melching@gmail.com>

* RC->rc

* division safe

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-08-03 13:47:46 +02:00
Adeeb Shihadeh fb028041cd
remove alert for stock fcw (#21834) 2021-08-02 21:59:03 -07:00
Mitchell Goff 15d6bbb47c
Revert "New desire model (#21729)" (#21805)
* Revert "New desire model (#21729)"

This reverts commit e83973b9b3.

* Updated process replay ref and reverted release notes
2021-07-30 14:34:29 -07:00
Adeeb Shihadeh 03255d83be increase controls initializing timeout a bit 2021-07-28 15:50:40 -07:00
Mitchell Goff e83973b9b3
New desire model (#21729)
* New model: b822ee32-917c-4639-99f8-25be3e6aabad/900

* Enable keeps

* use new packet

* Send keep pulses once per second

* Updated model_replay_ref_commit

* New model: 0f160bf9-1bce-43e6-9785-564b2453eeac

* Bump model_replay_ref_commit

* Bump submodules

* New model: fd904bf9-5dd8-4619-8997-c5668400e078/550

* New model: fd904bf9-5dd8-4619-8997-c5668400e078/950

* No keeps

* Bumped model replay ref

Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
2021-07-26 21:11:09 -07:00
HaraldSchafer 4bd4ed4999
safer low speed (#21705) 2021-07-25 15:15:50 -07:00
Adeeb Shihadeh 7c3b7b5348
increase timeout for controls init (#21680)
Co-authored-by: Comma Device <device@comma.ai>
2021-07-22 00:04:00 -07:00
HaraldSchafer 049a1bca34
Better localizer unstable alert (#21660)
* use canonical language

* filter out when gps signal is flaky

* Update selfdrive/locationd/locationd.cc

Co-authored-by: Willem Melching <willem.melching@gmail.com>

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-07-20 19:20:00 -07:00
HaraldSchafer ef0b120a9a
add jerk to longitudinal plan (#21598)
* add jerk output, so its like lateral

* typo

* add to packet

* update cereal and ref
2021-07-14 11:51:48 -07:00
HaraldSchafer 5d07819084
Taper off high speed accel (#21599)
* max 0.2 diff from before to preserve bad tuned cars

* update ref
2021-07-14 10:53:14 -07:00
HaraldSchafer 6a93346729
fix low speed override bug and cut-in bug (#21593)
* fix low speed bug and cutin bug

* update ref
2021-07-13 23:36:25 -07:00
HaraldSchafer fd41e9f01b
Lower speed for lowest planned acceleration (#21578)
* 55mph sounds about right

* update refs
2021-07-13 14:22:06 -07:00
Adeeb Shihadeh 88424ede2c
Revert model (#21571)
* Revert "New desire model (#21458)"

This reverts commit 4230d5d212.

* revert rel notes
2021-07-12 19:26:50 -07:00
HaraldSchafer a42d8f3a14
less accel (#21565)
* less accel

* new refs

* Update longitudinal_planner.py

* update refs
2021-07-12 18:30:56 -07:00
Jafar Al-Gharaibeh ff704e18b7
Car Port: Mazda CX-9 2021 (#20864)
* Mazda CX-9 no steer lockout, and newer cars can use more torque

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

* Mazda CX-9 2021 test route

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

* cleanup

* more cleanup

* don't show community features alert if dashcam only

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-07-10 23:50:03 -07:00
Adeeb Shihadeh cb7e96f99d
rename enableCruise -> pcmCruise (#21546) 2021-07-10 13:56:11 -07:00
Adeeb Shihadeh b4fc208166
move fuzzy fingerprinting out of community features (#21542) 2021-07-10 13:23:39 -07:00
Adeeb Shihadeh 092c728e76
fix unnecessary harsh steering unavailable alerts (#21541) 2021-07-10 01:53:14 -07:00
HaraldSchafer 148c202bc4
less np (#21536) 2021-07-09 11:34:00 -07:00
HaraldSchafer 4230d5d212
New desire model (#21458)
* New model: b822ee32-917c-4639-99f8-25be3e6aabad/900

* Enable keeps

* use new packet

* Send keep pulses once per second

* Updated model_replay_ref_commit

* New model: 0f160bf9-1bce-43e6-9785-564b2453eeac

* Bump model_replay_ref_commit

Co-authored-by: mitchell <mitchellgoffpc@gmail.com>
2021-07-07 19:44:17 -07:00
HaraldSchafer be5ddd25cd
Refactor long (#21433)
* refactor

* needs casting

* tests pass

* fix that test

* refactor in controls

* lets not go crazy

* change of names

* use constants

* better naming

* renamed

* soft constraints

* compile slack variables

* rm git conflict

* add slack variables

* unused

* new edition

* fcw

* fix tests

* dividing causes problems

* was way too slow

* take a step back

* byeeee

* for another time

* bad idxs

* little more cpu for cruise mpc

* update refs

* these limits seem fine

* rename

* test model timings fails sometimes

* add default

* save some cpu

* Revert "little more cpu for cruise mpc"

This reverts commit f0a8163ec90e8dc1eabb3c4a4268ad330d23374d.

* Revert "test model timings fails sometimes"

This reverts commit d259d845710ed2cbeb28b383e2600476527d4838.

* update refs

* less cpu

* Revert "Revert "test model timings fails sometimes""

This reverts commit e0263050d9929bfc7ee70c9788234541a4a8461c.

* Revert "less cpu"

This reverts commit 679007472bc2013e7fafb7b17de7a43d6f82359a.

* cleanup

* not too much until we clean up mpc

* more cost on jerk

* change ref

* add todo

* new ref

* indentation
2021-07-07 19:42:26 -07:00
Adeeb Shihadeh 685e33c067
improved commIssue logging (#21515) 2021-07-07 18:43:41 -07:00
HaraldSchafer 2aadf8beb2
Remove DM high std alert (#21501)
* cleaner

* no face and high stds is the same

* change test

* final clean

* need to deprecate
2021-07-07 17:08:55 -07:00
Adeeb Shihadeh c72d163e14
deprecate CP.enableCamera (#21509)
* deprecate CP.enableCamera

* more removal

* one more

* update refs
2021-07-07 14:59:18 -07:00
Adeeb Shihadeh 8dce135279
update speedTooHigh alert sound (#21484) 2021-07-04 19:23:09 -07:00
HaraldSchafer 6838e1c82c
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>
2021-06-30 14:19:39 -07:00
Adeeb Shihadeh 8e36a7d07c fix warning -> userPrompt 2021-06-28 21:46:26 -07:00
Adeeb Shihadeh 880435f6a2 make speed too high alert orange 2021-06-28 21:42:25 -07:00
Adeeb Shihadeh a420c7ad50
remove lte toggle (#21392)
* remove lte toggle

* little more
2021-06-23 17:01:17 -07:00
Willem Melching a8fac002ae
Honda Bosch longitudinal prerequisites (#21217)
* untested changes

* set compute_gb

* community feature for good measure

* add code for rolling backwards

* init needs CarParams

* stay in elm mode until carParams is written

* fix tester present bus number

* fix can errors

* fix enableCruise flag

* print when radar disable is done

* move retry logic to controlsd

* move lookup table into carcontroller params

* cleanup brake error values

* make init return

* that should be 1

* floats

* back to no failure handling

* try simplify knockout

* bump panda

* Move flags to panda

* add warnings

* Revert "try simplify knockout"

This reverts commit 4f496245791ea6bd041d4412b96035c6b434b91c.

* add note about LoC.long_control_state

* update ref
2021-06-22 16:28:11 +02:00
Chris McCammon 317afa335f
steer unavailable below speed audible alert (#21209) 2021-06-17 14:10:24 -07:00
Willem Melching 7b0d27e612
Don't check RAM/disk in simulation (#21261)
* Don't check RAM/disk on PC

* simulation
2021-06-16 11:59:15 +02:00
ShaneSmiskol ae77f693a2
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>
2021-06-11 14:33:17 -07:00
Dean Lee e4e669bb0f
add space after function name and if statement (#21225) 2021-06-11 10:17:52 +02:00
Willem Melching ec17fad41a
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>
2021-06-09 10:58:01 +02:00
CrispinFlowerday 7458e143e3
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>
2021-06-07 15:06:28 -07:00
Adeeb Shihadeh 524aa55b93
fix mpc compilation (#21178) 2021-06-07 15:01:29 -07:00
Adeeb Shihadeh d4ab1f1e27
startup alert for no fw returned (#21177) 2021-06-07 14:15:09 -07:00
speedking456 24b6b4a341
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
2021-06-07 01:38:08 -07:00
Adeeb Shihadeh f2a9b13498 bump cereal 2021-06-04 16:06:57 -07:00
Willem Melching de34d1a527
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>
2021-06-04 10:03:13 +02:00
HaraldSchafer 1c926d23da
Many localizer resets alert (#21116)
* add excessive reset

* add alert

* add event
2021-06-03 09:26:53 -07:00
Adeeb Shihadeh 6fa573a2d6 fix camera error indices 2021-06-01 16:56:33 -07:00
Jafar Al-Gharaibeh 824f93303d
Mazda FP 2.0 support (#20879)
* Mazda FP 2.0 support

ECU FW for CX-5 2017 and Mazda3 2017

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

* Use standard UDS request/reponse, fix missing arg.

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

* Add CX-5 FW test

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

* update/add FW FP

Current suported models:
  CX-5 2017/2021
  CX-9 2019/2020
  Mazda3 2017/2018

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

* Add Cx-9 2019 FW FP

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

* Remove comments, remove TESTER_PRESENT_REQUEST from Mazda

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

* add transmission ecu to startup test

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
2021-05-28 15:50:58 +02:00
Adeeb Shihadeh e1d7a1af10 fix low memory on tici 2021-05-26 19:47:10 -07:00
Adeeb Shihadeh 726fb9d501
Move CAN fingerprinting behind community features (#20993)
* Move CAN fingerprinting behind community features

* fix typo

* fix startup test

* fix
2021-05-24 19:21:58 -07:00
HaraldSchafer d6fcf6fa84
Safe interpolation in lane_planner (#20995)
* safe idxs

* make thread more safe
2021-05-21 16:34:17 -07:00
Adeeb Shihadeh 12ed986333
per camera alerts (#20992)
* per camera alert

* bump cereal

* cleanup

* space
2021-05-21 14:53:30 -07:00
Adeeb Shihadeh c04b47938d
stricter memory usage check (#20985) 2021-05-21 11:25:11 +02:00
Adeeb Shihadeh fa1df5f783 show alert for rest of drive 2021-05-20 20:03:39 -07:00
Mitchell Goff 29cc3500a5
New model outputs (#20933)
* New model: 51a237cd-9c43-4281-9072-802325e6744d/950

* Added new meta outputs and proper interp for plan_t_arr

* Added meta-based trigger for FCW

* No nans in planner, separate alert for model FCW

* Cleaned up plan_t interp logic

* Added empty cameraError alert to fix unit tests

* Use the normal FCW event

* Updated filter logic

* Updated model replay ref

* Moved disengage predictions into their own cereal struct

* Updated model replay ref for new cereal structs

* Apparently this breaks stuff?

* Bumped cereal commit and model replay ref
2021-05-19 22:30:23 -07:00
Adeeb Shihadeh 2defc730db
alert for errors in camera stack (#20932)
* camera error alert

* check crcs

* cleanup

* bump cereal

Co-authored-by: Comma Device <device@comma.ai>
2021-05-19 21:28:16 -07:00
Adeeb Shihadeh f08e01c97f
fingerprint cloudlog event (#20950)
* fingerprint cloudlog event

* kale cloudlog

* not fuzzy
2021-05-18 10:52:53 -07:00
Adeeb Shihadeh 313741062e
offroad alert for missing nvme (#20931)
* offroad alert for missing nvme

* remove that

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

* add event

* bump cereal

* consistency
2021-05-14 21:26:02 -07:00
Adeeb Shihadeh b93ccc465d
offroad alert for unregistered devices (#20870)
* offroad alert for unregistered devices

* update tests

* add param

* fix stretch
2021-05-11 03:18:45 -07:00
Dean Lee 7222d0f20d
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>
2021-05-08 22:15:17 -07:00
Willem Melching b38e57eb2b
Improve community feature alert text (#20803) 2021-05-03 11:59:01 +02:00
Adeeb Shihadeh f9a961f6fb
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>
2021-04-30 13:55:17 -07:00
Willem Melching a57f10c202
Fix ability to change lane change direction while in progress (#20765) 2021-04-29 13:03:16 -07:00
qadmus 0d10f9c4ad
ignore_avg_freq of longitudinalPlan, which is triggered by radarState (#20743) 2021-04-29 11:06:44 -07:00
Willem Melching 64d2ec38f2 Ignore radarState average frequency 2021-04-21 10:59:26 +02:00
Adeeb Shihadeh 836668f105
less harsh steering unavailable alert when overriding (#20718)
* less harsh steering unavailable alert when overriding

* just steer

* 1s

* orange

* update refs
2021-04-20 21:01:28 -07:00
Adeeb Shihadeh a19d94ae2d
Toyota: use FW query for DSU detection (#20615)
* Toyota: use FW query for DSU detection

* make sure we have at least some fw responses

* bool

* add test to test_startup

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-04-20 14:32:34 +02:00
Willem Melching e4f73fbda5
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
2021-04-20 12:00:36 +02:00
Adeeb Shihadeh 3fa86657cb show gps alert when lte's enabled 2021-04-15 22:12:16 -07:00
Adeeb Shihadeh 9edda6fbc1
tici: offline big cluster while offroad (#20668)
* tici: offline big cluster while offroad

* shuffling

Co-authored-by: Comma Device <device@comma.ai>
2021-04-12 23:06:24 -07:00
Willem Melching 8ede1b30aa
tici: move real-time processes to high-performance cores (#20634) 2021-04-09 13:41:43 +02:00
Willem Melching 44c395165b plannerd: use get_bool to read param 2021-04-09 10:32:31 +02:00
HaraldSchafer 0e10b74a61
MPC retune for laneless fix (#20616)
* was making wrong policy more aggresive

* allow to be set from simulator

* update refs

* put params together
2021-04-08 12:56:47 -07:00
Willem Melching c1075037ba
Add list for average frequency ignore (#20624)
* add list for averge frequency ignore

* typo
2021-04-08 18:04:16 +02:00
Adeeb Shihadeh 2fa1b2572d
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
2021-04-07 12:18:58 -07:00
Willem Melching 1fc7bcca43
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>
2021-04-07 19:12:35 +02:00
Willem Melching ae094042ad
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
2021-04-07 15:36:37 +02:00
Willem Melching 0dca8cb7dd remove ubloxRaw from controlsd SubMaster 2021-04-07 14:41:38 +02:00
HaraldSchafer d72d433ec7
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
2021-04-06 23:49:29 -07:00
Willem Melching 79b5bee9dd
Check average frequency in SubMaster (#20558) 2021-04-06 10:09:47 +02:00
Adeeb Shihadeh 2319d726fb
lower min lane change speed to 30mph (#20586)
* lower min lane change speed to 30mph

* update refs
2021-04-05 15:38:53 -07:00
Adeeb Shihadeh 367aec54d1
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>
2021-03-25 21:37:38 -07:00
HaraldSchafer 7ee79c9923
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>
2021-03-24 01:10:31 -07:00
Adeeb Shihadeh 43ce7165c4
Remove lane change toggle and default LDW to off (#20442)
* remove lane change toggle and default LDW to off

* update refs
2021-03-22 20:55:57 -07:00
Erich Moraga 0fc5c86805
remove unused line (#20426) 2021-03-21 17:13:16 -07:00
Willem Melching 3c23226edc
verify safetyParam read back from PandaState (#20384)
* verify safetyParam read back from PandaState

* update ref

* bump panda
2021-03-17 14:20:05 +01:00
HaraldSchafer 27035131cc
Sane curvature rate limit in plannerd (#20366)
* safety limit

* should be in RADs

* add raw

* update refs
2021-03-16 15:00:03 -07:00
Willem Melching 2ca5bf9992 make vehicleModelInvalid a NoEntry 2021-03-15 12:15:27 +01:00
Willem Melching 9685be4090
Fix vehicleModelInvalid alert (#20352)
* Fix vehicleModelInvalid alert

* remove from if else tree
2021-03-15 11:33:45 +01:00
Willem Melching c23ec9f753
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>
2021-03-11 21:08:51 -08:00
HaraldSchafer 0223578461
Better high speed alert message (#20322) 2021-03-11 17:01:29 -08:00
Willem Melching af02811d42 turn off gpsMalfunction alert until uBlox config is fixed 2021-03-10 11:13:46 +01:00
Willem Melching 5a3b511306
Manager cleanup (#20231)
* move manager in folder

* inital refactor

* call start

* small cleanup

* add comments

* use self.signal()

* order shouldnt matter

* newlines

* add helpers

* newlines

* add process config

* split out build part of manager

* this should fix most tests

* no sensord on pc

* dont start athena

* remove comment

* fix old athena test

* fix inject model

* fix test car models

* should be not none

* fix helpers exitcode

* ignore manage_athenad

* Use time.monotonic()

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

* combine init, remove spinner

* move manager test

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-03-05 11:03:23 +01:00
wolterhv 93911a7dbe
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.
2021-03-03 14:22:06 -08:00
Marius Larsen e998d6d93f
Fxing some typos in vehicle_model.py comments (#20220) 2021-03-03 11:40:22 +01:00
Willem Melching 280192ed14
only allow INDI wind down on user override (#20080) 2021-02-23 16:39:40 -08:00
HaraldSchafer 8df76b3980
Always linearize, better way of compensating for lag (#20133)
* need to divide diff by 2

* simple linearization seems to work best

* update refs
2021-02-23 12:56:12 +01:00
Adeeb Shihadeh f28673e8b5
fix apk after cereal cleanup (#20098)
* actually a percent

* update apk

* update refs
2021-02-19 12:19:29 -08:00
HaraldSchafer a0cdacbb2a
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>
2021-02-18 17:16:20 -08:00
Adeeb Shihadeh 312b681a46
cereal cleanup part 2 (#20092)
* car stuff

* thermal

* Revert "car stuff"

This reverts commit 77fd1c65eb.

* 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
2021-02-16 21:39:32 -08:00
Igor 8f9ee10b8a
Fix division by zero in lateral_planner.py (#20071)
* Fix division by zero

* Change fix logic
2021-02-16 11:43:11 +01:00
Adeeb Shihadeh 4ace476f14 fanSpeedRpmDesired -> fanSpeedPercentDesired 2021-02-11 17:00:26 -08:00
Adeeb Shihadeh fe7f3f0ec6
remove gpsd (#20027) 2021-02-10 16:39:39 -08:00
HaraldSchafer 0c900c8ce1
fix low speed lateral (#20053)
* fix low speed lateral

* update ref

* fix failing CI jobs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-02-09 15:36:58 -08:00
Willem Melching 4c04e220a1
Timezoned (#19960)
* untested code

* add to manager

* whitespace

* only save on fix

* cleanup

* fix typo

* add to ignored processes

* import tici

* fix param name

* cleanup

* only run offroad

* use itertools

* wait for thermald

* simpler

* fall back to api call

* add param to override timezone

Co-authored-by: Comma Device <device@comma.ai>
2021-02-06 11:07:37 +01:00
HaraldSchafer c3707328f5
Different lag comp (#20024)
* more sensible

* different names for different segs

* new ref

* this is checked somewhere
2021-02-05 14:01:22 -08:00
Adeeb Shihadeh 4ca462a846 skip manager check in sim 2021-02-04 20:51:37 -08:00
HaraldSchafer bad68e4663
camera offsets (#20022)
* camera offsets

* runs on pc so is 0 in proc replay
2021-02-04 15:50:53 -08:00
Adeeb Shihadeh 000bd226aa
Cereal cleanup (#20003)
* start cleanup

* fan speed

* cleanup dm

* fix cereal

* hwType -> pandaType

* update refs

* update refs

* bump cereal

* freeSpacePercent

* cereal master
2021-02-03 19:57:30 -08:00
HaraldSchafer 61a4e3e661
Remove curv factor (#20011)
* cleaning crew

* need that to match

* smooth factor

* that didn't really work

* closer to previous

* new ref

* new names
2021-02-03 17:51:21 -08:00
Adeeb Shihadeh d7281387ad don't show on tici 2021-02-02 21:27:36 -08:00
HaraldSchafer 3f2b42b4e3
Deal with long lag compensation (#20004)
* add hack for big lags

* wrong bracket

* new pathplanner values
2021-02-02 17:09:01 -08:00
Willem Melching bacf8727d7
cloudlog once on commIssue (#19949) 2021-02-01 13:41:04 -08:00
HaraldSchafer d1b31d3697
not relevant at high speed (#19946)
* not relevant at high speed

* update ref
2021-01-27 20:28:17 -08:00
Mitchell Goff 608f00f814
Split planner and pathplanner publishing into separate 'publish' methods (#19860)
* Split planner and pathplanner publishing into separate 'publish' methods

* Updated test_following_distance.py

* Combined publish+send_mpc_solution methods
2021-01-26 20:27:24 -08:00
HaraldSchafer d628352098
important for indi (#19926)
* important for indi

* dont change that in this pr
2021-01-26 14:26:27 -08:00
Willem Melching b6a220a133
manager.py broadcast process states (#19880)
* broadcast managerstate

* Remove boardd

* show alert

* only trigger on actually receiving a manager state

* add managerstate to simulation exclude for longitudinal test

* broadcast managerState in process replay

* update alert text

* bump cereal

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-01-26 14:49:55 +01:00
Shane Smiskol 76cf500669
INDI: Time constant is used based on breakpoints (#19858)
* Time constant is used based on break points

* no need for alpha class variable
2021-01-21 15:14:50 +01:00
HaraldSchafer 124100d0fa
remove old model packet (#19769)
* remove publisher

* move to V2

* radard new model

* fix plant

* change packety

* need hack here too

* change to new

* this has been wrong all along

* no more model msg

* subscribe to new model

* not needed anymore

* make work

* need to ignore that too

* should pass tests, needs car test

* fix process replay

* no more poly

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-01-19 17:15:16 -08:00
HaraldSchafer 0e49919ab9
Cleanup pathplanner (#19827)
* no divide by 0

* misc cleanup

* final fixes

* remove last polys

* new ref

* fix test

* update again
2021-01-19 00:02:53 -08:00
Marcos S c03a95f7f9
Carla fixes (#19824)
* use carla provided frame_number

* fix carla comm issues error

* add minimal W-A-S-D keyboard controls

* fix window from carla docker not showing

* carla 0.9.7 uses `frame`, not `frame_number`

* set safetyModel on health for simulator

* safetyModel check now works with simulator

* ignore ubloxRaw and frontFrame when running sim

* Update selfdrive/controls/controlsd.py

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

* added WINDOW flag for optional show carla window

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-01-18 17:16:32 -08:00
HaraldSchafer bf5332c491
back to open loop (#19781) 2021-01-16 13:43:30 -08:00
Harald Schafer 61b7527b95 fix tests 2021-01-14 21:46:01 -08:00
Harald Schafer 90216ce620 fix init 2021-01-14 20:52:39 -08:00
HaraldSchafer 158210cde8
Mpc rework2 (#19660)
* start again

* need that too

* this actually works

* not needed

* do properly

* still works

* still works

* still good

* all G without ll

* still works

* all still good

* cleanup building

* cleanup sconscript

* new lane planner

* how on earth is this silent too....

* update

* add rotation radius

* update

* pathplanner first pass

* misc fixes

* fix

* need deep_interp

* local again

* fix

* fix test

* very old

* new replay

* interp properly

* correct length

* another horrible silent bug

* like master

* fix that

* do doubles

* different delay compensation

* make robust to empty msg

* make pass with hack for now

* add some extra

* update ref for increased leg

* test cpu usage on this pr

* tiny bit faster

* purge numpy

* update ref

* not needed

* ready for merge

* try again after recompile

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-01-14 18:43:50 -08:00
Adeeb Shihadeh 40830a216b
fix camera malfunction alert (#19757)
* fix camera alert malfunction

* remove old alert
2021-01-14 16:03:16 -08:00
Adeeb Shihadeh c114316d94
GPS malfunction alert (#19756)
* GPS malfunction alert

* fix process replay

* fix long tests

* fix long tests again
2021-01-14 14:45:10 -08:00
Igor 0a65e87394
Add indi breakpoints (#19664)
* Added BP, V to latcontrol_indi

* hyundai

* toyota

* Tests for INDI outerLoopGain
2021-01-07 15:55:46 +01:00
Willem Melching 7c43a60bda
Rebuild acado and add scons command to regenerate mpc (#19685)
* rebuild acado and add scons command to regenerate mpc

* update scons help
2021-01-07 15:18:23 +01:00
Willem Melching e4cf43c6fc
Move all CarControllerParams into values.py (#19663)
* toyota

* use scale from values.py

* nissan

* subaru

* honda

* gm

* toyota combine into CarControllerParams

* nissan refactor

* chrysler refactor

* mazda refactor

* hyundai refactor

* subaru refactor
2021-01-06 11:20:44 +01:00
Adeeb Shihadeh 389649d6ac remove old event 2020-12-21 15:55:30 -08:00
Adeeb Shihadeh 41b31a1756
don't go onroad if internet needed (#19572) 2020-12-21 15:13:20 -08:00
Willem Melching 776a67ad2e remove commIssueWarning from events 2020-12-17 22:25:22 +01:00
Adeeb Shihadeh 8674b023ba
HW abstraction layer (#19530)
* start hw refactor

* move that

* pins

* put that back
2020-12-16 21:30:23 -08:00
Shane Smiskol 89a6008841
don't wait for 4 seconds before it starts steering again after steering fault (#19520) 2020-12-16 12:24:42 -08:00
Igor 717bc747c3
Parametrize startingBrakeRate (#19511)
* Parametrize startingBrakeRate

* new ref_commit
2020-12-16 20:58:07 +01:00
Adeeb Shihadeh 6a151dcd9c
oneplus deprecation (#2748)
* oneplus deprecation

* lowercase

* too long

* no udpates
2020-12-12 12:51:12 -08:00
Igor d3c2a0e6c1
Parametrize stoppingBrakeRate (#2745)
* Parametrize stoppingBrakeRate

* ref_commit updated
2020-12-11 16:30:35 +01:00
Igor 093456cc40
Parametrize MIN_CAN_SPEED in car interfaces (#2684)
* Parametrize MIN_CAN_SPEED in car interfaces

* fixed instance in planner.py

* fix typo

* var name change

* changed var name to minSpeedCan for consistency with other uses of CAN in the capnproto files

* added default value to get_std_params, removed unneeded instances from car interface files

* Revert PEP8 autoformat corrections

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-12-04 11:09:34 +01:00
Willem Melching d5a806e564 fix typo in event name 2020-12-03 17:07:03 +01:00
Willem Melching 93e90898dd Add event for commIssueWarning 2020-12-03 16:54:54 +01:00
Adeeb Shihadeh 9d18b45cd0 don't need that 2020-11-24 22:47:44 -08:00
Willem Melching 40acdc4524
Typing experiments (#1633)
* add more types

* car

* no abc

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-11-24 22:45:37 -08:00
George Hotz 160fd207a5 remove model lag warning, leave red alert at 20 2020-11-24 13:02:56 -08:00
Adeeb Shihadeh 2d7a194f9f
model lag warning (#2608) 2020-11-23 13:42:18 -08:00
Adeeb Shihadeh d92f923d70
update frame drop filter (#2592) 2020-11-21 14:50:53 -08:00
Harald Schafer 6907714510 update comments 2020-11-12 10:21:27 -08:00
HaraldSchafer 08846b5c0e
Torch model (#2452)
* refactor draw model

* rebase master

* correct valid_len

* rename function

* rename variables

* white space

* rebase to master

* e16c13ac-927d-455e-ae0a-81b482a2c787

* start rewriting

* save proress

* compiles!

* oops

* many fixes

* seems to work

* fix desires

* finally cleaned

* wrong std for ll

* dont pulse none

* compiles!

* ready to test

* WIP does not compile

* compiles

* various fixes

* does something!

* full 3d

* not needed

* draw up to 100m

* fix segfault

* wrong sign

* fix flicker

* add road edges

* finish v2 packet

* Added pytorch supercombo

* fix rebase

* no more keras

* Hacky solution to the NCHW/NHWC incompatibility between SNPE and our frame data

* dont break dmonitoringd, final model 229e3ce1-7259-412b-85e6-cc646d70f1d8/430

* fix hack

* Revert "fix hack"

This reverts commit 5550fc01a7881d065a5eddbbb42dac55ef7ec36c.

* Removed axis permutation hack

* Folded padding layers into conv layers

* Removed the last pad layer from the dlc

* Revert "Removed the last pad layer from the dlc"

This reverts commit b85f24b9e1d04abf64e85901a7ff49e00d82020a.

* Revert "Folded padding layers into conv layers"

This reverts commit b8d1773e4e76dea481acebbfad6a6235fbb58463.

* vision model: 5034ac8b-5703-4a49-948b-11c064d10880/780  temporal model: 229e3ce1-7259-412b-85e6-cc646d70f1d8/430  with permute + pool opt

* fix ui drawing with clips

* ./compile_torch.py 5034ac8b-5703-4a49-948b-11c064d10880/780 dfcd2375-81d8-49df-95bf-1d2d6ad86010/450 with variable history length

* std::clamp

* not sure how this compiled before

* 2895ace6-a296-47ac-86e6-17ea800a74e5/550

* db090195-8810-42de-ab38-bb835d775d87/601

* 5m is very little

* onnx runner

* add onnxruntime to pipfile

* run in real time without using the whole CPU

* bump cereal;

* add stds

* set road edge opacity based on stddev

* don't access the model packet in paint

* convert mat.h to a c++ header file (#2499)

* update tests

* safety first

Co-authored-by: deanlee <deanlee3@gmail.com>
Co-authored-by: mitchell <mitchell@comma.ai>
Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: George Hotz <george@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-11-11 20:31:46 -08:00
HaraldSchafer f7d1ace883
Fix lane width (#2520)
* use prob modifiers in lane width calc

* update ref

* update ref
2020-11-10 21:12:36 -08:00
HaraldSchafer 39f27f9d6a
cleanup planner (#2519)
* no reason for external function

* dont need d_poly for this test

* dont copy float

* typo
2020-11-10 14:42:43 -08:00
Shane Smiskol dca6f61db9
some laneplanner updates (#2505) 2020-11-09 01:15:29 -08:00
HaraldSchafer 26583b1b85
No uncertain ll (#2495)
* initial, needs tune

* support metrics

* a little more

* wrong type

* fixup

* update refs
2020-11-06 21:01:16 -08:00
HaraldSchafer e6668625fa
set y too (#2448)
* set y too

* new ref
2020-11-04 19:52:05 -08:00
Adeeb Shihadeh 89d02dcf97
check for safety mode mismatch (#2443) 2020-11-04 11:12:15 -08:00
Adeeb Shihadeh 47c21f10f5
grey panda is unsupported (#2458) 2020-11-03 19:56:25 -08:00
Adeeb Shihadeh d92ec9642e
grey panda deprecation (#2406) 2020-10-26 23:09:06 -07:00
Adeeb Shihadeh 159e5d40ea fix camera malfunction alert on startup 2020-10-26 19:20:14 -07:00
Adeeb Shihadeh 0b433581e3 fix camera malfunction alert in sim 2020-10-24 11:46:23 -07:00
Adeeb Shihadeh 88b956528e
camera malfunction alert (#2391)
* camera malfunction alert

* bump cereal

* fix process replay

* ugh, needs refactor
2020-10-22 16:28:54 -07:00
ZwX1616 53bd3050ee
infinite sound (#2372)
* make sound infinite loopable

* Update selfdrive/ui/android/sl_sound.cc

* fix loop

* fix test threshold

* more fix

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Comma Device <device@comma.ai>
2020-10-20 17:42:19 -07:00
Shane Smiskol 5bcac27d98
matrix subclass not recommended way to represent matrices (#2348) 2020-10-20 12:12:23 +02:00
Adeeb Shihadeh ae4b4bd125
Alert cleanup (#2274)
* no more focus recover active

* consistency

* more permanent

* dm alerts

* sanity check test

* no please

* clean that up

* update refs

* one more

* bump cereal
2020-10-14 15:56:18 -07:00
Adeeb Shihadeh 1c6905cac1
clear irrelevant alerts on state transition (#2318)
* cleanup

* clear warnings

* more types

* needs refactor

* update refs

* update refs
2020-10-14 14:08:15 -07:00
Willem Melching ce85e402f4
Fix lane change when blinker is turned off early (#2324) 2020-10-13 17:42:29 +02:00
Shane Smiskol 6133f603f0
Use math instead of numpy for calculating TTC, on average 80% faster (#2293)
* Use math instead of numpy, on average 80% faster

* whoops
2020-10-08 14:23:53 +02:00
Logan Lasiter 1a2efdc139
Present alert if fan isn't spinning (#2258)
* Present alert if fan isn't spinning

* allow entry

* Small updates

Moving to fan malfunction event

Only trigger event for uno or dos

* Changed checking fanSpeed > 50%

* Update text for fan malfunction alert.

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

* Alert if fan isn't spinning for 5 sec

* Alert edit

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-10-07 12:15:09 +02:00
Adeeb Shihadeh bd4a1f291d cleanup duplicate function 2020-10-06 23:59:16 -07:00
Willem Melching 3f88df62c7
Fix calibration invalid alert on startup (#2270)
* change controlsd calibration initial value

* update refs

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-10-05 19:16:52 -07:00
Adeeb Shihadeh 70bc935210 bump cereal 2020-10-05 18:43:21 -07:00
Adeeb Shihadeh a77548bff6
radard cleanup (#2266)
* some cleanup

* more realistic profiling

* Update selfdrive/controls/radard.py

Co-authored-by: Willem Melching <willem.melching@gmail.com>

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
2020-10-05 11:37:39 +02:00
Adeeb Shihadeh 059cf6b43e
Run all driving processes on cores 2-3 (#2257) 2020-10-02 17:18:18 -07:00
Greg Hogan 0902575e34
pre-reqs for honda bosch longitudinal control (#1458)
* pre-reqs for honda bosch longitudinal control

* openpilot_longitudinal_control -> radar_disabled

* fix chrysler test

* review feedback

* little cleaner

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-09-29 00:04:15 -07:00
cydia2020 6d5b2af3f2
add 1 second delay to acc pedal alert (#2221)
So that the screen wouldn't appear to "flicker" when openpilot is engaged while the acc pedal is being released
2020-09-28 16:17:21 -07:00
qadmus 254814cc79
remove unused globals, use self.reset() (#2220)
Co-authored-by: user <email@web.com>
2020-09-24 11:39:47 +02:00
Adeeb Shihadeh cdcf235025 remove unused alert 2020-09-22 13:47:30 -07:00
qadmus 72e0ac2de1
cleanup long planner, mpc: unused globals and arguments (#2211)
Co-authored-by: user <email@web.com>
2020-09-21 11:43:28 +02:00
Willem Melching 65e5032a97 Revert "tici: take into account frame timestamp (#2199)"
This reverts commit 3a494e144b.
2020-09-21 10:31:01 +02:00
Adeeb Shihadeh 15e4048318
alertmanager type hints (#2201)
* alertmanager types

* clean that up

* more cleanup

* little more

* space
2020-09-19 10:53:14 -07:00
Willem Melching 3a494e144b
tici: take into account frame timestamp (#2199)
* compensate for frame processing time

* add rolling shutter time

* Add max frame delay of 250ms

* only delay on tici
2020-09-18 17:42:29 +02:00
Adeeb Shihadeh a81a18205e
type hints for alerts and fix community feature alert (#2196)
* fix startup alert for community features

* type hints for alerts

* more type hints

* fix dashcam only alerts

* more type hints
2020-09-17 22:06:31 -07:00
Adeeb Shihadeh ef21b83937
Improve realtime performance on NEOS (#2166)
* fix setting core affinity

* dmonitoringd doesn't need rt priority

* android only gets two cores

* model and planner get core 2

* log missed cycle count

* neos update

* prod image

* revert NEOS changes

* still need this
2020-09-16 15:33:12 -07:00
ZwX1616 a2adfdb155
Cut down unnecessary DM uncertain alerts (#2157)
* cut down high std alerts

* clean comments

* uncertain curve tune

* update test gt

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-09-14 10:43:19 -07:00
Adeeb Shihadeh a4a4e28c1a prevent reversing alert from showing while changing gears 2020-09-12 17:21:30 -07:00
Adeeb Shihadeh e0004d0981
Reduce paramsd and calibrationd CPU usage (#2119)
* reduce paramsd cpu

* reduce calibrationd cpu usage

* calibration_helpers was mostly unused

* more calibration cleanup

* update refs

* fix thresholds in CPU test
2020-09-10 12:16:29 -07:00
Willem Melching d4328365e9 cleanup controlsd env variable reading 2020-09-10 12:19:14 +02:00
Vivek Aithal c5dfbe7a72
dockerize carla + openpilot (#2011)
* dockerize carla + openpilot

* separate dockerfile

* bring back CI dockerfile

* cleanup bridge

* add op docker build and start script

* build container in CI

* fix camerad hack

* remove most magic numbers from bridge.py

* openpilot-sim docker build and run scripts

* fix dmonitoring hacks

* revert controlsd hacks

* clean up build scripts

* singular

* fix path

* fix image name

* modify sim readme

* sim readme and start script changes

* dockerfile with working opengl

* working opengl + passing panda build_st in docker

* fix bug in sim docker file

* bugfix sim docker file

* bugfix all op-sim docker issues

* modify readme + run script

* IT DRIVES

* clean this up

* more cleanup

* cleanup docker stuff

* more cleanup

* start with openpilot-base

* install carla python package

* Script is not in lib

* chmod

* everything should be running in docker now, the code may not be nice though

* works locally...

* rhdChecked is deprecated

* Checkout using git lfs when building sim container

* try to pass the tests

* pull latest docker

* gps should not throw an error on openpilot launch in bridge.py

* fixed a coding style error

* Only start ubloxd in car

* fixed more style problems

* revert typo

* Use enviromental variable to prevent errors in a simulator

* Remove unused import

* Attempt to fix missing enviromental variable

* fix typo

* less work for users, auto tmux engagement

* less work for users, auto tmux engagement

* fix check for nvidia

* clean up nvidia check

* remove typo, shorted dockerfile

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
Co-authored-by: Bruce Wayne <batman@workstation-eu-gregor.eu.local>
Co-authored-by: Gregor Kikelj <gregor1234567890@gmail.com>
2020-09-10 12:14:49 +02:00
Adeeb Shihadeh fde8b18f73 set params for new test 2020-09-09 15:57:06 -07:00
Adeeb Shihadeh fae13bf07e fix timing issues with new test 2020-09-09 15:16:05 -07:00
Adeeb Shihadeh a3c1de1e66 simple unit test for startup alert 2020-09-09 14:40:16 -07:00
Adeeb Shihadeh 9cd88526b5
hide camera view when in reverse (#2144)
* partially hide camera view when in reverse

* lowest priority

* update ref commit

* fix type

* update refs
2020-09-09 00:11:12 -07:00
Adeeb Shihadeh 86f4d86cd7 make calibrationInvalid a permanent alert 2020-09-04 13:20:48 -07:00
Adeeb Shihadeh 848301b091
UI vision refactor (#2115)
* refactor vision

* don't show slow frame message when in preview mode

* change draws to uint32_t

* set vision_seen=false after destroy

* remove vision_connect_thread

* refactor ui_update

* seelp 30ms when vision is not connected

* remove should_swap

* call ui_update_sizes before ui_draw

* rebase

* start bigger UI refactor

* don't need the touch fd

* fix qt build

* more cleanup

* more responsive

* more refactor

* fix for pc

* poll for frames

* lower CPU usage

* cleanup

* no more zmq

* undo that

* cleanup speed limit

* fix sidebar severity for athena status

* not aarch64

Co-authored-by: deanlee <deanlee3@gmail.com>
Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
2020-09-03 16:32:55 -07:00
Adeeb Shihadeh 21fbe26980
Reduce plannerd and dmonitoringd CPU usage (#2108)
* fix wasted cycles in locationd and dmonitoringd

* bump cereal

* calibrationd

* Revert "calibrationd"

This reverts commit 580051a33b.

* this is cleaner

* calibrationd

* paramsd is driven by liveLocationKalman

* only log params once a minute

* stricter CPU usage test

* revert locationd for now

* revert calibrationd too

* revert thresholds
2020-09-01 16:41:09 -07:00
ZwX1616 9731e7a0d7 not show soft recover alerts 2020-08-27 17:59:26 -07:00
Willem Melching c7152d5419
Hardware abstraction class (#2080)
* hardware abstraction class

* De Morgan

* Rename pc hardware class

* Fix sound card in controlsd

* Pc get sim info

* fix hardware in test

* two more

* No more random imei on android

* no randomness on android

* Need to return something that looks like imei for registration to work

* Return proper network strength

* Unused import

* Bug fixes + gpsd is only android
2020-08-26 14:57:17 +02:00
Chris 1b52930a52
Kilometers per hour now displayed as km/h (#2032)
Fixes #2031

Signed-off-by: Christopher Rabotin <christopher.rabotin@gmail.com>
2020-08-17 11:16:52 +02:00
Adeeb Shihadeh cb5a2996e7
NEOS background updater (#1892) 2020-08-12 11:39:21 -07:00
Adeeb Shihadeh 8e63f06540
Alert when updated consistently fails (#2013)
* alert when update fails more than 10 times

* bring over offroad alert refactor from other branch

* and we have tests

* use it in snapshot

* bump apk

* don't show exceptions on release branches

* only write when changed

* why does delete use so much cpu

* clean that up

* little more
2020-08-11 16:23:57 -07:00
Adeeb Shihadeh ee99b59bad
fix missing negative limit in pid controller (#2001) 2020-08-08 11:49:13 -07:00
HaraldSchafer 490ee52687
add fall filter and less FP on posenet (#1971)
* add fall filter and less FP on posenet

* add alert

* list

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-08-03 15:51:56 -07:00
HaraldSchafer 8e2d344135
Misc locationd improvements (#1714)
* I like this more

* rewind less

* bump rednose

* falling off windshield detectopr

* adjust thresholds

* this is a soft disable now

* move that

* process replay fixes

* update refs

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-07-30 15:33:22 -07:00
Adeeb Shihadeh 714f8c3f0b
Remove get_one_can from messaging (#1946)
* move get_one_can into openpilot

* bump cereal
2020-07-28 23:52:18 -07:00
Adeeb Shihadeh acb25751b7 Revert "can't directly access sockets anymore", was supposed to be on branch
This reverts commit 6acda96a16.
2020-07-28 18:41:39 -07:00
Adeeb Shihadeh 6acda96a16 can't directly access sockets anymore 2020-07-28 18:37:16 -07:00
Shane Smiskol ebadb39e42
Fix hard deceleration after user accelerates above set cruise speed (#1880)
* Fix hard deceleration after user accelerates above set cruise speed

* 2nd required change
2020-07-20 17:04:05 +02:00
Adeeb Shihadeh 5db81f60ca
Fix most remaining LGTM alerts (#1893)
* fixups from LGTM

* short globals

* fix spinner and textwindow

* total ordering

* no spinner/text window when import from manager

* not android
2020-07-19 16:12:22 -07:00
Adeeb Shihadeh 58c3b5ba84
Revert modeld vipc conflate behavior and alert on dropped frame percent (#1877)
* Revert "Fix modeld dropping frames if processing takes over 50 ms"

This reverts commit a8e7a187ca.

* track frame drop

* fix unused

* alert on frame drop perc

* reduce thresholds

* posenet is invalid on non-consecutive frames

* Refactor filter time constant

* Use vipc_dropped_frames for posenet valid check

* Actually set frame drop percentage

* Add explicit cast just to be sure

* Prevent frames dropped to go up to quickly on startup

* bump cereal

* reduce soft disable threshold to 1%

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2020-07-14 14:23:27 -07:00
Adeeb Shihadeh 03e824a4b5
Alert when modeld is lagging by more than a frame (#1823)
* alert when modeld is lagging by more than 1 frame

* log frameAge in modelData

* set posenet valid

* compute frame_age once
2020-07-09 17:02:21 -07:00
Greg Hogan c458f5a5d3
k-line 5 init fault type (#1821)
* k-line 5 baud fault type

* update name

* bump cereal

* fix name

* add missing event
2020-07-06 09:33:16 -07:00
Adeeb Shihadeh f1afb3e3ae
Sound test (#1820)
* WIP sound test

* it does something

* refactor

* phone only

* update release files

* test sound card init

* add to CI

* check writes

* increase time

* unused

* only build cereal

* small tolerance

Co-authored-by: Comma Device <device@comma.ai>
2020-07-05 17:56:24 -07:00
George Hotz cb495bb8c9
Add an SSH param to disable updates (#1807)
* disable updates with optional param

* dont create the alert

* Revert "dont create the alert"

This reverts commit 7179a6c8b4.

* keep alert, but allow engagement

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-07-01 14:26:35 -07:00
Adeeb Shihadeh 64aeb80dcc fix blindspot detection 2020-06-30 13:44:56 -07:00
robbederks df86c476c7
Dos (#1795) 2020-06-29 12:47:48 +02:00
Adeeb Shihadeh ce80684f7e
Add alert while in preEnabled state (#1791) 2020-06-28 20:29:42 -07:00
Willem Melching 5e254da8b3 fix wrong car mode alert 2020-06-24 18:20:30 -07:00
Adeeb Shihadeh c4a3d7afb0
Block lane change start on blindspot detection (#1712)
* use BSM to block lane change start

* remove duplicate entry

* add approaching
2020-06-24 17:31:09 -07:00
ZwX1616 3aa99a01d7
recover EON/C2 AF (#1665) 2020-06-23 14:33:32 -07:00
Adeeb Shihadeh 51b7dc0e38 fix engage/disengage sounds 2020-06-23 10:50:24 -07:00
Willem Melching 264015c584
cleanup no sensor data alert (#1760) 2020-06-22 14:27:07 -07:00
Adeeb Shihadeh cab96374c5 more generic alert text for wrongCarMode 2020-06-19 20:36:10 -07:00
Willem Melching 77b7d30683 Remove kernel check from controlsd 2020-06-19 16:54:42 -07:00
Adeeb Shihadeh ccf6b80c7e
Cleanup startup event handling (#1748)
* cleanup startup event

* always show permanent

* lowest

* update refs
2020-06-19 16:16:48 -07:00
Willem Melching 24de8174dc
Only show gps event after 1 km (#1747) 2020-06-19 14:11:23 -07:00
Willem Melching 2b20479a5c Move kernel check to before creating the submaster, prevent SIGUSR2 2020-06-19 13:26:52 -07:00
Adeeb Shihadeh 0cda65b58e catch CalledProcessError when detecting kernel version 2020-06-19 12:42:33 -07:00
Adeeb Shihadeh fd8514eee3 hwType is in health 2020-06-18 15:37:21 -07:00
Adeeb Shihadeh e892d6a9d9 if sky visible 2020-06-18 14:40:57 -07:00
Adeeb Shihadeh b3101998ed update no GPS alert for comma two users 2020-06-18 13:01:28 -07:00
Adeeb Shihadeh 6c156d7f45
NEOS update required alert (#1722)
* NEOS update required

* permanent alert

* bump cereal
2020-06-16 12:21:41 -07:00
Adeeb Shihadeh 25688f36cc
Block entry on non-adaptive cruise mode (#1708)
* block entry on non-adaptive cruise mode

* user disable

* toyota
2020-06-15 18:11:50 -07:00
Adeeb Shihadeh 9e34ed4e8c bump cereal 2020-06-15 16:01:35 -07:00
Adeeb Shihadeh 92c29c4269 bump cereal 2020-06-12 20:38:45 -07:00
Willem Melching 684f7b2cc0
no gps warning after 5 minutes (#1692) 2020-06-12 16:03:35 -07:00
Adeeb 0bbe870b5f
Delay alert creation for some events (#1689)
* add creation delay parameter to alerts

* 1s delay for sensorsInvalid and canError

* bump cereal

* update refs
2020-06-12 15:32:50 -07:00
Adeeb d4858e5ff5
Move driver monitoring out of controls (#1642)
* move dmonitoring out of controls

* run monitoring unit tests in CI
2020-06-09 13:25:15 -07:00
Willem Melching 15dc6044d4
Remove slow down for turns (#1647)
* Remove slow down for turns

* update ref
2020-06-05 16:01:53 -07:00
Jason Young 68531b071c
Reduce scheduler latency for realtime processes (#1638)
* WIP: reduce boardd and other lags

* Copypasta fault

* Silence spurious startup warning

Co-authored-by: Comma Device <device@comma.ai>
2020-06-05 17:09:41 -04:00
Adeeb 367155168a
Update Flake8 config (#1624)
* update flake8 checks

* add E502

* no whitespace warnings

* fix violations

* no W391

Co-authored-by: Jason Young <jason@comma.ai>
2020-06-03 16:13:34 -07:00
Jafar Al-Gharaibeh 73db079199
Fix rounding of minSteerSpeed in events (#1620)
I thought I was missing a rounding in Mazda code, but it turned
out to be a missing rounding after the recent event refactoring

Python3 interpreter:
>>> print(" %d  %d" % (1.6,1.4))
 1  1
>>> print(" %d  %d" % (round(1.6),round(1.4)))
 2  1
>>> print(" %d  %d" % (int(round(1.6)),round(1.4)))
 2  1
>>> print(" %d  %d" % (int(round(1.6)),int(round(1.4))))
 2  1

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
2020-06-03 14:01:32 -07:00
Willem Melching 2400417084
vehicle model types (#1631) 2020-06-03 13:47:47 -07:00
Willem Melching 0f20ac728f Bounds checks on liveParameters for testing on desk 2020-06-03 11:31:12 -07:00
Adeeb 165bcf1f31
Fix speed too low (#1627)
* fix speed too low

* bump ref

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2020-06-02 17:31:59 -07:00
Willem Melching 843a64c72f
Make pylint more strict (#1626)
* make pylint more strict

* cleanup in progress

* done cleaning up

* no opendbc
2020-06-02 16:29:32 -07:00
Willem Melching 205cb04ee9 speedTooHigh should not be an immediate disable 2020-06-01 15:53:41 -07:00
Willem Melching fab8425f2f Make driverview not pin two cores at 100% 2020-06-01 13:58:54 -07:00
Adeeb Shihadeh 6466ec982a enable flake8 E502: backslash is redundant between brackets 2020-05-31 17:41:18 -07:00
Adeeb Shihadeh f3dcf861c7 enable flake8 E303: too many blank lines 2020-05-31 17:21:11 -07:00
Adeeb Shihadeh 27754a277c enable E261 in flake8: two spaces before inline comment 2020-05-31 14:07:29 -07:00
Willem Melching 106cddb49a White panda no longer supported 2020-05-31 13:33:56 -07:00