Commit Graph

184 Commits

Author SHA1 Message Date
Mitchell Goff
5732002296 Rewrite dmonitoringmodeld in python (#29740)
* Added dmonitoringmodeld.py

* Removed dmonitoringmodeld.cc

* Use ModelRunner helpers from runners/__init__.py

* Fixed DriverStateResult field ordering

* Some bug fixes

* Set calib input

* Look ma, no loop!

* Bump dmonitoringmodeld cpu usage in test_onroad

* Fixed memory leak caused by np.ctypes.data_as

* Formatting fixes

* chmod +x

* remove USE_ONNX_MODEL

* Realtime priority 1, formatting fixes
old-commit-hash: 503fa121ee
2023-09-07 19:46:43 -07:00
Mitchell Goff
f9daa1d1cc Rewrite navmodeld in python (#29579)
* Added navmodeld.py

* Deleted navmodeld.cc

* Write SConscript config flags to config.py

* Remove deleted files from release/files_common

* Some more bug fixes

* Added config.py to gitignore

* Get rid of config.py

* Use set_realtime_priority

* A tiny bit more cleanup

* set realtime priority 1

* Use ModelRunner helper class from runners/__init__.py

* Formatting fixes

* mama mia that's a SPICY memory leak
old-commit-hash: 0c0af682a1
2023-09-07 14:39:37 -07:00
Justin Newberry
c4f322ce2d Linter: remove pylint (#29611)
remove pylint
old-commit-hash: 1ee6ed4b16
2023-08-24 16:30:54 -07:00
Adeeb Shihadeh
61cf541322 Minimal build (#29600)
* add build flag for minimum build

* add minimal build

* update

* fix pj

* bump opendbc

* update subaru
old-commit-hash: 4917e22615
2023-08-24 14:58:30 -07:00
Adeeb Shihadeh
5bc6566e7c manager: refactor process starting logic (#29574)
* refactor into sane api

* always set

* cleanup

* cleanup

* and there too

* fix order

* fail

* and ensure we test

* pass test

pass test

* order

* only diff not related

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: d013f2174a
2023-08-24 06:00:55 -07:00
Shane Smiskol
8326f9f90c manager: test process exclusion (#29586)
* add test

* add comment

* Update selfdrive/manager/test/test_manager.py

* more accurate
old-commit-hash: 84b897cf44
2023-08-24 00:34:36 -07:00
Adeeb Shihadeh
e9a497dc5b build.py: retry with less threads (#29543)
* build.py: retry with less threads

* cleanup

* fix no output

* cleanup
old-commit-hash: bb1b641812
2023-08-22 20:58:43 -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
Adeeb Shihadeh
51634f52dc replace custom clock helpers with time module (#29499)
* replace custom clock stuff wtih time module

* fix double

* fix release

* bump cereal

* update type

* fix one more
old-commit-hash: d61f86d339
2023-08-20 18:50:58 -07:00
Shane Smiskol
92ff85f4b4 Update TOTAL_SCONS_NODES
Should add a CI test for this
old-commit-hash: 3e2903a0c1
2023-08-14 17:34:19 -07:00
Vivek Aithal
8d11558056 [commabody] setup and run live stream encoders (#29087)
* op changes needed for body

* remove logmessaged callback

* add newlines

* add stream arg

* add stream_encoder to config

* supersets, avoid two encoderd

* fix recursive exit error

* fix loggerd crash

* add stream_encoderd cpu usage to test

* Update system/loggerd/loggerd.h

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

* resolve comments

* stream_encoderd onroad to false

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 81322a4805
2023-08-11 15:34:25 -07:00
Justin Newberry
d487c0501f Ruff: enable most of bugbear (#29320)
* added mutable default args

* most of the Bs

* add comment about lrucache
old-commit-hash: 62c1e65924
2023-08-11 15:33:49 -07:00
Vivek Aithal
c1bcb53d4e [commabody] Add new body teleop ui (#29282)
* Revert "Revert "[commabody] Add new body teleop ui (#29119)" (#29249)"

This reverts commit 5dcfddbbfbddf00d16cb1f28c51f3dffc75d7cf6.

* add to release files

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: e7d307ca1b
2023-08-08 14:12:51 -07:00
Harald Schäfer
c0fbbd4b36 Revert "[commabody] Add new body teleop ui (#29119)" (#29249)
This reverts commit 0df6353569b77869ce4ddc8ce43bab621bccd107.
old-commit-hash: 623351e4ed
2023-08-05 07:15:35 -07:00
Vivek Aithal
082b1fd924 [commabody] Add new body teleop ui (#29119)
* add new ui

* move body tele op ui to new dir

* fix codespell errors

* resolve mediablackhole pylint error

* fix import error

* style fixes

* use logging, not print

* fix js styling

* resolve comments
old-commit-hash: a7304d059c
2023-08-04 13:56:46 -07:00
Adeeb Shihadeh
6cdd601cfe manager: remove old unkillable process handling (#29209)
old-commit-hash: bc0aa1c598
2023-08-01 22:18:58 -07:00
Kacper Rączy
67ac96c8b4 process_replay: capture process output (#29027)
* Add ProcessOutputProxy

* Move launcher to its own field

* Move ProcessOutputCapture to its own file

* Return itself from __enter__ of OpenpilotPrefix

* Integrate ProcessOutputCapture into process_replay

* Add note about capture_output_store to README

* ipykernel import is optional

* Disable type checking for link_with_current_proc

* Remove assertion

* Decode outputs to utf-8

* read(self): return empty buf if its none

* Fix type annotations

* Replace fifo with regular file, to avoid hitting fifo size limit
old-commit-hash: 547a033a3c
2023-07-31 16:30:58 -07:00
Adeeb Shihadeh
fcdc91aa35 mapsd exit needs some work
old-commit-hash: 571bf47b0a
2023-07-24 20:22:14 -07:00
Adeeb Shihadeh
d76b76c090 test_manager: skip mapsd check for now
old-commit-hash: 2aa3000371
2023-07-18 19:15:47 -07:00
Adeeb Shihadeh
ebae4d9579 manager: create params once (#28757)
old-commit-hash: 260e83d8e4
2023-06-30 10:03:45 -07:00
Adeeb Shihadeh
6baeca82c7 manager: write ublox param on change (#28748)
old-commit-hash: 9ca96cc4b1
2023-06-29 16:05:00 -07:00
Mitchell Goff
77b5e197aa Enable nav features in modeld (#28448)
* Enable nav features in modeld

* Enable mapsd/navmodeld

* Updated model_replay_ref_commit and added mapsd/navmodeld to test_onroad

* fixed process name

* always publish from mapsd
old-commit-hash: aadd9ae269
2023-06-16 21:27:35 -07:00
Mitchell Goff
300071a27c Rename map_renderer -> mapsd (#28580)
old-commit-hash: 6509cde41b
2023-06-16 20:12:50 -07:00
Adeeb Shihadeh
ee363d69e3 fix a bunch of python warnings (#28576)
* fix a bunch of python warnings

* fix that
old-commit-hash: 111b4eee30
2023-06-16 13:22:30 -07:00
Adeeb Shihadeh
2b9b5e3646 manager: watchdog restart UI with SIGKILL (#28523)
old-commit-hash: 58d32a70d7
2023-06-12 21:46:20 -07:00
Adeeb Shihadeh
2d3f8208f7 soundd: only run onroad (#28449)
old-commit-hash: 3e3c8b7ddf
2023-06-07 16:24:54 -07:00
Harald Schäfer
36aa81cdc3 Driving Personality setting (also changes follow distance) (#24742)
* Skeleton

* Adjustable follow parameter

* fix rebase

* long planner

* typo

* Add ui toggle

* Fix icon

* Improve text

* Better toggle position

* Im a UX engineer now

* add param reader

* CHange jerk to have same crash test performance

* Try reading param

* Unused comment

* translate ui text

* std stoi

* Parametrized buttons

* Empty strings are ints

* Move to generic

* Update translations

* Fix translation diffs

* Release notes

* update refs

* tweaks

* Misc fixes

* No param is standard
old-commit-hash: 205c900742
2023-06-05 22:17:41 -07:00
Shane Smiskol
72c64ed1bc manager: clear onroad/offroad transition params on start (#28199)
* clear onroad transition params

* all offroad params also have manager start
old-commit-hash: 75fc029130
2023-05-24 20:46:59 -07:00
Shane Smiskol
f1c9f13c7f manager: initialize onroad params before starting processes (#28198)
* initialize to off on startup

* params

* better

* better

* move to helpers

* rm
old-commit-hash: 22ce4e17ba
2023-05-16 12:45:05 -07:00
Shane Smiskol
a14463cbe3 onroad transition: clear params and start safety setter thread (#28151)
* rename from ignition to onroad/offroad

* forgot one

* clear in manager

* don't clear in boardd anymore

fix

* params isn't used here

* add comment

* Revert "add comment"

This reverts commit 54fb6660501679e5a989c3f06c0a438bdb04dc7e.

* write params in manager

* first part is self explanatory

* remove these from thermald now

* start safety setter thread with IsOnroad

* drivesss

* more

* less

* come back

* makes sense here
old-commit-hash: b8fa7f58ea
2023-05-09 21:25:23 -07:00
Cameron Clough
1e8bd0411f cloudlog: add git to ctx (#27996)
* cloudlog: add git to ctx

* use normalised origin, change names

* order
old-commit-hash: a33af9cb74
2023-04-21 22:35:50 -07:00
Adeeb Shihadeh
388613c0c3 manager: log time with exit param (#27615)
* manager: log time with exit param

* fix double brackets
old-commit-hash: 455d76cdb6
2023-03-17 16:17:42 -07:00
Adeeb Shihadeh
a1b574b737 only run rawgpsd without a ublox (#27577)
old-commit-hash: 39cf8c6694
2023-03-14 13:31:49 -07:00
Adeeb Shihadeh
de9a100719 ubloxd: move to system/ (#27536)
* ubloxd: move to system/

* more fixes

* add missing sconscript

* fix valgrind tests

* uncomment
old-commit-hash: c97911dbad
2023-03-08 16:11:18 -08:00
Adeeb Shihadeh
3a968c67e1 loggerd: move to system/ (#27534)
old-commit-hash: 94eb215980
2023-03-08 11:20:49 -08:00
Adeeb Shihadeh
47d30174d3 sensord: move to system/ (#27531)
* sensord: move to system/

* add gitignore to releaes files
old-commit-hash: 6f40f0d442
2023-03-08 10:56:54 -08:00
Adeeb Shihadeh
17f1f3eb58 No disengage on gas by default (#27472)
old-commit-hash: d6abf1d572
2023-03-01 13:38:49 -08:00
Shane Smiskol
9710be7ba1 Bump total scons nodes
old-commit-hash: cb50244a89
2023-02-02 13:03:53 -08:00
Adeeb Shihadeh
276f026749 jenkins: tmp disable sim test due to ZMQ bug (#27043)
old-commit-hash: 100fe10c7c
2023-01-22 15:08:36 -08:00
Comma Device
487189dae5 test manager: use ensure_running to start relevant procs
old-commit-hash: 4293705648
2023-01-22 16:28:20 -06:00
Adeeb Shihadeh
69680e5a93 UI: show experimental long available to release users (#26910)
* UI: show experimental long available to release users

* more description

* cleanup

* hide toggle

* fix process replay

* clear param

* actually fix
old-commit-hash: c408b7e306
2023-01-19 23:06:18 -08:00
Adeeb Shihadeh
cd2756da23 don't run ublox procs without ublox (#26965)
* pigeond: don't run if ublox missing

* same for ubloxd

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 6861c99991
2023-01-14 23:06:09 -08:00
Adeeb Shihadeh
b3e47c691b move all third party stuff into third_party/ (#26853)
* mv fastcluster

* move msm_kgsl.h

* camerad include

* update path

* mv pyextra

* fix tici build

* add acados_template to release build

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: cd8e03d53e
2022-12-31 21:00:50 -08:00
Mitchell Goff
46f70592ae navmodeld (#26665)
* Added navmodeld

* New nav model: 7c306685-5476-4bd4-ab65-105b01b6bca8/300, feats only

* little cleanup

* Remove NAV flag

* Moved to_kj_array_ptr to commonmodel.h

* Switch from decimation to last_frame_id check

* add to release files

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: bb8a38a050
2022-12-02 13:14:30 -08:00
Cameron Clough
9bcf83f493 micd: scale sound volume with ambient noise level (#26399)
* test changing sound volume

* test changing sound volume

* create system/hardware/pc/hardware.h

* implement Hardware::set_volume using pactl

* soundd: use Hardware::set_volume

* add sounddevice dependency

* sounddevice example

* simple micd

* cleanup

* remove this

* fix process config

* add to release files

* hardware: get sound input device

* no more offroad

* debug

* calculate volume from all measurements since last update

* use microphone noise level to update sound volume

* fix scale

* mute microphone during alerts

* log raw noise level

* hardware: reduce tici min volume

* improve scale

* add package

* clear measurements on muted

* change default to min volume and respond quicker

* fixes

Co-authored-by: Shane Smiskol <shane@smiskol.com>

* logarithmic scaling

* fix

* respond quicker

* fixes

* tweak scaling

* specify default device

* Revert "hardware: get sound input device"

This reverts commit 50f594f7a3bab005023482bc793147a8c8dae5d7.

* tuning

* forgot to update submaster

* tuning

* don't mute microphone, and clip measurement

* remove submaster

* fixes

* tuning

* implement Hardware::set_volume using pactl

* Revert "test changing sound volume"

This reverts commit 4bbd870746ec86d1c9871a6175def96cf7f751a6.

* draft

* draft

* calculate sound pressure level in dB

* fix setting

* faster filter

* start at initial value

* don't run command in background

* pactl: use default sink

* use sound pressure db

* tuning

* bump up max volume threshold

* update filter slower

* fix divide by zero

* bump cereal

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 108ff15f5d
2022-11-30 21:56:03 -08:00
Kurt Nistelberger
2efa3cecc1 CI: regroup devices (#26436)
* regroup ci devices

* cleanup looopback test

* split loopback devices

Co-authored-by: Kurt Nistelberger <kurt.nistelberger@gmail.com>
old-commit-hash: 5f094b8368
2022-11-11 21:50:09 -08:00
Mitchell Goff
656788eb36 Compute zoom level and downsample image in map_renderer.cc (#26315)
* Automatically zoom to fixed scale in map_renderer.cc

* Always downsample in map_renderer

* Remove updateZoom function

* Added mapsd to process_config.py (commented out for now)
old-commit-hash: fcd6125deb
2022-11-01 19:16:37 -07:00
Adeeb Shihadeh
7176feffdc always enable rawgps on tici (#25987)
old-commit-hash: 9935a65115
2022-10-06 13:47:09 -07:00
Cameron Clough
597b949813 networking: add unmetered cellular toggle (#25902)
* add metered toggle to UI

* add GsmMetered param

* add NMMetered constants

* change LTE connection settings: connection.metered

* change to GsmUnmetered override

* update translations

* debug ui

* remove comment

* Revert "debug ui"

This reverts commit 2ad9e65ea229b814782be9f30cc7664125d7e908.

* 'Force Unmetered Cellular' toggle

* update translations

* remove description

* update translations

* change unmetered to metered
old-commit-hash: f611960391
2022-10-01 14:47:06 -07:00
Vivek Aithal
51d25b2011 Live torque (#25456)
* wip torqued

* add basic logic

* setup in manager

* check sanity and publish msg

* add first order filter to outputs

* wire up controlsd, and update gains

* rename intercept to offset

* add cloudlog, live values are not updated

* fix bugs, do not reset points for now

* fix crashes

* rename to main

* fix bugs, works offline

* fix float in cereal bug

* add latacc filter

* randomly choose points, approx for iid

* add variable decay

* local param to capnp instead of dict

* verify works in replay

* use torqued output in controlsd

* use in controlsd; use points from past routes

* controlsd bugfix

* filter before updating gains, needs to be replaced

* save all points to ensure smooth transition across routes, revert friction factor to 1.5

* add filters to prevent noisy low-speed data points; improve fit sanity

* add engaged buffer

* revert lat_acc thresh

* use paramsd realtime process config

* make latacc-to-torque generic, and overrideable

* move freq to 4Hz, avoid storing in np.array, don't publish points in the message

* float instead of np

* remove constant while storing pts

* rename slope, offset to lat_accet_factor, offset

* resolve issues

* use camelcase in all capnp params

* use camelcase everywhere

* reduce latacc threshold or sanity, add car_sane todo, save points properly

* add and check tag

* write param to disk at end of route

* remove args

* rebase op, cereal

* save on exit

* restore default handler

* cpu usage check

* add to process replay

* handle reset better, reduce unnecessary computation

* always publish raw values - useful for debug

* regen routes

* update refs

* checks on cache restore

* check tuning vals too

* clean that up

* reduce cpu usage

* reduce cpu usage by 75%

* cleanup

* optimize further

* handle reset condition better, don't put points in init, use only in corolla

* bump cereal after rebasing

* update refs

* Update common/params.cc

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

* remove unnecessary checks

* Update RELEASES.md

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 4fa62f1464
2022-09-19 15:19:26 -07:00