Commit Graph

174 Commits

Author SHA1 Message Date
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
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
Adeeb Shihadeh
fecf6134ef move PID controller to common/ (#33419)
old-commit-hash: f59a1bf00344432acad686f4813069e7c0c063b6
2024-08-31 16:49:29 -07:00
Andrei Radulescu
24c18d2c4b agnos updater: set decompress max_length (#33320)
* agnos: decompress max_length

* flash last chunk after eof

* don't decompress more than length

* cleanup

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: ba098f509b7d2d21114208f700f2de8b9e45a39a
2024-08-17 16:31:22 -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: e735a7f3796e208cdc1ecc651ace09e1daf6009a
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: 6a15c42143a4764e79df851d797f950a6212f464
2024-08-16 15:13:00 -07:00
Maxime Desroches
c551f1d239 fix bash + python3 shebangs (#33287)
fix shebangs
old-commit-hash: 1dcd66081531f4568a8de69637fc7a3f4ef3214f
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: 9734015bbb6d448bb6b0fb453370ec702fa73106
2024-08-13 21:11:16 -07:00
Adeeb Shihadeh
ac6956a651 tici: new updater build (#33246)
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 1b554b488e2c66e7d9ddafa54681742cbe3f803e
2024-08-09 14:30:28 -07:00
Shane Smiskol
9e4a7484be remove unnecessary debugging function from car_helpers.py (#33199)
* format

* better better

* huh
old-commit-hash: 5c1e111d8a8476a2bddaeee29fcaca1c2c38f609
2024-08-05 21:27:43 -07:00
Adeeb Shihadeh
acdbe2440f tici: set STM_BOOT0 in reset (#33015)
* tici: reset panda boot0

* ooops
old-commit-hash: 560e37cd83c51149328aedc83b7d34c40941bf46
2024-07-18 18:48:54 -07:00
Shane Smiskol
1d480761bd hardwared: don't ignore quick ignition cycles (#32938)
* check on either edge

* clean up

* clean up

* good thing I tested this first :P
old-commit-hash: 11db7b683b4ea0427c0060b48bd17ac5b61b11ff
2024-07-11 02:49:42 -07:00
Adeeb Shihadeh
1490a714a0 mvp of new docs.comma.ai (#32926)
* ssh docs

* strict

* need an index

* push to prod
old-commit-hash: f6189568eab0244ed792ef299fb781cc4c92fb9b
2024-07-08 16:55:16 -07:00
Adeeb Shihadeh
a4745aa158 tici: improve power save test (#32674)
* tici: improve power save test

* Update system/hardware/tici/tests/test_hardware.py
old-commit-hash: da1cb2276bf28ee906e61a717da2e2699bdba34d
2024-06-09 11:51:43 -07:00
Harald Schäfer
f870a968e9 Split cereal into cereal/msgq (#32631)
* squash

* fix doc

* compile device

* compile device

* Update ref

* add msgq to precommit exclusions

* No service ports

* fix compile

* address comments

* More comments

* Delete logger

* Update opendbc

* Linting

* bump msgq
old-commit-hash: e71ec4e8d7e39a56235f590227e7cb361cd8b79d
2024-06-06 14:31:56 -07:00
Adeeb Shihadeh
30c41788dc thermald is hardwared (#32637)
* thermald is deviced

* hardwared

* rename
old-commit-hash: 51fdf2330453fe863597db0eb8daf87c2ec4ff8d
2024-06-05 15:58:00 -07:00
Adeeb Shihadeh
389daf4018 pandad: move to core 3 (#32402)
* move to core 3

* core is fully offlined now

* move to init

---------

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 7b092858172220efd6805d3586355c0f393b2d86
2024-06-05 14:50:25 -07:00
Adeeb Shihadeh
2c6829ed67 boardd is pandad (#32628)
* boardd is pandad

* rename tests
old-commit-hash: 34e329649d7a388d4cd1f25dac9dda9d5409bf4a
2024-06-04 19:16:55 -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: c59887c8109dd8d33ea2e7169995184fbe38cc3a
2024-06-03 15:48:56 -07:00
Adeeb Shihadeh
cc4f53e6c6 manager: move to system/ (#32538)
* manager: move to system/

* one more
old-commit-hash: accdade4cfe73cdca41f5afa73cf4ad085802930
2024-05-25 12:41:17 -07:00
cl0cks4fe
639a634f7c Unittest to pytest (#32366)
* add pytest-asyncio

* switch common

* switch selfdrive

* switch system

* switch tools

* small fixes

* fix setUp and valgrind pytest

* switch to setup

* fix random

* switch mock

* switch test_lateral_limits

* revert test_ui

* fix poetry.lock

* add unittest to banned-api

* add inline ignores to remaining unittest imports

* revert test_models

* revert check_can_parser_performance

* one more skip

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: dd9d5d4528ff0a61c7699abc1b63ba8fd282632f
2024-05-17 11:01:44 -07:00
Adeeb Shihadeh
583fa3bfbf agnos 10.1 (#32373)
old-commit-hash: 7ff66986c1a7bcfc9b459a5bb635a9f394cf2fa1
2024-05-08 16:51:27 -07:00
Adeeb Shihadeh
de5f273a6b Revert "agnos 10.1 (#32348)"
This reverts commit 38c4557a88f3c7e43027f2f83eeba2375a0427dc.

old-commit-hash: 71832d651a8bbb23707df8c2001883c32af22876
2024-05-07 20:33:09 -07:00
Adeeb Shihadeh
7b634ee1b3 agnos 10.1 (#32348)
old-commit-hash: d0e5f42b684171854edc0ab8d4eef8c38aadbc78
2024-05-07 20:05:38 -07:00
Adeeb Shihadeh
df1314fbf7 agnos 10 (#32320)
old-commit-hash: b98ea81bdb744c73a42bb491a70909490994907b
2024-05-01 20:54:32 -07:00
YassineYousfi
75a69e12b3 disable navigate on openpilot (#32106)
* 2eedcd90-b7db-46cb-86be-740f48ded7ab/700

* noop ciao

* here too

* mapsd too

* update translations

* disable mapsd test from test onroad

* disable mapRenderState test from timings

* lint

* fix exp mode toggle panel

* update tr

* french done

* dont build mapd

* only no nav

* just comment

* deprecate nav fields

* rm not comment

* dont deprecate too much

* remove from services

* merge cereal
old-commit-hash: 754dd45ffa82bf3d7f2d3413c4132eb65551ebd5
2024-04-09 10:40:38 -07:00
Justin Newberry
b982781570 tool to create casync manifest (#32131)
* manifest tool

* newline

* add to jenkins
old-commit-hash: b331e4a15b4d720bba59adbda51e8f78ab127382
2024-04-08 16:54:14 -07:00
Justin Newberry
b33aef01b8 move casync release creation to use a tarball of files (#32089)
* tar archive instead

* fix

* move this here

* migrate these

* fix this

* update readme

* fix that

* try to build nightly

* Revert "try to build nightly"

This reverts commit 4ea680cb6a1f985c0490168724c99bcb45af9899.

* caexclude is no longer required

* finish up

* sorted

* need this

* and that

* context mnager

* path based
old-commit-hash: 69982d43cd61e9b085fbd19f1e3ac6c747a51793
2024-04-05 11:00:45 -07:00
Adeeb Shihadeh
098f5943d0 update cavli config
old-commit-hash: 06ab3de4de18553c8dfba936f9cfb59885899aba
2024-03-08 14:11:08 -08:00
Adeeb Shihadeh
c6159f99cd tici: enable SIM hot swap (#31680)
* tici: enable SIM hot swap

* only tizi

---------

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: a38a5e8bb4c0eda459ec42dd4e2f42e17e6dfef6
2024-03-01 17:24:22 -08:00
Comma Device
646861b75a no amp
old-commit-hash: 9616b3f71719785f75bf25acdf51f38f19105a3e
2024-03-01 15:32:33 -08:00
Justin Newberry
013a965d1a tici tests: remove pytest.main (#31622)
pytest.main is bad!
old-commit-hash: 19db56b1f6a86a6a250e6b69f1533ae02d1fb367
2024-02-27 14:06:18 -08:00
Comma Device
e7c60bdec0 no amp config
old-commit-hash: 14ea615ae4acc644026b66342edc76edd9178afc
2024-02-26 20:39:41 -08:00
Adeeb Shihadeh
f6732eca41 get name from kernel (#31602)
* get name from kernel

* revert that

---------

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 3c4e82f14a3569cec615fe602886271fee1566c7
2024-02-26 20:21:44 -08:00
Cameron Clough
a09300385b mypy: use implicit-optional (#31590)
* mypy: set implicit-optional = true

* find and replace '| None = None' -> '= None' in function args
old-commit-hash: 80da3aee147867e46f566b63a96f4fe199e0628d
2024-02-25 13:29:18 -08:00
Cameron Clough
9bd90112d0 use pyupgrade to update to new typing syntax (#31580)
* add pyupgrade hook

* run pyupgrade (pre-commit run -a)

* ruff --fix

* Revert "add pyupgrade hook"

This reverts commit 56ec18bb6b8602a0b612f3803d96cdad14b52066.

* revert changes to third_party/

* manual type fixes

* explicit Optional wrapping capnp objects
old-commit-hash: 995250ae4967943ee33a3699a1d89a7a770d95e9
2024-02-24 16:41:23 -08:00
Adeeb Shihadeh
7410a1c448 agnos 9.7 (#31564)
* agnos 9.7

* update
old-commit-hash: 92475d653bcb94a907d20701a697118fbe8815ef
2024-02-23 17:41:03 -08:00
Adeeb Shihadeh
5e81beb77e remove deviceState.ambientTempC (#31533)
old-commit-hash: 0b4d08fab8e35a264bc7383e878538f8083c33e5
2024-02-21 13:57:49 -08:00
Adeeb Shihadeh
c925fd2d89 [bot] Update Python packages and pre-commit hooks (#31508)
* Update Python packages and pre-commit hooks

* remove that

---------

Co-authored-by: jnewb1 <jnewb1@users.noreply.github.com>
Co-authored-by: Justin Newberry <justin@comma.ai>
old-commit-hash: be4bbca9a32f3bd3f65eaf26f4f5b65d2fc14608
2024-02-19 10:45:10 -08:00
Adeeb Shihadeh
4101f3d725 tici: log SOM ID (#31440)
* tici: log SOM ID

* no cat
old-commit-hash: 3cf845d9521f9062bbcc7ae0db7195576ca632a4
2024-02-13 15:01:32 -08:00
Justin Newberry
eee5af9baa test_power_draw: combine mapsd and navmodeld (#31375)
* combine

* combine

* combine

* simpler

* nounion
old-commit-hash: 70288d1742c2cc84f4419f3411056d81bad4b59b
2024-02-08 11:31:55 -08:00
Adeeb Shihadeh
9b86a20d64 agnos 9.6 (#31357)
* agnos 9.6

* manifest
old-commit-hash: 4228b6420bf6ba56bc798239cc05078c9d5d8440
2024-02-07 16:15:09 -08:00
Justin Newberry
0fa5f49cac test_power_draw: wait for power instead of fixed warmup time (#31318)
* wait for valid

* reuuse that

* assert warmup

* Wip

* fix that

* reset

* none

* timeout

* maxlen

* consecutive

* proc

* fix

* local

* same as before

* mean

* fixes

* SA

* this is the real warmup time

* this is the real warmup time

* Cleanup

* Cleanup

* monotonic + len

* reduce duplication

* fix

* fix

---------

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: caa9dff61043a27a15f597633bea08f214833f0a
2024-02-07 13:54:46 -08:00
Adeeb Shihadeh
c6378bab30 agnos 9.5 (#31313)
* agnos 9.4

* agnos 9.5
old-commit-hash: ff1dd1f4ddcfa56779097b5a229c61775520ea9d
2024-02-07 13:23:58 -08:00
Adeeb Shihadeh
973de5710a add cavli modem config (#31297)
* add cavli modem config

* fix linter

---------

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: a094179b4d2231e3f43b25596ecb20d6b9c4be70
2024-02-04 14:26:03 -08:00
Justin Newberry
fd799bc05a Pytest: consistent hardware state for tici tests (#31279)
* consistent hardware

* consistent hardware

* moved

* this too

* ruff

* s

* duplicated

---------

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 0277fc5548bc87a17ae34b914df0593d034e5e94
2024-02-02 14:18:01 -08:00
Justin Newberry
05204fbde3 Create message mocking tools (#31249)
* add mocking tools

* fix map renderer

* use for power draw

* fix those

* whitespace

* rename to services

* fix the rate

* remove
old-commit-hash: 086c509fde806bb03f89765800d9667f4de6a372
2024-01-31 18:47:49 -08:00
Adeeb Shihadeh
adc65c2293 agnos 9.3 (#31163)
* agnos 9.2

* agnos 9.3
old-commit-hash: 6caf89bca531b2e1e5f514dcebd82e33cb0dadd1
2024-01-29 17:44:14 -08:00
Ruben Medina
031e88f2c9 add size to system alt image manifest entry (#31154)
old-commit-hash: 8472ae5317d98a41dae28b2cd1e72ac05b5cae04
2024-01-24 23:35:39 -08:00
Justin Newberry
4080bec11d pytest: add marker for sharing the download cache (#31082)
* fix cache

* with a marker
old-commit-hash: 3846130d8e15ea71e9576ae62b69918757edc7b8
2024-01-22 16:30:59 -08:00