Commit Graph

179 Commits

Author SHA1 Message Date
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
Adeeb Shihadeh 5dfc430d47 startup alert for no fw returned (#21177)
old-commit-hash: d4ab1f1e274bc5e36b47fb9e6f76a977e04d1f1a
2021-06-07 14:15:09 -07: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
Adeeb Shihadeh d9026b7660 fix camera error indices
old-commit-hash: 6fa573a2d6e64cd37afd6218e6676acbe625a4c1
2021-06-01 16:56:33 -07:00
Adeeb Shihadeh bf9f1f3871 fix low memory on tici
old-commit-hash: e1d7a1af10c1a4a5efe2fe6f278f2af0dbc25718
2021-05-26 19:47:10 -07:00
Adeeb Shihadeh bb70ddcbfe Move CAN fingerprinting behind community features (#20993)
* Move CAN fingerprinting behind community features

* fix typo

* fix startup test

* fix
old-commit-hash: 726fb9d50135d2469fe87ff50d0540965955e37f
2021-05-24 19:21:58 -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 d7a2931a1f stricter memory usage check (#20985)
old-commit-hash: c04b47938d34e8f320e6483a47509ca5d7ff9d1b
2021-05-21 11:25:11 +02:00
Adeeb Shihadeh a4550fec27 show alert for rest of drive
old-commit-hash: fa1df5f78395677451d6244d33b786ca74a2fe37
2021-05-20 20:03:39 -07:00
Mitchell Goff 78927e4ebb 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
old-commit-hash: 29cc3500a5161b4d2245b8d041f190533be4ee8e
2021-05-19 22:30:23 -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 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 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
qadmus 99d3a5e553 ignore_avg_freq of longitudinalPlan, which is triggered by radarState (#20743)
old-commit-hash: 0d10f9c4ad0e11ecd25e0c29355e1c825333f740
2021-04-29 11:06:44 -07:00
Willem Melching 5ec437bb6e Ignore radarState average frequency
old-commit-hash: 64d2ec38f290f7146af4196d240fb70cc11653b0
2021-04-21 10:59:26 +02: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
Adeeb Shihadeh 07ba5a7fe9 show gps alert when lte's enabled
old-commit-hash: 3fa86657cbdc9ecc202a6ad8b4bce1276021f603
2021-04-15 22:12:16 -07:00
Adeeb Shihadeh 31d818b39a tici: offline big cluster while offroad (#20668)
* tici: offline big cluster while offroad

* shuffling

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 9edda6fbc1e4030e2e86ec7041d81c39cd27c8a0
2021-04-12 23:06:24 -07:00
Willem Melching 811746959e tici: move real-time processes to high-performance cores (#20634)
old-commit-hash: 8ede1b30aab2a4bfb628aef6a24714865388f1fa
2021-04-09 13:41:43 +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
Willem Melching d4795ed361 remove ubloxRaw from controlsd SubMaster
old-commit-hash: 0dca8cb7dd2e515beb955ad8cb146f6a5b5f7941
2021-04-07 14:41:38 +02: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
Erich Moraga 10d1905a24 remove unused line (#20426)
old-commit-hash: 0fc5c868051e17814d68db34fdfe6056fb9a70ce
2021-03-21 17:13:16 -07:00
Willem Melching e3d92dc714 verify safetyParam read back from PandaState (#20384)
* verify safetyParam read back from PandaState

* update ref

* bump panda
old-commit-hash: 3c23226edc2d328c489cc01a0950e6e4748d26a1
2021-03-17 14:20:05 +01:00
Willem Melching a5547c6d5b Fix vehicleModelInvalid alert (#20352)
* Fix vehicleModelInvalid alert

* remove from if else tree
old-commit-hash: 9685be40901f938ba10335a2f26f3ece4f448a66
2021-03-15 11:33:45 +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
Willem Melching 6d89cec36a turn off gpsMalfunction alert until uBlox config is fixed
old-commit-hash: af02811d42e66f03613b5a49d6fb837eca19ce6c
2021-03-10 11:13:46 +01:00
Willem Melching c0098cec09 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>
old-commit-hash: 5a3b51130649356b14b24e3c82e014b3a0be95a8
2021-03-05 11:03:23 +01:00
Adeeb Shihadeh 35f9355fcc fix apk after cereal cleanup (#20098)
* actually a percent

* update apk

* update refs
old-commit-hash: f28673e8b50e6328bfc661fb70ae323aa3a57f29
2021-02-19 12:19:29 -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
Adeeb Shihadeh 829ab2dff3 fanSpeedRpmDesired -> fanSpeedPercentDesired
old-commit-hash: 4ace476f14bb73c354234c6bbedbc4ea0bf2d402
2021-02-11 17:00:26 -08:00
Adeeb Shihadeh af95c26b26 remove gpsd (#20027)
old-commit-hash: fe7f3f0ec6b66e42b26451e180e3cde241e749bb
2021-02-10 16:39:39 -08:00
Willem Melching 17d5446650 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>
old-commit-hash: 4c04e220a15c013c86d2d1695764fc339b82c2bc
2021-02-06 11:07:37 +01:00
Adeeb Shihadeh 5d28f23778 skip manager check in sim
old-commit-hash: 4ca462a846506b4894c25fc0d4d265de373c2bf7
2021-02-04 20:51:37 -08:00
Adeeb Shihadeh 966945880b Cereal cleanup (#20003)
* start cleanup

* fan speed

* cleanup dm

* fix cereal

* hwType -> pandaType

* update refs

* update refs

* bump cereal

* freeSpacePercent

* cereal master
old-commit-hash: 000bd226aa9902da01e6010bf26762fca2c20df0
2021-02-03 19:57:30 -08:00
Adeeb Shihadeh f1e7ae3e42 don't show on tici
old-commit-hash: d7281387ad86a9820d8c53ea7e3d326b4e946f40
2021-02-02 21:27:36 -08:00
Willem Melching 58fd0deed5 cloudlog once on commIssue (#19949)
old-commit-hash: bacf8727d719205ff2fa4c1f21e1304928595882
2021-02-01 13:41:04 -08:00
Willem Melching 9d1220b117 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>
old-commit-hash: b6a220a133640c24fc596f6c3b181f5d0dd921a2
2021-01-26 14:49:55 +01:00
HaraldSchafer 5c2c6691b2 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>
old-commit-hash: 124100d0fa42485edaf86cb25f77f27e8917eed1
2021-01-19 17:15:16 -08:00
HaraldSchafer 7af6dab1e8 Cleanup pathplanner (#19827)
* no divide by 0

* misc cleanup

* final fixes

* remove last polys

* new ref

* fix test

* update again
old-commit-hash: 0e49919ab99b9cb85c5df271de5145e388d756ad
2021-01-19 00:02:53 -08:00
Marcos S 059bddf7fc 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>
old-commit-hash: c03a95f7f92ab3eda7fe3b3db9776062aae0cbac
2021-01-18 17:16:32 -08:00
Adeeb Shihadeh 781accd0b3 fix camera malfunction alert (#19757)
* fix camera alert malfunction

* remove old alert
old-commit-hash: 40830a216b70e4a68c0cb1d3495dde2f8e1eaa8b
2021-01-14 16:03:16 -08:00
Adeeb Shihadeh a633eaf660 GPS malfunction alert (#19756)
* GPS malfunction alert

* fix process replay

* fix long tests

* fix long tests again
old-commit-hash: c114316d94d91f09a759f575ed915436425dd177
2021-01-14 14:45:10 -08:00
Adeeb Shihadeh 91fc6d21a0 don't go onroad if internet needed (#19572)
old-commit-hash: 41b31a17566e0786b58ac0ac21cea44bc06985d1
2020-12-21 15:13:20 -08:00
Adeeb Shihadeh b950cab874 HW abstraction layer (#19530)
* start hw refactor

* move that

* pins

* put that back
old-commit-hash: 8674b023bab2b44405139ceec5785a389f837682
2020-12-16 21:30:23 -08:00
George Hotz 8a35cce75f remove model lag warning, leave red alert at 20
old-commit-hash: 160fd207a5087754408d829f39b24d1f1c508df2
2020-11-24 13:02:56 -08:00
Adeeb Shihadeh d2710f2fcf model lag warning (#2608)
old-commit-hash: 2d7a194f9fd5e5b26b55e3aa9e33efc95c97be6e
2020-11-23 13:42:18 -08:00
Adeeb Shihadeh 4be6d905dc update frame drop filter (#2592)
old-commit-hash: d92f923d70712e541de59bf76f23a494dd0c46b4
2020-11-21 14:50:53 -08:00
Adeeb Shihadeh 6e078827b3 check for safety mode mismatch (#2443)
old-commit-hash: 89d02dcf97d60585f9c627f11fdd75387d632b83
2020-11-04 11:12:15 -08:00
Adeeb Shihadeh f25cec394e grey panda is unsupported (#2458)
old-commit-hash: 47c21f10f598639307994392e96f4d9293b295c7
2020-11-03 19:56:25 -08:00