Commit Graph

63 Commits

Author SHA1 Message Date
cl0cks4fe
dd9d5d4528 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>
2024-05-17 11:01:44 -07:00
Shane Smiskol
593ea504e7 test_car_interface: run CC once (#32449)
run once
2024-05-16 15:41:20 -07:00
Adeeb Shihadeh
fa12a67228 remove pedal (#31903)
* remove pedal

* bump panda

* fix

* update refs
2024-03-17 22:42:49 -07:00
Shane Smiskol
bf20358440 CI: increase test car interfaces examples (#31641)
* increase

* huh

* Revert "huh"

This reverts commit 1a652cbed06a7c814711db6f2bc6b3146d3aec04.

* no huge fp dicts

* ugh

* try 300

* test

* at least increase a bit
2024-03-01 16:11:48 -08:00
Shane Smiskol
0e94567a18 Toyota: only read gas interceptor if we're using it (#31473)
* we shouldn't be reading from interceptor and not writing/sending gas command

* better

* add a test!

* comment is clear
2024-02-14 21:32:44 -08:00
Adeeb Shihadeh
6f905ed979 radard: remove sleep for cars without radar (#31467)
* radard: remove sleep for cars without radar

* fix

* update refs
2024-02-14 13:12:54 -08:00
Shane Smiskol
0110540300 Test car interfaces: init controllers (#31282)
* not pytest?

* copy what build release does

* test controls step with CI and lat/long controllers, car controller.update, etc

* clean up

* not needed

* not here

* here

* better cmt

* fix test_fuzzy

* see what's failing

* need conftest for OPENPILOT_PREFIX to work!

* up

* clean up

* test

* fix

* params put is slow

* stash

* Revert "stash"

This reverts commit 22cc9f814c0699f7046970763663205907f2890b.

* stash

bad

* just freaking merge

* sort

* rm
2024-02-02 23:43:30 -08:00
Justin Newberry
d02dd50749 Pytest: consistent codecov (#30408)
* seed only

* random seed

* ignore version.py

* increase max examples

* increase default max examples
2023-11-08 13:43:32 -08:00
Shane Smiskol
c626078e9d Toyota: combine rest of hybrid platforms (#30259)
* Highlander TSS2: merge

* Highlander TSS2: remove duplicate FW

* Highlander TSS2: merge torque params

* C-HR TSS2: merge

* Alphard TSS2: merge

* Avalon 2019: merge

* Avalon TSS2: merge

* Camry TSS2: merge

* Camry TSS-P: merge

* Camry TSS-P: remove duplicate FW

* RAV4 TSS 2022: merge

* RAV4 TSS 2023: merge

fix

* clean up tss2 car list

* fix from merge

* rename internal seg list platforms

* fix test
2023-10-23 11:41:42 -07:00
Lee Jong Mun
238f9d65db cleanup remnants of LQR and INDI tuning (#29860)
* not use 'indi' cleanup

* bump cereal

* rm more

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-09-10 16:30:13 -07:00
Shane Smiskol
f12a1c2584 car intrfaces: no test deadline (#29720)
set deadline to None
2023-08-30 15:30:37 -07:00
Kacper Rączy
97865d751f radard: radar fault test (#29673)
* Radar fault test

* Remove i

* Add radar fault case for car interfaces

* Removed empty whitespace

* Fix typo
2023-08-28 22:34:47 -07:00
Shane Smiskol
821cfff56d car interfaces: long running fuzzy test (#29592)
* draft

* draft 2

* increase deadline and run

* imports

* run -> use
2023-08-24 10:45:50 -07:00
Shane Smiskol
d58cb9994f car interface test: pick from possible ECUs (#29593)
pick from possible ecus
2023-08-24 05:27:58 -07:00
Shane Smiskol
e38ce6087f car interfaces test: don't sleep (#29589)
don't sleep in test_car_interfaces
2023-08-24 04:24:22 -07:00
Adeeb Shihadeh
a9626f95b6 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
2023-08-20 20:49:55 -07:00
Shane Smiskol
225ed2ed5a interfaces: test interface attributes (#29301)
* test

* draft

* draft

* clean up

* clean up

* better test

* clean up

* check car info

* uncomment

* rm space

* no loop

* use dbc

* more clear

* one line
2023-08-09 17:01:38 -07:00
Adeeb Shihadeh
51831d03a3 Revert "interfaces: test interface attributes (#29297)"
This reverts commit 6a678cde6c.
2023-08-09 16:28:12 -07:00
Shane Smiskol
6a678cde6c interfaces: test interface attributes (#29297)
* test

* draft

* draft

* clean up

* clean up

* better test

* clean up

* check car info

* uncomment

* rm space

* no loop

* use dbc

* more clear

* one line
2023-08-09 16:10:30 -07:00
Shane Smiskol
18cf253c62 test_car_interfaces: use DT_CTRL 2023-07-18 20:01:22 -07:00
Shane Smiskol
c9f80e89b7 test car interface: fuzzy CarParams (#28931)
* bump

* should be bytes

* draft fuzzy car params

* stash

* bump

* bump

* this is explored!

* some clean up

* more clean up

* clean up

* can't easily

* clean up

* no import

* Apply suggestions from code review

* move into a function

* Update selfdrive/car/tests/test_car_interfaces.py

* Update selfdrive/car/tests/test_car_interfaces.py

* Update selfdrive/car/tests/test_car_interfaces.py

* come onn

* we know it will return a dict here
2023-07-18 01:49:01 -07:00
Shane Smiskol
44f7b312a0 test car interfaces: more GM coverage (#28954)
* Update test_car_interfaces.py

* Update selfdrive/car/tests/test_car_interfaces.py

* make it fail

* catches crashed, not blocked
2023-07-18 01:42:51 -07:00
Shane Smiskol
f495c21805 FuzzyGenerator: typing (#28934)
* bump

* should be bytes

* draft fuzzy car params

* stash

* bump

* bump

* this is explored!

* some clean up

* more clean up

* clean up

* do we need draw??

* draft

* this was confusing

* revert

* draft

* Revert "draft"

This reverts commit c593a03474b04d4df2648d8149798196c991a108.

* draft

* more typing!

* complete typing

* fix that

* cleanup

* better
2023-07-14 21:41:30 -07:00
Shane Smiskol
af7b2e4dd4 test car interfaces: support pytest (#28937)
sort
2023-07-14 01:48:36 -07:00
Shane Smiskol
4ed9dec6f4 test car interface: fuzzy experimental long (#28936)
fuzzy exp long
2023-07-14 01:25:01 -07:00
Maxime Desroches
0ebec253d0 simple fuzzing test for all processes (#28661)
* Revert "Revert "simple fuzzing test for all processes (#28584)""

This reverts commit 7783dc602c.

* determinism

* fingerprint
2023-06-29 21:49:23 -07:00
Adeeb Shihadeh
7783dc602c Revert "simple fuzzing test for all processes (#28584)"
This reverts commit bac193bdd5.
2023-06-22 14:59:50 -07:00
Maxime Desroches
bac193bdd5 simple fuzzing test for all processes (#28584)
* working test

* classmethod

* review

* add to ci
2023-06-20 10:57:02 -07:00
Maxime Desroches
3fc104fb6d test: car interface fuzzy testing + generating capnp structs (#28530)
* random car control

* format

* struct generation

* math

* staying real

* really staying real

* move

* split this

* format

* Revert "format"

This reverts commit a70a73952ee3833c4ae839d7b2729ee2a1e1a85b.

* Revert "split this"

This reverts commit ae96be63cbfbee230101e69a0f84c874f321fafa.

* space
2023-06-15 17:01:13 -07:00
Shane Smiskol
177ca52e76 car interfaces: assert some friction (#28074)
* assert some friction

* duh

* convention

* order
2023-05-03 20:22:38 -07:00
Shane Smiskol
5aebdb0ad0 Car docs: pass docs flag to car interfaces (#27311)
* docs

* docs

* docs

* docs

* use docs in gm
2023-04-18 12:22:22 -07:00
Shane Smiskol
89934b35d0 Car interfaces: assert reasonable centerToFront range (#27356)
* assert reasonable centerToFront values

* comment

* fix Bolt centerToFront

* Update ref_commit
2023-02-15 16:27:00 -08:00
Shane Smiskol
8f5057ff2d GM: enforce steering command message timing (#27250)
* draft

* bump opendbc

* still draft

* that's not right

* superset of the changes, 33hz

* cleanup

* this should work

* remove line

* pass it in again

* actually no need to check updated now

* now_nanos

* consistent name

* fix replay

* one line isn't that bad

switch

switch

* fix CarController tests

* Update ref_commit
2023-02-09 15:37:39 -08:00
Adeeb Shihadeh
6fa9b555a4 rename carState.radarOffCan to radarUnavailable (#27187)
* rename carState.radarOffCan to radarUnavailable

* bump cereal
2023-02-02 11:38:09 -08:00
Shane Smiskol
b00bc4f57e Car interface: require fingerprint and FW versions to get params (#26932)
* require fingerprint and FW versions

* add get_non_essential_params()

* comment

* all required

* classmethod, need to allow subclasses to override _get_params

* fix that

* fix

* fix

* wrong fix 🤦
2023-01-12 12:25:24 -08:00
Adeeb Shihadeh
f14deae475 Revert "Car interface: require fingerprint and FW versions to get params (#26766)"
This reverts commit b68dabb689.
2023-01-12 11:28:04 -08:00
Shane Smiskol
b68dabb689 Car interface: require fingerprint and FW versions to get params (#26766)
* require fingerprint and FW versions

* add get_non_essential_params()

* comment

* all required

* classmethod, need to allow subclasses to override _get_params

* fix that

* fix
2023-01-11 23:44:50 -08:00
Shane Smiskol
dac7a24677 car interfaces: test longitudinal params are set correctly (#26894)
* add long unit tests and fix

* revert

* remove debug

* cleanup

Co-authored-by: Laptop Researcher <laptop@researcher.com>
2023-01-09 16:21:47 -08:00
Shane Smiskol
712b9014d7 Car interface: set tire stiffness in common function (#26625)
* common stiffness

* GM uses factors
2022-11-29 12:50:27 -08:00
Shane Smiskol
0ca9d1810c interrfaces: more complete PID tests (#26422)
* more complete PID tests

* doesn't need to be fancy

* less fancy
2022-11-09 12:10:08 -08:00
Adeeb Shihadeh
baef4c1fb2 expand fingerprint dict size for multipanda setups 2022-08-17 15:30:20 -07:00
HaraldSchafer
2deaf69789 Refactor torque stuff (#24921)
* Refactor torque stuff

* Add to release

* Add substitute and override

* Maxlataccel is required

* Add to asserts

* add ideal car

* Need china too

* yamls already linted

* Fixed some bugs

* Fixup

* Unreliable data

* Add cehck

* Better comment

* ref commit update
2022-06-22 15:58:06 -07:00
HaraldSchafer
9283040d84 Rocket league model (#24869)
* dd9a502d-c8e2-4831-b365-804b0ae0739d/600 80041070-d276-4fed-bdb9-0075e5442908/420

* no elementwise op

* 9dabf0fe-2e60-44bf-8d3a-d20a74aca072/600 ae746590-0bb5-4a16-80db-15f02d314f03/300 c4663a12-b499-4c9b-90dd-b169e3948cb1/60

* explicit slice

* some copies are useful

* 1456d261-d232-4654-8885-4d9fde883894/440 c06eba55-1931-4e00-9d63-acad00161be0/700 af2eb6ba-1935-4318-aaf8-868db81a4932/425

* 154f663e-d3e9-4020-ad49-0e640588ebbe/399 badb5e69-504f-4544-a99e-ba75ed204b74/800 08330327-7663-4874-af7a-dcbd2c994ba7/800

* set steer rate cost to 1.0

* smaller temporal size

* Update model reg

* update model ref again

* This did upload somehow

* Update steer rate cost

Co-authored-by: Yassine Yousfi <yyousfi1@binghamton.edu>
2022-06-15 15:29:42 -07:00
HaraldSchafer
3066ad81a8 Car interface: set max lateral torque from table (#24789)
* json

* better naem

* Read from table

* formatting and default to nan

* Generate docs

* Read from table

* this should be the same

* Prius v is full

* test we always set the tunes correctly

add to release files

* Set for all cars

Set for all cars

* Revert tuning changes

Revert tuning changes

* remove that

* fixes

* update ref commit for new maxLateralAccels

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2022-06-10 17:57:23 -07:00
HaraldSchafer
d928972150 Rerevert torque control (#24649)
* Revert "Revert torque control (#24565)"

This reverts commit 9f8b03753d.

* Move tune out of car specific stuff

* Update ref commit
2022-05-24 17:52:33 -07:00
HaraldSchafer
9f8b03753d Revert torque control (#24565)
* torque reversal start

* Fix carmodel tests

* Update ref

* update ref

* Elif is better than if
2022-05-17 19:00:57 -07:00
Harald Schafer
acfa0b74fe Revert "Fix tests"
This reverts commit 61becd444f.
2022-05-17 13:48:26 -07:00
Harald Schafer
61becd444f Fix tests 2022-05-17 13:46:14 -07:00
Shane Smiskol
c1caca104f Support RAV4 Hybrid 2022 with stock longitudinal (#23969)
* add panda flag for toyota stock long with camera

* clean up

* Add 2022 RAV4 Hybrid from Philly

* fix wrong fw in interface, did this ever work?

* Must be a hybrid

* no radar parsing

* fix can error

* move to own platform

* generate docs

* fix

* Add 2022 Rav4 XSE Australia fingerprint parameters (#24303)

* Update values.py

Add 2022 Rav4 XSE Australia

* add commas

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

* bump panda

* wait, the camera doesn't even send 0x343, right?

* use a set instead, more obvious

* don't test without a parser

* bump panda

* flip panda flag

* bump panda

* add commas

* regen and update refs

* set to none by default

* revert parenthesis

* update comment

* bump panda

* regen and update refs

* add test models and update readme

* bump to master

Co-authored-by: BrettLynch123 <34538435+BrettLynch123@users.noreply.github.com>
2022-04-28 22:37:46 -07:00
HaraldSchafer
fe0bcdaef6 Lateral torque-based control with roll on TSS2 corolla and TSSP rav4 (#24260)
* Initial commit

* Fix bugs

* Need more torque rate

* Cleanup cray cray control

* Write nicely

* Chiiil

* Not relevant for cray cray control

* Do some logging

* Seems like it has more torque than I thought

* Bit more feedforward

* Tune change

* Retune

* Retune

* Little more chill

* Add coroll

* Add corolla

* Give craycray a good name

* Update to proper logging

* D to the PI

* Should be in radians

* Add d

* Start oscillations

* Add D term

* Only change torque rate limits for new tune

* Add d logging

* Should be enough

* Wrong sign in D

* Downtune a little

* Needed to prevent faults

* Add lqr rav4 to tune

* Try derivative again

* Data based retune

* Data based retune

* add friction compensation

* Doesnt need too much P with friction comp

* remove lqr

* Remove kd

* Fix tests

* fix tests

* Too much error

* Get roll induced error under 1cm/deg

* Too much jitter

* Do roll comp

* Add ki

* Final update

* Update refs

* Cleanup latcontrol_torque a little more
2022-04-19 19:34:31 -07:00