Commit Graph

56 Commits

Author SHA1 Message Date
Justin Newberry
b4992fefed Pytest: consistent codecov (#30408)
* seed only

* random seed

* ignore version.py

* increase max examples

* increase default max examples
old-commit-hash: d02dd50749
2023-11-08 13:43:32 -08:00
Shane Smiskol
53c51a23f7 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
old-commit-hash: c626078e9d
2023-10-23 11:41:42 -07:00
Lee Jong Mun
89e5ee45ca cleanup remnants of LQR and INDI tuning (#29860)
* not use 'indi' cleanup

* bump cereal

* rm more

---------

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

* Remove i

* Add radar fault case for car interfaces

* Removed empty whitespace

* Fix typo
old-commit-hash: 97865d751f
2023-08-28 22:34:47 -07:00
Shane Smiskol
ce1c61d59a car interfaces: long running fuzzy test (#29592)
* draft

* draft 2

* increase deadline and run

* imports

* run -> use
old-commit-hash: 821cfff56d
2023-08-24 10:45:50 -07:00
Shane Smiskol
9564eba598 car interface test: pick from possible ECUs (#29593)
pick from possible ecus
old-commit-hash: d58cb9994f
2023-08-24 05:27:58 -07:00
Shane Smiskol
820ca41f1a car interfaces test: don't sleep (#29589)
don't sleep in test_car_interfaces
old-commit-hash: e38ce6087f
2023-08-24 04:24:22 -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
Shane Smiskol
8714f1a406 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
old-commit-hash: 225ed2ed5a
2023-08-09 17:01:38 -07:00
Adeeb Shihadeh
a55a8849b3 Revert "interfaces: test interface attributes (#29297)"
This reverts commit 55af4cce3d3955ca0ecdb98517089a0a42b53ad2.

old-commit-hash: 51831d03a3
2023-08-09 16:28:12 -07:00
Shane Smiskol
cfa3ff0fba 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
old-commit-hash: 6a678cde6c
2023-08-09 16:10:30 -07:00
Shane Smiskol
32d6b9994e test_car_interfaces: use DT_CTRL
old-commit-hash: 18cf253c62
2023-07-18 20:01:22 -07:00
Shane Smiskol
e69c1bff7f 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
old-commit-hash: c9f80e89b7
2023-07-18 01:49:01 -07:00
Shane Smiskol
6ee48e6a6d 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
old-commit-hash: 44f7b312a0
2023-07-18 01:42:51 -07:00
Shane Smiskol
bbd3b3bc75 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
old-commit-hash: f495c21805
2023-07-14 21:41:30 -07:00
Shane Smiskol
7eaa74b083 test car interfaces: support pytest (#28937)
sort
old-commit-hash: af7b2e4dd4
2023-07-14 01:48:36 -07:00
Shane Smiskol
29bbd75291 test car interface: fuzzy experimental long (#28936)
fuzzy exp long
old-commit-hash: 4ed9dec6f4
2023-07-14 01:25:01 -07:00
Maxime Desroches
1693786962 simple fuzzing test for all processes (#28661)
* Revert "Revert "simple fuzzing test for all processes (#28584)""

This reverts commit a5be0640a3780156fdd5c04c1e6204fa41b307a8.

* determinism

* fingerprint
old-commit-hash: 0ebec253d0
2023-06-29 21:49:23 -07:00
Adeeb Shihadeh
ffcc2e4c61 Revert "simple fuzzing test for all processes (#28584)"
This reverts commit 0e98836e857583849aa4e960b097103a4aeb863d.

old-commit-hash: 7783dc602c
2023-06-22 14:59:50 -07:00
Maxime Desroches
7be2b51229 simple fuzzing test for all processes (#28584)
* working test

* classmethod

* review

* add to ci
old-commit-hash: bac193bdd5
2023-06-20 10:57:02 -07:00
Maxime Desroches
6355215f81 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
old-commit-hash: 3fc104fb6d
2023-06-15 17:01:13 -07:00
Shane Smiskol
15e6669b1f car interfaces: assert some friction (#28074)
* assert some friction

* duh

* convention

* order
old-commit-hash: 177ca52e76
2023-05-03 20:22:38 -07:00
Shane Smiskol
d916e0ed2d Car docs: pass docs flag to car interfaces (#27311)
* docs

* docs

* docs

* docs

* use docs in gm
old-commit-hash: 5aebdb0ad0
2023-04-18 12:22:22 -07:00
Shane Smiskol
45996b2c65 Car interfaces: assert reasonable centerToFront range (#27356)
* assert reasonable centerToFront values

* comment

* fix Bolt centerToFront

* Update ref_commit
old-commit-hash: 89934b35d0
2023-02-15 16:27:00 -08:00
Shane Smiskol
acc8e38111 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
old-commit-hash: 8f5057ff2d
2023-02-09 15:37:39 -08:00
Adeeb Shihadeh
20fbb0a8fd rename carState.radarOffCan to radarUnavailable (#27187)
* rename carState.radarOffCan to radarUnavailable

* bump cereal
old-commit-hash: 6fa9b555a4
2023-02-02 11:38:09 -08:00
Shane Smiskol
0ceb423ccc 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 🤦
old-commit-hash: b00bc4f57e
2023-01-12 12:25:24 -08:00
Adeeb Shihadeh
b67646e1ab Revert "Car interface: require fingerprint and FW versions to get params (#26766)"
This reverts commit ff80ac0f7525916211da2cd0fce2c9c5f35ef89d.

old-commit-hash: f14deae475
2023-01-12 11:28:04 -08:00
Shane Smiskol
28ceb52c33 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
old-commit-hash: b68dabb689
2023-01-11 23:44:50 -08:00
Shane Smiskol
4b14d13faa 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>
old-commit-hash: dac7a24677
2023-01-09 16:21:47 -08:00
Shane Smiskol
d6f6b0de91 Car interface: set tire stiffness in common function (#26625)
* common stiffness

* GM uses factors
old-commit-hash: 712b9014d7
2022-11-29 12:50:27 -08:00
Shane Smiskol
fc733027f5 interrfaces: more complete PID tests (#26422)
* more complete PID tests

* doesn't need to be fancy

* less fancy
old-commit-hash: 0ca9d1810c
2022-11-09 12:10:08 -08:00
Adeeb Shihadeh
2c85a11a31 expand fingerprint dict size for multipanda setups
old-commit-hash: baef4c1fb2
2022-08-17 15:30:20 -07:00
HaraldSchafer
0282b746f4 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
old-commit-hash: 2deaf69789
2022-06-22 15:58:06 -07:00
HaraldSchafer
b0b1aff5cc 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>
old-commit-hash: 9283040d84
2022-06-15 15:29:42 -07:00
HaraldSchafer
f7edd5f3d3 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>
old-commit-hash: 3066ad81a8
2022-06-10 17:57:23 -07:00
HaraldSchafer
39886246c9 Rerevert torque control (#24649)
* Revert "Revert torque control (#24565)"

This reverts commit 93f434d047a92366c4ccefeece86fe101ed98d02.

* Move tune out of car specific stuff

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

* Fix carmodel tests

* Update ref

* update ref

* Elif is better than if
old-commit-hash: 9f8b03753d
2022-05-17 19:00:57 -07:00
Harald Schafer
8d6cda4d53 Revert "Fix tests"
This reverts commit 06d6464c6f54ceee925eb6474c5148def1e8028b.

old-commit-hash: acfa0b74fe
2022-05-17 13:48:26 -07:00
Harald Schafer
4c17844b9f Fix tests
old-commit-hash: 61becd444f
2022-05-17 13:46:14 -07:00
Shane Smiskol
754b93997a 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>
old-commit-hash: c1caca104f
2022-04-28 22:37:46 -07:00
HaraldSchafer
2174005f05 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
old-commit-hash: fe0bcdaef6
2022-04-19 19:34:31 -07:00
Adeeb Shihadeh
94e02bcb3f add parkingBrake to carState (#23968)
* add parkingBrake to carState

* fix gm
old-commit-hash: ae19308e83
2022-03-14 16:32:20 -07:00
Ewout ter Hoeven
a962365292 Convert format strings strings to f-strings (#23241)
* Convert all text strings to f-strings

Reformats all the text from the old "%-formatted" and .format(...) format to the newer f-string format, as defined in PEP 498. This requires Python 3.6+.

Flynt 0.69 was used to reformat the strings. 120 f-strings were created in 51 files.

F-strings are in general more readable, concise and performant. See also: https://www.python.org/dev/peps/pep-0498/#rationale

* revert pyextra changes

* revert ublox.py

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 55390d273f
2021-12-16 14:58:17 +01:00
Jason Young
24a9b9248c Update CI tests for CAN fingerprinting deprecation (#21043)
* Start refactor of CI tests for FPv1 deprecation

* Fix test_car_interfaces

* Touch up comment

* Smaller diff
old-commit-hash: 182b00896c
2021-05-26 14:02:42 -07:00
Adeeb Shihadeh
7546f7d084 enforce message checks in can parser (#20742)
* enforce message checks in can parser

* nissan

* vw

* hkg

* subaru

* toyota

* honda bosch

* gm

* honda nidec

* bump opendbc

* not all tss2 have bsm

* toyota fixes

* honda fixes

* vw fix

* fix subaru

* fix long tests

* update refs

* crv bsm
old-commit-hash: 6c7ed8f2e4
2021-04-25 12:52:16 -07:00
Willem Melching
4bd1929d2b LateralPlanner should only compute curvature (#20289)
* get curvature from planner

* no need to check active

* remove that

* remove self

* liveParams not needed

* cast

* fix test bug

* fixes

* fix ui.py

* fix radians

* update refs

* update refs

* bump cereal

* bump cereal

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: c23ec9f753
2021-03-11 21:08:51 -08:00
Igor
b1c6f804e5 Add indi breakpoints (#19664)
* Added BP, V to latcontrol_indi

* hyundai

* toyota

* Tests for INDI outerLoopGain
old-commit-hash: 0a65e87394
2021-01-07 15:55:46 +01:00
Adeeb Shihadeh
f25cec394e grey panda is unsupported (#2458)
old-commit-hash: 47c21f10f5
2020-11-03 19:56:25 -08:00