Commit Graph

45 Commits

Author SHA1 Message Date
YassineYousfi
49178539f3 dm: DriverProb (#36687)
* wip

* ci

* fix
2025-11-25 18:52:35 -08:00
ZwX1616
be700bc825 fix rhd behavior during preview/onboarding (#36657)
* rhd learning not required for demo

* fix switching and saving

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-11-20 13:42:20 -08:00
Adeeb Shihadeh
689f884810 DM test mode (#36631) 2025-11-17 21:37:40 -08:00
Adeeb Shihadeh
d98a554b17 tici: set core affinity for all realtime processes (#34574) 2025-02-11 21:20:31 -08:00
Adeeb Shihadeh
bd2b09c7b6 Deprecate controlsState state fields (#33437)
* Deprecate controlsState state fields

* sim works

* update refs

* one more

* these too

* update sim
old-commit-hash: 3924ac587b735d1e735af4cb77faf6ccf053f656
2024-09-03 14:40:23 -07:00
ZwX1616
a51790da10 dmonitoringd: set invalid if missing dependence(s) (#32569)
* no step but still send

* no this

* update diff
old-commit-hash: a16fbdae38
2024-05-29 15:43:55 -07:00
ZwX1616
bf7724d30b dmonitoringd: simplify main loop (#32517)
* one call does all

* no need

* update etst

* filename

* dbf5b05ff480145a79b5941e360d0698b70979cd
old-commit-hash: 204219695f
2024-05-23 20:14:28 -07:00
ZwX1616
1f9bc952bf dmonitoringd: don't check for buttonEvents or vCruise change (#32454)
* drop check for carState.buttonEvents

* 100% people not use this

* huge oof

* ref comit

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 8e87655a12
2024-05-17 21:38:03 -07:00
ZwX1616
1e7865e4c9 Always-on DM: no audible alert at low speeds / block engagement if alert present (#32379)
* min speed

* cmments

* no entry?

* comment
old-commit-hash: 273a4f5ca9
2024-05-08 20:05:03 -07:00
ZwX1616
c741dca04c Toggle to always enable DM (#32205)
* permanent

* param

* correct behavior

* toggle

* need trans

* ref_commit

* translate for chs/t

* disable on P and R

* read
old-commit-hash: 1d05704d27
2024-04-17 12:56:37 -07:00
Adeeb Shihadeh
adcac1f207 SubMaster: improve service aliveness checks (#31391)
* bump cereal

* fix

* fixes

* single poll

* bump

* bump

---------

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 279d2c3b23
2024-02-12 10:11:37 -08:00
Adeeb Shihadeh
b4c03185d4 bump cereal (#31392)
* bump cereal

* update those

* update refs

* bump cereal

* bump

* bump cereal

* bump

* fix

* bump

* typo:
old-commit-hash: daceb171bd
2024-02-09 21:44:23 -08:00
Dean Lee
1d7d7b89b2 common/params: support nonblocking write (#29808)
* Safe and efficient asynchronous writing parameters

* call putNonBlocking in locationd

* remove space

* ->AsyncWriter

* remove semicolon

* use member function

* asyc write multiple times

* add test case for AsyncWriter

* merge master

* add missing include

* public

* cleanup

* create once

* cleanup

* update that

* explicit waiting

* improve test case

* pass prefix to asywriter

* move to params

* assert(queue.empty())

* add comment

* add todo

* test_power_monitoring: remove patch

* rm laikad.py

* fix import

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 3c4c4d1f7f
2023-12-13 20:36:01 -08:00
Adeeb Shihadeh
1cc4f1a634 new msgs default to invalid (#30587)
* new msgs default to invalid

* fix lm

* set more valid

* update rest

* update refs

* fix logMessage

* more valids

* cleanup

* fix llk test

* pigeond is also valid

* more valids
old-commit-hash: a1d36961cf
2023-12-03 10:50:17 -08:00
Adeeb Shihadeh
93b1cf7d69 bump cereal (#30582)
* bump cereal

* fix dmonitoringd

* update refs

* update refs
old-commit-hash: c028688a65
2023-12-02 01:16:07 -08:00
Adeeb Shihadeh
4b78e52e34 cleanup old sm pm args (#30241)
* cleanup sm pm

* fix controlsd

* fix
old-commit-hash: b68cfbb332
2023-10-13 23:27:04 -07:00
Adeeb Shihadeh
0010c9a986 Revert "params: safe and efficient async writing parameters (#25912)"
This reverts commit 780669c33fea1b2a14a0bd6e2eac82c9b8893aa5.

old-commit-hash: ec479322d3
2023-09-06 13:44:20 -07:00
Dean Lee
08e70aecb2 params: safe and efficient async writing parameters (#25912)
* Safe and efficient asynchronous writing parameters

* call putNonBlocking in locationd

* remove space

* ->AsyncWriter

* remove semicolon

* use member function

* asyc write multiple times

* add test case for AsyncWriter

* merge master

* add missing include

* public

* cleanup

* create once

* cleanup

* update that

* explicit waiting

* improve test case

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 0d797f4e8b
2023-09-06 08:50:28 -07:00
Adeeb Shihadeh
16ec56398c add openpilot prefix to imports (#29498)
* add openpilot prefix to imports

* more

* more

* fix docs

* fix linter

* bump submodules

* fix patched tests

* update dynamic imports

* debug

* Revert "debug"

This reverts commit db5e13b9911cc74438bee123bc3430da6c31b24b.

* fix pm test
old-commit-hash: a9626f95b6
2023-08-20 20:49:55 -07:00
Harald Schäfer
5ddceb553d Calibrationd: make recalibrating alert (#28149)
* Initial

* fixes

* not an int anymore

* elif

* revert ref

* update ref

* fix alert text

* regen refs

* update ref

* add recalibration unit test

* set into recalibration state

* fix words

* recalib

* text

* Update selfdrive/controls/lib/events.py

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

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 598343aad1
2023-05-15 09:29:57 -07:00
ZwX1616
6e5393367d Remove RHD toggle: determine by driver side instead (#24802)
* driverview

* auto choose

* useless

* remove

* modeld not use toggle

* remove from params

* should have commissue anyway

* delete icon file

* deal with init more elegantly and prohibit switching when engaged

* nonblock save when not unstable

* filter very low speeds

* a few more secs dont harm

* draw icon

* match

* radius

* use const

* ref commit

* new transs

* put_bool_nonblocking

* 5k route tune

* ref comm

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 22408781f7
2022-07-29 13:52:24 -07:00
ZwX1616
cd2a98aa11 fullframe DM model (#24860)
* Revert "put cereal on master"

This reverts commit 4646c132bae7358079c9b2867725f8382906c1e5.

* Revert "Revert fullframe DM model (#24812)"

This reverts commit 59e8af4c3101785cead69a9880cc03e0a18081e1.

* revert revert cereal

* clip6

* 0.8 is fair

* Fiction compensation should be based on error

* Update refs

* Add deadzone

* not that

* good mg

* ref

* ref

* ee8f

* minor tweak

* ref

* recompile

* ref

* cereal

* match driverstatus

* new ref

* new ref

* pass token through jenkins credentials

* quote

* fix snpe dead weights

* final ref

Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 1f2f9ea9c9
2022-06-20 16:24:51 -07:00
ZwX1616
c73d4e5fc6 Revert fullframe DM model (#24812)
* Revert "fullframe DM: flip RHD yaw to use matching thresholds"

This reverts commit ce7daabc8847d18ba46e5d1879f5a6958d04ccc7.

* Revert "fullframe DM model (#24762)"

This reverts commit 817be81fb19004f4873881f6b29dcdfffbe7e3a8.

* revert cereal
old-commit-hash: c646eeee0a
2022-06-10 16:16:46 -07:00
ZwX1616
02f0f39b52 fullframe DM model (#24762)
* get log

* simplify two nonsense

* not needed

* libyuv is a joke

* clean up

* try small

* fast but not bad

* working

* clean up driverview

* simplified

* thats mirrored

* smol

* tweak

* ref is screen

* w/ ee

* update camera model

* no if TICI

* start

* update pose thresh

* less cpu more dsp

* new libyuv

* new snpe

* add files

* test

* should be fast

* update out len

* trigger test

* use master snpe

* add cereal

* update cereal

* refactor parsing

* missing ;

* get

* wrong type

* test model

* use driver data

* 10829278-72fe-4283-a118-2cef959ce174/1550

* no pf

* adapt driverview

* ;

* rhd learner

* update libyuv buildi x64

* ad4337ea

* remove blink slack

* test

* no

* use toggle

* b16

* fix for nv12

* 5b02cff5 both

* update test

* update cereal

* update cereal

* update cereal

* v2 packets

* revert libyuv

* no /

* update snpemodel

* ;

* memcpy

* fix test

* use toggle in driverview

* update power

* update replay

* Revert "update replay"

This reverts commit 1d0979ca59dbc89bc5890656e9501e83f0556d50.

* update model ref

* halve cpu

* fake 8bit onnx runner

* same thresh as report

* cereal master

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: d6c07a6b15
2022-06-08 20:13:46 -07:00
ZwX1616
e8a8e37185 DM: more precision running on DSP + e2e outputs (#23900)
* update cereal

* run but not use

* log distraction type

* regression scaling

* clean up naming

* add calib buf

* add to header

* fake model

* no calib model

* adjust threshs

* 018a305f

* fix bn

* tweak1

* tweak2

* 0ff2/666

* tweak3

* t4

* t5

* fix out of bound

* skip when replaying old segments

* update ref

* fix onnxmodel

* get calib

* update model replay refs

* up ref
old-commit-hash: de4031c98e
2022-03-15 19:02:21 -07:00
Dean Lee
c6b88e5d7b dmonitoringd: remove duplicate call on update when driver engaged (#23539)
old-commit-hash: d3505fb8c7
2022-01-18 18:27:21 -08:00
Willem Melching
139000950b dmonitoringd: make real-time process (#23554)
* dmonitoringd: make real-time process

* Update selfdrive/monitoring/dmonitoringd.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: d31ff2cf49
2022-01-18 13:39:11 -08:00
ZwX1616
f464a02782 DM: more adaptive pose policy (#23184)
* rename and add dep

* proto thresholds

* tweak vk

* update natural offset and clip offsets

* 95th looks good

* no punish for being relaxed

* yaw laplace only

* some pay more attention

* update ref

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: af5a418fa6
2021-12-14 12:13:59 -08:00
ZwX1616
0c86b59eff move DriverStatus params to class (#21668)
* move to dict

* cleanup

* fix unittest

* use settings class
old-commit-hash: ff573e8c4a
2021-07-23 21:18:28 -07: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: ae094042ad
2021-04-07 15:36:37 +02: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: 000bd226aa
2021-02-03 19:57:30 -08: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: 124100d0fa
2021-01-19 17:15:16 -08:00
ZwX1616
d0726d1f7d face icon reflects DM policy (#19842)
* send that

* draw icon based on whether active

* Update selfdrive/monitoring/dmonitoringd.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 88430f12f4
2021-01-19 15:11:15 -08:00
Adeeb Shihadeh
f9e7d4865b cleanup DM tests (#19540)
* cleanup first

* more cleanup

* little more

* little more
old-commit-hash: 2ab2ae1fed
2020-12-19 15:06:56 -08:00
ZwX1616
3da8dc9b25 use enabled flag from controlsState instead of carState (#2518)
* use enabled from controls instead of carstate

* update process replay

* rm

* fix long test

* update reff

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: d8fea41b2a
2020-11-12 17:30:33 -08:00
Adeeb Shihadeh
bdf52941c8 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
old-commit-hash: ef21b83937
2020-09-16 15:33:12 -07:00
Adeeb Shihadeh
3372b5e878 tici driver monitoring (#2158)
* use cpu for now on tici

* pin to core 5

* fix driver view

* probably wrong

* correct this time

* RHD too

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: fdbfe52927
2020-09-12 17:50:22 -07:00
Adeeb Shihadeh
64a9728f2e 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
old-commit-hash: e0004d0981
2020-09-10 12:16:29 -07:00
Adeeb Shihadeh
6eddfac1a6 Reduce plannerd and dmonitoringd CPU usage (#2108)
* fix wasted cycles in locationd and dmonitoringd

* bump cereal

* calibrationd

* Revert "calibrationd"

This reverts commit 580051a33bc96e1e83300629e9c04817928d0851.

* 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
old-commit-hash: 21fbe26980
2020-09-01 16:41:09 -07:00
Adeeb Shihadeh
91ac4efab2 driver monitoring cleanup (#2101)
* read rhd from param

* don't need that anymore

* fix build

* bump cereal

* read param from camerad too

* add read_db_bool helper

* bump model replay ref commit, IsRHD wasn't set
old-commit-hash: 349040d958
2020-08-29 17:16:00 -07:00
Adeeb Shihadeh
cadf1a08f5 small dmonitoringd cleanup
old-commit-hash: 732df68d84
2020-08-21 14:55:12 -07:00
Adeeb Shihadeh
4cb22dcc80 only check offroad in dmonitoringd on init
old-commit-hash: 31f57cb3a3
2020-08-07 10:48:03 -07:00
Adeeb Shihadeh
069bd4061e Driver view refactor (#1869)
* quick driver view cleanup

* send at correct freq

* let manager handle that

* don't block starting on driver view

* fix UI hacks

* ui cleanup

* move driver view functionality into dmonitoringd

* dmonitoring thresholds shouldnt be in UI

* remove driver view file from release files

* timeout on frontview

* bump cereal
old-commit-hash: a7ee2a53a8
2020-08-01 17:26:35 -07:00
eFini
8518687228 gas pressed treats as driver engaged (#1895)
old-commit-hash: 75565b0635
2020-07-20 15:20:24 +02:00
Adeeb
ea0292d86e Move driver monitoring out of controls (#1642)
* move dmonitoring out of controls

* run monitoring unit tests in CI
old-commit-hash: d4858e5ff5
2020-06-09 13:25:15 -07:00