Commit Graph

147 Commits

Author SHA1 Message Date
Justin Newberry
3027a428cb Pytest: tici mark for skipping on-device tests (#30412)
* mark tici

* not those ones

* missed that one

* add those

* add pypoetry

* oops
old-commit-hash: aec7cea30d
2023-11-07 17:35:44 -08:00
Justin Newberry
40757d9d01 Mapsd: move on the CPU (#30349)
* mapsd -> cpu

* link directly to mesa

* Fix gitignore

* without launcher script

* dont change that

* dont need that

* add to files_common

* rename to configure cpu rendering

* without a symlink!

* update time refs

* update ref

* update ref

* remove duplicate include

* bump up again

---------

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: bdf2fa0f83
2023-11-06 09:04:53 -08:00
Justin Newberry
0785258458 test_onroad: assert the procs that use the GPU (#30359)
* test gpu

* keep it localiized

* has to be later

* reduce diff

---------

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: ddbdaf3cf9
2023-11-01 17:31:54 -07:00
Harald Schäfer
7c4d29c3d1 Rm laikad (#30299)
* rm laika

* Rm laika

* Needed this

* More rm

* More rm
old-commit-hash: 56dea7b0b4
2023-10-23 00:15:39 -07:00
Adeeb Shihadeh
3d602a86dc delete clocksd (#30252)
old-commit-hash: 67f2321060
2023-10-22 14:47:38 -07:00
YassineYousfi
d18f185115 modeld: parsing and publishing in python (#30273)
* WIP try modeld all in python

* fix plan

* add lane lines stds

* fix lane lines prob

* add lead prob

* add meta

* simplify plan parsing

* add hard brake pred

* add confidence

* fix desire state and desire pred

* check this file for now

* rm prints

* rm debug

* add todos

* add plan_t_idxs

* same as cpp

* removed cython

* add wfd width - rm cpp code

* add new files rm old files

* get metadata at compile time

* forgot this file

* now uses more CPU

* not used

* update readme

* lint

* copy this too

* simplify disengage probs

* update model replay ref commit

* update again

* confidence: remove if statemens

* use publish_state.enqueue

* Revert "use publish_state.enqueue"

This reverts commit d8807c8348338a1f773a8de00fd796abb8181404.

* confidence: better shape defs

* use ModelConstants class

* fix confidence

* Parser

* slightly more power too

* no inline ifs :(

* confidence: just use if statements
old-commit-hash: cad17b1255
2023-10-19 14:23:51 -07:00
Adeeb Shihadeh
f89f1ce4ab Update test_onroad.py
old-commit-hash: 09c8866d17
2023-10-19 10:36:18 -07:00
Adeeb Shihadeh
87f77825db test_onroad: log sizes check (#30265)
* test_onroad: check log sizes

* fix

* check logs

* rb

* len

* pytest

* mb

* corolla log is small

* adjust qlog
old-commit-hash: 13d780a5f2
2023-10-18 19:44:46 -07:00
Adeeb Shihadeh
c3aa58b492 cleanup up old lib64 references (#30246)
* cleanup sensord

* rm rest

* fix that

* update that
old-commit-hash: f0aa631818
2023-10-14 20:39:15 -07:00
Shane Smiskol
13381ed446 services: capitalize constant service list (#30005)
* rename

* bump

* Apply suggestions from code review
old-commit-hash: 7f073483bb
2023-09-21 18:25:15 -07:00
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
c7029ea15a System: cleanup paths to use a common class (#29816)
* use OP prefix for logmessage

* cleanup paths too

* cleanup the paths too

* add hw.py to release

* fix those issues

* fix unittests

* fix unittests

* fix unittests

* do swaglog_ipc properly across all the files

* fix that

* fix swaglog in c++

* review suggestions
old-commit-hash: bfe990b112
2023-09-07 11:32:47 -07:00
Mitchell Goff
a3fbbb26ac Rewrite modeld in python (#29230)
* Added modeld.py (WIP)

* No more VisionIpcBufExtra

* Started work on cython bindings for runmodel

* Got ONNXModel cython bindings mostly working, added ModelFrame bindings

* Got modeld main loop running without model eval

* Move everything into ModelState

* Doesn't crash!

* Moved ModelState into modeld.py

* Added driving_pyx

* Added cython bindings for message generation

* Moved CLContext definition to visionipc.pxd

* *facepalm*

* Move cl_pyx into commonmodel_pyx

* Split out ONNXModel into a subclass of RunModel

* Added snpemodel/thneedmodel bindings

* Removed modeld.cc

* Fixed scons for macOS

* Fixed sconscript

* Added flag for thneedmodel

* paths are now relative to openpilot root dir

* Set cl kernel paths in SConscript

* Set LD_PRELOAD=libthneed.so to fix ioctl interception

* Run from root dir

* A few more fixes

* A few more minor fixes

* Use C update_calibration for now to exactly match refs

* Add nav_instructions input

* Link driving_pyx.pyx with transformations

* Checked python FirstOrderFilter against C++ FirstOrderFilter

* Set process name to fix test_onroad

* Revert changes to onnxmodel.cc

* Fixed bad onnx_runner.py path in onnxmodel.cc

* Import all constants from driving.h

* logging -> cloudlog

* pylint import-error suppressions no longer needed?

* Loop in SConscript

* Added parens

* Bump modeld cpu usage in test_onroad

* Get rid of use_nav

* use config_realtime_process

* error message from ioctl sniffer was messing up pyenv

* cast distance_idx to int

* Removed cloudlog.infos in model.run

* Fixed rebase conflicts

* Clean up driving.pxd/pyx

* Fixed linter error
old-commit-hash: 72a3c987c0
2023-08-25 14:36:26 -07:00
Adeeb Shihadeh
b952317e9b soundd: update cpu usage
old-commit-hash: e0e139a233
2023-08-22 15:16:38 -07:00
Adeeb Shihadeh
783463db74 sensord: update cpu usage after removing light sensor
old-commit-hash: 6a5725bb38
2023-08-22 14:03:15 -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
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
Justin Newberry
a14f162bc7 Ruff: comprehensions conventions (#29317)
ignore c408
old-commit-hash: 4a9afd7554
2023-08-10 16:40:30 -07:00
Adeeb Shihadeh
b7f6b6dc95 pytest unit test running (#29261)
* setup config

* collect passes

* pytest system/ works
old-commit-hash: 670fa9af5f
2023-08-10 08:23:19 -07:00
Harald Schäfer
1fd2125bfa Laikad cpu usage: enable test onroad (#28926)
* enable test onroad

* Better

* specify range

* fix printing

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 7613f6918b
2023-07-15 23:06:42 -07:00
Shane Smiskol
945169aa2c test_onroad: lower ui CPU usage (#28927)
lower from multiple runs
old-commit-hash: c541074669
2023-07-13 23:47:12 -07:00
Adeeb Shihadeh
c699443eee revert accidental enable
old-commit-hash: 69e7f386a7
2023-07-10 17:22:09 -07:00
Adeeb Shihadeh
74981f0d8d Update test_onroad.py
old-commit-hash: 24de4a6204
2023-07-10 16:40:09 -07:00
Adeeb Shihadeh
48808e274d test onroad: stricter ui timings check (#28853)
old-commit-hash: 740380bf05
2023-07-08 22:26:53 -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
Adeeb Shihadeh
d2ec950790 test onroad: explicit memory leak check (#28502)
old-commit-hash: 2f117e88b7
2023-06-11 14:43:25 -07:00
ZwX1616
f499b6dc64 ci: test sof diffs in onroad test (#27723)
* add diff test

* skip

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: a2e11b2f48
2023-06-02 21:23:32 -07:00
Adeeb Shihadeh
4174ac224d test_onroad: tizi updates (#28379)
* test_onroad: add tizi support

* don't clear params on desk device

* update

* fix mypy

---------

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 80d8dcd22e
2023-06-02 21:18:51 -07:00
Adeeb Shihadeh
7e64d60f4b test_onroad: ignore vehicleModelInvalid (#28335)
* test_onroad: ignore vehicleModelInvalid

* not for all ci
old-commit-hash: cd57b340c1
2023-06-01 10:26:08 -07:00
Adeeb Shihadeh
2aa55ce54a update loggerd and ui cpu
old-commit-hash: 9f3c0a7781
2023-05-24 10:04:53 -07:00
Adeeb Shihadeh
1ae2769a72 adjust uploader cpu usage
old-commit-hash: a3d5913228
2023-05-22 10:48:15 -07:00
Adeeb Shihadeh
8de1d811da test onroad: add gpsLocationExternal to gps proc list
old-commit-hash: 1b12f17ee3
2023-05-22 01:10:24 -07:00
Adeeb Shihadeh
a3dcc5cd97 time to onroad test (#28242)
* time to onroad test

* run few times

* test on stripped builds

* manager

* cleanup

* split those out

* run first

---------

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 39c5d492bf
2023-05-20 17:59:41 -07:00
Adeeb Shihadeh
2bb12fc0fc test_onroad: handle spotty gps in testing closet (#28194)
old-commit-hash: fbcf6ced51
2023-05-15 12:45:19 -07:00
Adeeb Shihadeh
8cb0a252ae test onroad: ensure 100% engageability (#28132)
old-commit-hash: 984029b606
2023-05-08 13:48:42 -07:00
Adeeb Shihadeh
e631d24d77 Jenkins tuneup (#28095)
* tuneup

* use service messages

* logmono

* not passive
old-commit-hash: d5a0a4b3e8
2023-05-03 16:52:20 -07:00
Adeeb Shihadeh
a25d2f95de test_onroad: enforce CPU usage test for all procs (#28024)
* cleanup

* add missing procs

* ugh not systemd

* floor

* unused

* handle laikad

* continue

---------

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 64df41c9af
2023-05-01 21:35:10 -07:00
Adeeb Shihadeh
5df915f197 ci: locationd cpu has increased a bit
old-commit-hash: cddb7c37e6
2023-04-01 16:05:51 -07:00
Adeeb Shihadeh
3a968c67e1 loggerd: move to system/ (#27534)
old-commit-hash: 94eb215980
2023-03-08 11:20:49 -08:00
Harald Schäfer
73561f01e0 Expand lateral MPC to 10s (#27343)
* 10s lat

* Full length MPC

* redfine N

* Leave controls the same for now

* Updates

* use long plan in lat plan

* interp plan

* add new interp

* simplergit add selfdrive/controls/plannerd.py selfdrive/controls/

* expand to 10s

* revert this

* fix linter

* Update sconscripts

* fix test

* fix test

* fix test

* Revert "Update sconscripts"

This reverts commit 6e23c69dcebd5ed003e37e01921f6af7c31de0db.

* Dont import drive helpers

* better compile deps

* fix compile

* comment

* update replay

* Update plannerd time
old-commit-hash: 04fe6c4ec7
2023-02-17 15:28:26 -08:00
Adeeb Shihadeh
3a3ae6c75f bump up controlsd cpu usage
old-commit-hash: 0589ff23a5
2022-11-02 15:51:52 -07:00
Adeeb Shihadeh
96ba2b3c1a test_onroad: temp disable max UI draw time check
old-commit-hash: bdbdd42d5b
2022-11-01 23:18:56 -07:00
Adeeb Shihadeh
60cb813af5 ui: publish draw times + add test (#26119)
* ui: publish draw times + add test

* add some checks

* adjust

* fix linter

* update max

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 15b8c7d1dc
2022-10-17 17:14:38 -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
Kurt Nistelberger
763cfa8c4e sensord: increase cpu usage in onroad test (#25773)
Co-authored-by: Kurt Nistelberger <kurt.nistelberger@gmail.com>
old-commit-hash: 98c843bfb4
2022-09-13 22:28:00 -07:00
Adeeb Shihadeh
600d136bbf fix encoderd cpu usage
old-commit-hash: 21d7c540d2
2022-08-28 21:20:19 -07:00
Adeeb Shihadeh
f68770eb3a test onroad: update dmonitoringd cpu usage
old-commit-hash: 62bb70ef29
2022-08-21 14:29:52 -07:00
Adeeb Shihadeh
bbad107007 test onroad: more robust CPU usage test (#25375)
* test onroad: more robust CPU usage test

* fix linter

* remove debug print

* Revert "remove debug print"

This reverts commit 172cb655fe3558abeb0ec6432ff24b90c0aab183.

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 80cbcafb5f
2022-08-05 16:12:32 -07:00
Willem Melching
0c2afda822 enable laikad (#25013)
* enable laikad

* increase logprint for onroad test
old-commit-hash: cdc7a6dbea
2022-07-01 08:26:41 -07:00