Commit Graph

418 Commits

Author SHA1 Message Date
Shane Smiskol
26f972b9f7 Bump opendbc (#34525)
* no debug param and new import

* bump

* bump to master

* and fix that

* oop

* bump to master
2025-02-03 21:05:23 -08:00
Mauricio Alvarez Leon
c57f535238 add adb toggle to developerPanel (#34459)
* add adb toggle to developerPanel

* translations + toggleOrder

* initial docs

* move adb.sh into toggle

* finish up docs

* QProcess

* adbToggle h

* translations

* vanish translations

* description

* tr

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-01-25 13:24:24 -08:00
Sammohana
8eebce75ac Getting rid of openpilot.common.numpy_fast (#34368)
* Got rid openpilot.common.numpy_fast

* fixed some data type erros

* importing numpy instead of importing specific functions

* fixing some numpy importing mistakes

* Update selfdrive/car/cruise.py

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-01-14 14:52:56 -08:00
Shane Smiskol
db2032c398 Move uds.py (#34374)
* rm uds pt. 1

* rm uds pt. 2

* imports
2025-01-13 00:54:10 -08:00
Adeeb Shihadeh
420d6f0d5e Quick GC pass heading into 2025 (#34330)
* first pass

* bye bye snpe
2025-01-05 15:10:24 -08:00
Maxime Desroches
14123e94bb cleanup touch_replay (#34305)
mathematics
2024-12-23 17:30:05 -05:00
Maxime Desroches
155d842a3b set plot limits for touch events viz (#34277)
lim
2024-12-17 15:10:13 -08:00
Maxime Desroches
70fa0ab4c1 debug: touch events plot (#34242)
* replay

* remove
2024-12-14 13:09:59 -08:00
Adeeb Shihadeh
f3c4770f91 debug: migrate old logs 2024-12-06 10:53:02 -08:00
commaci-public
c6e4241bad [bot] Update Python packages (#34140)
* Update Python packages

* pin

* fstring

* this too

---------

Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
2024-12-04 15:34:54 -08:00
Dean Lee
685dc5a80c selfdrive/debug: fix broken check_can_parser_performance.py (#34143)
fix broken check_can_parser_performance.py
2024-12-02 20:17:02 -08:00
Dean Lee
6fc14b5b93 selfdrive/debug: fix broken check_can_parser_performance.py (#33908)
* fix check_can_parser_performance.py

* no difference

* this too

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2024-11-01 16:35:39 -07:00
Jason Young
8b5df1e9ee tools: print VIN when getting UDS fingerprints from a route (#33750)
* tools: print VIN when getting UDS fingerprints

* set in case not there

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2024-10-08 13:41:02 -07:00
Shane Smiskol
7556233cca Reapply "move car.capnp to opendbc (#33722)" (#33728)
* Reapply "move car.capnp to opendbc" (#33725)

This reverts commit 9d52a5b485.

* why can't i repro?!

* Revert "why can't i repro?!"

This reverts commit 0435d218f790faf7b7aaed27d05ab9ee67b087e6.

* does this cause card to try and read it?

* better place

* wtf

* Reapply "why can't i repro?!"

This reverts commit d24fd5a0abf454f47d5591e3b39039fdc4d0251c.

* also here
2024-10-03 22:47:03 -07:00
Shane Smiskol
9d52a5b485 Revert "move car.capnp to opendbc" (#33725)
Revert "move car.capnp to opendbc (#33722)"

This reverts commit 8149f7cb11.
2024-10-03 16:57:45 -07:00
Shane Smiskol
8149f7cb11 move car.capnp to opendbc (#33722)
* move car.capnp to opendbc

* bump

* do card

* fix some more tests

* rm helpers

* format fp

* more

* whoops

* bump

* bump to master
2024-10-03 16:40:24 -07:00
Shane Smiskol
af774d894e Deprecate car onroadEvents (#33687)
* new OnroadEvent struct

* and migrate python

* more forgotten

* re-index new OnroadEvent struct

* fix!

* more missing

* migrate onroadEvents

migrate onroadEvents

* migrate dm events

* hacks to get proc replay to say succeeded

* Revert "hacks to get proc replay to say succeeded"

This reverts commit 0bb8803e5755d606ae9f09da5395d9f50678c7c7.

* update refs
2024-10-03 15:20:58 -07:00
Adeeb Shihadeh
e04455cbaa selfdrived: controlsd only does controls (#33485)
* selfdrived

* process replay

* lil more

* set the valids

* rename that
2024-09-06 17:16:32 -07:00
Adeeb Shihadeh
aef650013e controlsd: split up publishing and logic (#33483)
* split up the pubs

* move all event adds

* split out alerts

* lil more

* clenaup

* update test

* cleanup
2024-09-05 16:28:57 -07:00
Adeeb Shihadeh
7575c707f1 carEvent -> onroadEvent (#33432)
old-commit-hash: c481f11833d748a0d12d2ba14003e931d2849135
2024-09-01 11:31:39 -07:00
Adeeb Shihadeh
1b2bc44227 controlsd: split out state/alerts into selfdriveState (#33421)
* setup selfdriveState

* little more

* update refs

* migration

* all too slow
old-commit-hash: 87051803ab
2024-08-31 18:48:17 -07:00
Adeeb Shihadeh
60549c9557 controlsd: deprecate alertBlinkingRate (#33422)
* controlsd: deprecate alertBlinkingRate

* simplify

* update refs
old-commit-hash: f4e101c67d
2024-08-31 17:58:02 -07:00
Adeeb Shihadeh
55bae8feef openpilot isn't required for a car port PR (#33383)
* disable car docs diff

* mv routes.py

* bump opendbc
old-commit-hash: 48bceb2bbf
2024-08-26 17:12:01 -07:00
Shane Smiskol
4f019b5f60 move selfdrive/car to opendbc (#32630)
* move most of /car

* move some car tests

move some car tests

* fix selfdrive/car/tests

* fix selfdrive/controls tests

* fix the rest of the selfdrive tests

* bump opendbc

* fix all tests

* few more non-test references

* remove opcar and move docs to car

fix these debugging scripts

fix docs

* bump opendbc and panda

forgot panda
old-commit-hash: e735a7f379
2024-08-17 00:54:51 -07:00
Shane Smiskol
95224db413 selfdrive/car: ban cereal and capnp (#33208)
* ban cereal and msgq

* common too

* do toyota/values.py

* do all fingerprints

* example without builder

* this still works, but no type checking anymore

* stash

* wtf, how does this work

* okay actually not bad

* safe

* epic!

* stash data_structures.py

* some clean up

* hell yeah

* clean up old file

* add to delete

* delete

This reverts commit 90239b7797ace31ee647a2fdbd67e0c3faa98dcf.

* switch more CarParams stuff over

remove unused

* fix car tests by removing cereal! mypy forgets about dataclass if we wrap it :(

* fix this too

* fix this too

* remove more cereal and add some good hyundai tests

* bunch more typing

* override default with 20hz radar

* temp capnp converter helper

* more lateralTuning

* small union replicator is better than what i was trying, and fixes mypy dynamic typing issues

* can keep all this the same now!

* type ret: CarParams, add more missing structs, revert lateralTuning changes (smaller diff!)

* revert more

* get first enum automatically, but ofc mypy doesn't pick up the new metaclass so can't use :(

would have been `CarParams.NetworkLocation()`

* Revert "get first enum automatically, but ofc mypy doesn't pick up the new metaclass so can't use :("

This reverts commit bb28b228becba932052d2fc5a4389784027435b1.

* remove cereal from car_helpers (TODO: caching)

* remove a bunch of temp lines

* use dataclass_transform!

* remove some car.CarParams from the interfaces

* remove rest of car.CarParams from the interfaces

* same which() API

* sort

* from cereal/cache from fingerprinting!

* more typing

* dataclass to capnp helper for CarParams, cached it since it's kinda slow

* (partial) fix process replay fingerprintig for new API

* latcontrollers take capnp

* forgot this

* fix test_models

* fix unit tests

* not here

* VehicleModel and controller still takes capnp CP since they get it from Params()

* fix modeld test

* more fix

* need to namespace to structs, since CarState is both class and struct

* this was never in the base class?!

* clean that up again

* fix import error

fix import error

* cmts and more structs

* remove some more cereal from toyota + convert CarState to capnp

* bruh this was wrong

* replace more cereal

* EventName is one of the last things...

* replace a bunch more cereal.car

* missing imports

* more

* can fix this typing now

* proper toyota+others CS typing!

* mypy can detect return type of CS.update() now

* fix redeclaration of cruise_buttons type

* mypy is only complaining about events now

* temp fix

* add carControl struct

* replace CarControl

i hope there's no circular imports in hyundai's CC

* fine now

* lol this was wrong too

* fix crash

* include my failed attempts at recursively converting to dataclass (doesn't implicitly convert types/recursively :( )

but attrs does, maybe will switch in the future

* clean up

* try out attr.s for its converter (doesn't work recursively yet, but interesting!)

* Revert "try out attr.s for its converter (doesn't work recursively yet, but interesting!)"

This reverts commit ff2434f7bbd45a4d4bfb21f7d6712d1f1c3bcde9.

* test processes doesn't fail anymore (on toyota)!

* fix honda crash

* stash

* Revert "stash"

This reverts commit c1762af4e776790e4ad1322ad4ce0610157346e0.

* remove a bunch more cereal!

* LET'S GOOO

* fix these tests

* and these

* and that

* stash, something is wrong with hyundai enable

* Revert "stash, something is wrong with hyundai enable"

This reverts commit 39cf327def258e2959fe23cd7a550a858f6d8f03.

* forgot these

* remove cereal from fw_versions

* Revert "remove cereal from fw_versions"

This reverts commit 232b37cd409b55d04b1afc90d4a80c49e710eb56.

* remove rest of the cereal exceptions!

* fix that

* add typing to radard since I didn't realize RI.update() switched from cereal to structs

* and here too!

* add TODO for slots

* needed CS to be capnp, fix comparisons, and type hint car_specific so it's easier to catch type issues (capnp isn't detected by mypy :( )

* remove the struct converter

* save ~4-5% CPU at 100hz, we don't modify after so no need to deepcopy

btw pickle.loads(pickle.dumps()) is faster by ~1% CPU

* deepcopy -> copy: we can technically make a reference, but copy is almost free and less error-prone

saves ~1% CPU

* add non-copying asdict function

* should save ~3% CPU (still 4% above baseline)

* fix that, no dict support

* ~27% decrease in time for 20k iterations on 3X (3.37857 -> 2.4821s)

* give a better name

* fix

* dont support none, capitalize

* sheesh, this called type() on every field

* remove CS.events, clean up

* bump card %

* this was a bug on master!

* add a which enum

* default to pid

* revert

* update refs

* not needed, but consistent

* just Ecu

* don't need to do this in this pr

* clean up

* no cast

* consistent typing

* rm

* fix

* can do this if we're desperate for the last few %

* Revert "can do this if we're desperate for the last few %"

This reverts commit 18e11ac7883a0a56583750b1cc5a2b13011e7299.

* type this

* don't need to convert carControl

* i guess don't support set either

* fix CP type hint

* simplify that
old-commit-hash: 6a15c42143
2024-08-16 15:13:00 -07:00
Shane Smiskol
7931926366 fw_versions.py: mark raw in f-string
old-commit-hash: 6a5bbb261e
2024-08-16 00:38:28 -07:00
Shane Smiskol
1f04a80d38 run_process_on_route.py: use zstd
old-commit-hash: b41f9f2dfe
2024-08-16 00:08:17 -07:00
Shane Smiskol
51ea9f5799 move live fingerprint debugging code to debug/car (#33308)
* remove cereal from fw_versions

* fix it

* do ecu_addrs and vin

* do last one

* move executable-ness

* notexe

* nice test
old-commit-hash: 2ed567b0f5
2024-08-14 19:24:24 -07:00
Maxime Desroches
c551f1d239 fix bash + python3 shebangs (#33287)
fix shebangs
old-commit-hash: 1dcd660815
2024-08-13 21:22:13 -07:00
Kacper Rączy
80bc61dc6c controlsd: use livePose (#33283)
* Pose calibrator

* Fix static analysis

* Fix static

* Fix test_latcontrol

* Fix test_latcontrol

* Update services in process replay

* Fix static

* Matmul not mul

* Add assertion

* Move pose calibration to data_sample

* Update ref commit

* Remove llk from cycle alerts

* Deprecated nogps event

* Switch power_draw to lp

* Bring back noGps alert

* Add handling code back

* get_bool

* Bring inputsok back
old-commit-hash: 9734015bbb
2024-08-13 21:11:16 -07:00
Shane Smiskol
799fabd707 Reapply "update to new opendbc API (#32009)" (#33151)
This reverts commit f2f01e3afaeaa267af61c8d7ab918da04d3411f2.
old-commit-hash: 7c112341c3
2024-07-31 15:37:39 -07:00
Maxime Desroches
80e23d1593 Remove hexdump package (#33155)
* remove hexdump

* uv lock

* cleanup
old-commit-hash: 1dd8bdc791
2024-07-31 13:34:14 -07:00
Shane Smiskol
2c11e7b49a Revert "update to new opendbc API (#32009)"
This reverts commit d21755b2e216c3f547db0b55b7088357c4368801.

old-commit-hash: ac130001cc
2024-07-31 02:38:44 -07:00
Dean Lee
2f1ee6e832 update to new opendbc API (#32009)
* use new opendbc api

* export pandad_python

* merge master

* merge master

* bump opendbc

* bump opendbc

* improve func

* keep interface unchanged

* fix test_car_interfaces

* bump opendbc

* bump opendbc

* fix test_models

* the interface now has to convert from can capnp to list, so we should include this time

* goes from ~210 to ~240 mean ms real time

* remoe busTime

* lowercase sendcan

* consistent msgtype

* bump

* bump

* not used in lat_mpc

* space

* bump to master

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 0dddc97dca
2024-07-31 00:24:46 -07:00
Shane Smiskol
93c6e23a42 qlog_size.py: use zstd (#33137)
qlog_size: use zstd
old-commit-hash: 11cb2d3a0b
2024-07-29 20:13:43 -07:00
Shane Smiskol
539c828861 tools: keep re pattern file small (#33084)
remove bz2 from re file
old-commit-hash: e68bb26e14
2024-07-25 22:05:10 -07:00
Kacper Rączy
4efe8d8118 Fix msgq context overrides (#33014)
* Fix msgq context overrides

* Remove unneccesary changes

* add reset_context helper

* Remove redundant import
old-commit-hash: c96dbd5a0b
2024-07-18 20:19:39 -07:00
Shane Smiskol
85b77e0387 qlog_size: decimate rlog option (#33011)
* decimate option

* clean up

* check exists
old-commit-hash: f31ad97e92
2024-07-17 21:57:36 -07:00
Shane Smiskol
a878118b00 Revert "selfdrive/car: ban imports from external modules" (#32993)
Revert "selfdrive/car: ban imports from external modules (#32973)"

This reverts commit c1e8ff2dbc47ccb07fb41a4e88bfb66af2669254.
old-commit-hash: 35a4a773f1
2024-07-15 11:14:04 -07:00
Dean Lee
58df39a2ba selfdrive/car: ban imports from external modules (#32973)
* lint import

* Update selfdrive/car/__init__.py

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 83d4623590
2024-07-15 11:12:24 -07:00
Shane Smiskol
6cd2b2fb78 ruff: check shadowed variables (#32851)
* check shadowed variables

* fix
old-commit-hash: 69d4b0fdf0
2024-06-27 14:44:26 -07:00
Shane Smiskol
338a4b6d8f qlog_size.py: more accurate msg size breakdown (#32723)
* grouping changes outcome

* clean up

* clean up

* clean up

* clean up

* clean up
old-commit-hash: e798caa3e5
2024-06-11 22:55:42 -07:00
Shane Smiskol
e3c7bdf0a4 Fixup qlog size (#32719)
* stash

* Revert "stash"

This reverts commit 5a22b44919d4cb8681cc08d99656954423abda93.

* improvements

* rm

* method 2

* Revert "method 2"

This reverts commit 7112d95b3eead8bfdd8efb1dcefd4edbe9107680.

* unreal for now

* stash

* Revert "stash"

This reverts commit a7c5b31d8043b8da96c21a8d40281cece3cada61.

* clean up

* update description
old-commit-hash: 81dc33e569
2024-06-11 21:36:13 -07:00
Adeeb Shihadeh
2e6ca5dd05 debug: add summary to check_timings
old-commit-hash: 20a44bb4e9
2024-06-08 21:01:39 -07:00
Adeeb Shihadeh
2c6829ed67 boardd is pandad (#32628)
* boardd is pandad

* rename tests
old-commit-hash: 34e329649d
2024-06-04 19:16:55 -07:00
Shane Smiskol
19d9e7ac6b revert marking some files as unexecutable (#32613)
* this is not a test

* these are not tests!
old-commit-hash: c7b3ece37e
2024-06-03 17:19:27 -07:00
Adeeb Shihadeh
86b6103657 test_*.py files are no longer executable (#32610)
* test_*.py files are no longer executable

* cleanup empty lines

* update precommit

* fixme

* enable

* build
old-commit-hash: c59887c810
2024-06-03 15:48:56 -07:00
Shane Smiskol
b7949ec7ad debug FW fingerprinting: live support (#32585)
* live debug!

* clean up
old-commit-hash: 63f55f4915
2024-05-31 22:28:03 -07:00
Adeeb Shihadeh
cc4f53e6c6 manager: move to system/ (#32538)
* manager: move to system/

* one more
old-commit-hash: accdade4cf
2024-05-25 12:41:17 -07:00
Adeeb Shihadeh
3358745103 ruff: enable UP
old-commit-hash: b2e4c64cf8
2024-05-20 17:43:54 -07:00