Commit Graph

48 Commits

Author SHA1 Message Date
Shane Smiskol
80bbba14f7 test_models: panda safety tx test (#28949)
* draft

* assertrue

* this is way too complicated, even with unittest discover

* works

* test we can send resume button

* nice catches this

* fix

* fixed

* not needed

* draft

* works

* comment out to let catch

* clean up into a function

* clean ups

* final clean up

* no this is final

* bump

* simplify

* simplify

* pass

* bump

* globals don't work inside methods

* space
2023-07-20 23:16:43 -07:00
Shane Smiskol
f6390c6e40 test_models: don't skip test cases with multiple pytest jobs (#28953)
* Update test_models.py

* Update selfdrive/car/tests/test_models.py

* Update selfdrive/car/tests/test_models.py
2023-07-14 16:24:07 -07:00
Shane Smiskol
c9c636bdd7 test_models: fix rx message bus (#28947)
Update test_models.py
2023-07-14 14:04:24 -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
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
Shane Smiskol
b2c6d5d34a Honda: merge Passport platform into Pilot (#27061)
* Move Passport FW versions to Pilot

* lol, all duplicates already in pilot

* No Passport

* Better params for both
2023-01-23 20:16:50 -08:00
Shane Smiskol
29470d2d2d VW: match panda standstill check (#25761)
* test models: check panda standstill

* match panda

* reverse exception

* check == 0

* bumppanda

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-01-10 22:28:54 -08:00
Shane Smiskol
01dac5d06b Build panda/SConscript (#26646)
* panda/SConscript

* think this is right?

* bump panda

* fix test_models

* use a filter

* bump panda to mater

* more aesthetic ordering

* alphabetical :(

* alphabetical :(
2022-11-30 20:27:55 -08:00
Shane Smiskol
74b6e22a7d controls: disengage on regen paddle independently (#26453)
* add regen braking field that's just used to add a pedalPressed

* bump

* bump

* Update ref_commit

* we want the standstill check

we want the standstill check

* see what diff is now

* Update ref_commit
2022-11-10 19:06:31 -08:00
Shane Smiskol
0e162cc13b test_models: fix Nidec routes that start enabled (#26305)
* Update test_models.py

* Update test_models.py

* fix non-pcmCruise routes where button is left pressed in warmup

* more explicit, don't allow multiple continues

* revert chjange

* -that
2022-10-31 23:02:31 -07:00
Shane Smiskol
23d5e5e07f test_models: speed up test (#26304)
* Update test_models.py

* Update test_models.py
2022-10-31 21:32:17 -07:00
Shane Smiskol
4d7bdc271f test_models: remove carState test from panda tests (#26298)
Update test_models.py
2022-10-31 17:45:56 -07:00
Shane Smiskol
d793d3622b test_models: fix runaway memory growth for long running tests (#26295)
* delete can msgs

* only can msgs
2022-10-31 13:54:13 -07:00
Shane Smiskol
826d8a8ae3 GM: match panda & ECM standstill checks (#26095)
* gm: match panda standstill check

* fix

* needs to be <= 10 to avoid a fault, fix for safety tests

* fix

* fix

* bump panda to master
2022-10-18 11:24:13 -07:00
Shane Smiskol
86062fee6b Subaru: match panda standstill (#25789)
* subaru: match panda standstill

* subaru: match panda standstill

* actually test standstill

* bump panda to master
2022-09-14 19:11:49 -07:00
Shane Smiskol
d3795c1227 Chrysler: match panda standstill check (#25762)
* bump panda

* bump panda to master

* flip this around

* don't forget the body!
2022-09-13 14:14:22 -07:00
Shane Smiskol
4d351427c5 Consider regen properly in test_models (#25409)
* Consider regen properly in test_models

* bump panda

* bump panda

* can use the more interesting segment now

* rm
2022-09-13 00:22:58 -07:00
Adeeb Shihadeh
655a64b603 single longitudinal toggle for e2e and disable radar (#25688)
* single longitudinal toggle for e2e and disable radar

* write disable radar param

* rename

* better param name

* clean that up

* update refs

* update translations

* not live for experimental

* write it out

* vanish
2022-09-07 17:12:49 -07:00
Shane Smiskol
b34fe711b0 Toyota: same standstill check as panda (#25570)
* Same standstill check as panda

* test honda in the same place

* bump panda

* bump panda

* bump panda

* bump to master

* bump panda
2022-08-31 13:51:10 -07:00
Adeeb Shihadeh
6590fb2b93 pre-commit: add codespell (#25571) 2022-08-30 11:20:55 -07:00
Shane Smiskol
19810f2dcc Silence a PytestCollectionWarning (#25537)
Silence PytestCollectionWarning: cannot collect test class 'TestRoute' because it has a __new__ constructor (from: test_models.py)
2022-08-23 17:26:29 -07:00
Shane Smiskol
f8e44f2e9b test_models: pass carFw into car interface (#25535)
pass carFw into get_params
2022-08-23 13:42:14 -07:00
Shane Smiskol
beae985f98 test_models: no CAN invalid tolerance (#25501)
* don't use end of route segment

* no can invalid cnt tolerance

* start checking can valid immediately once available

* we check counter violations
2022-08-20 14:47:18 -07:00
Jason Shuler
4ffe9e68db GM: Bolt EUV 2022-23 port (#24875)
* Switch to ECMPRDNL2 for GM gear

* Removing manumatic gear #

* values.py almost complete

* Silverado and Bolt EUV val and CP

* GM controller updated

* Cam hrns supp done (in theory)

* cleanup for new cars

* Remove extra constant

* WS, etc cleanup

* removing the unused

* Fix kpBP typo

* Updated docs

* Skip's PIF tune

* Dropped LKA CAN error patch

* Add silverado sigmoid ff

* CAN Err & LKA latch patch

* Remove EPS fault fix (another PR)

* Remove Silverado (another PR)

* clean up some common params

* Remove Escalade FP

Remove Escalade FP

* comment

* Premier is just a trim

Premier is just a trim

Premier is just a trim

* no footnote: new Bolt is like most other cars, older GM were outliers not at the camera

* clean up

clean up

* bump panda

* bump panda

* bump panda

* bump panda

* bump panda

* remove comments

* try spamming buttons on bus 2

* bump panda

* bumping opendbc w btn rc

* not needed for this port

This reverts commit 6af1f0ba799e075f877d7acc8ca0f117d97da361.

* add button safety

* Send next rc when spamming btns

* forward other signals in message

* missing DriveModeButton

* fill cruiseState.speed

* see if resume works without counter

* try the whole message

* send immediately and at 10Hz

* no resume, back to just button signal

* even holding random buttons it cancels

* Use torque controller with base tune

* stock long GM don't auto-resume yet

* Testing GM zero min steer speed

* Revert latcontrol

* revert opendbc

* latActive is basically lkas_enabled

* Update Bolt torque params

* comment

* clean up

* Add to releases

* Add test route

* Don't specify segment

* bump panda

* bump panda

* no harness for Bolt just yet

* Apply suggestions from code review

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* We support all and 2023

* move safetyParam up to first cam check

* Bump panda and update docs

* Update RELEASES.md

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

Co-authored-by: Shane Smiskol <shane@smiskol.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-08-12 16:10:34 -07:00
Jason Wen
6e2584ef4b Hyundai: Car Port for Ioniq 5 (HDA2) 2022 (#25308)
* Hyundai: Car Port for Ioniq 5 2022

* Add FW versions

* HDA2 and modified harness for now

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Attempt to block LFA

* BYTE7 blocks LFA

* Merge and bump opendbc, panda

* Update docs per request

* HDA2 -> Highway Driving Assist II

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

* Update RELEASES

* remove that

* generate docs

* ev6 matches

* fix panda bus

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
2022-08-12 11:50:52 -07:00
Adeeb Shihadeh
a009723513 test models: add env var to filter out models 2022-07-26 22:10:14 -07:00
Shane Smiskol
e45eb1bd28 test_models: check cruiseState.available (#24924)
* check available is true if enabled is true

* remove extra line
2022-06-21 00:11:55 -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
Shane Smiskol
e5b189416d test_models: support for running on any route (#24002)
* run test_models on route

* clean up a bit

clean up a bit

clean up a bit

* remove

remove

* make route positional

* fixes from merge

* not working as I expected

* finally working, easiest way seems to make a new subclass dynamically

* bring back routes

* remove comments

* revert skiptest

* fix subclass name

* car first

* this should be here...

* this should work

* comment

* pytest doesn't support dynamically loading with load_tests

* minimize test_models.py diff, and make new file for running on a route

* fix static analysis

* remove print

* clean up a tiny bit

* rename and make required

* auto detect car fingerprint if not given

* move to location that makes more sense

* Add ci argument for running route from routes.py
2022-06-02 17:23:05 -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
Adeeb Shihadeh
53a134f1c3 Kia EV6 (#24485)
* ev6 squash

* test route

* cleanup

* remove those

* resume spam

* setme

* more reliable button pressing

* new steer signals

* for now

* update docs
2022-05-23 19:16:17 -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
Adeeb Shihadeh
685802b860 test car models: stricter radar CAN error check (#24497)
* test routes: stricter radar CAN error check

* bump opendbc

* bump again
2022-05-11 16:30:26 -07:00
Adeeb Shihadeh
3e098c9ba5 Toyota: add safety param flag for alt brake message (#24341)
* Toyota: add safety param flag for alt brake message

* update refs

* update refs

* bump panda
2022-04-27 12:08:11 -07:00
Shane Smiskol
17cb65c4b7 Toyota: resolve controls mismatch due to interceptor thresholds (#23710)
* remove gas interceptor exception

* panda

* bump submodules

* bump panda

* forgot carstate change

* revert

* add test route

* bump

* update refs for CS.gas

* bump submodules to master
2022-04-20 22:28:56 -07:00
Shane Smiskol
6de434f2ec Honda: do same standstill check as panda (#24262)
* check standstill against panda

* use XMISSION_SPEED for all, and compare to 0

* fix

* only check for Honda for now

* update comment

* update refs

* update refs and update check

* phantom commit
2022-04-19 23:18:01 -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
Shane Smiskol
e8faf9f985 Honda: resolve controls mismatch due to interceptor thresholds (#24173)
* make panda and openpilot thresholds match

* Revert "make panda and openpilot thresholds match"

This reverts commit dfcbd2058784de809564ada41e4cfbbfca7afe77.

* make panda and openpilot thresholds match

* remove interceptor scaling, compare int value

* remove honda exception

* bump panda

* bump opendbc

* add segment to check controls mismatch

* bump submodules
2022-04-12 11:20:55 -07:00
Shane Smiskol
85c714e350 test_models: support for specifying segment (#24185)
* support for specifying segment

* revert

* formatting

* revert

* Fix mypy

* raise exception if specified segment isn't available

oh, ndog param wasn't being set

* easier to read

* add to exception
2022-04-11 22:03:23 -07:00
Igor Biletskyy
031f79ba88 car port: comma body (#24019)
* body FPv2

* ..

* ..

* ..

* Temp, REVERT!

* more cleanup

* typo

* ..

* del eyes

* should work?

* fix

* new dbc

* ..

* fixes

* static analysis

* cln balancing code

* no test route

* excluded_interfaces

* THE DOCS!

* comments on steer/speed mixin

* switch to bus 0

* less UDS

* FAKE bus 0 vin and fingerprint

* FAKE locationd

* Keep steady and remove handcoded offset

* Improve startup sequence, get closer to stock openpilot

* Forgot to define angle

* lowercase

* revert that

* little cleanup

* change safety model

* update refs

* body is gold

* handle no llk

* oops

* litte more

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-03-31 17:16:15 -07:00
Adeeb Shihadeh
a55e25d9d2 test models: skip with flag 2022-03-23 16:42:04 -07:00
Adeeb Shihadeh
c76434ca9f skip test models in unittest discovery 2022-03-21 13:42:07 -07:00
Adeeb Shihadeh
bae78dd46b don't read params in car interfaces (#23978) 2022-03-16 15:17:47 -07:00
Adeeb Shihadeh
20db4525a2 Fix controls mismatch on button enable cars + test against panda safety (#23975)
* test models: check button enable cars against panda safety

* gm too

* cleanup
2022-03-16 14:54:22 -07:00
Adeeb Shihadeh
7deba690e2 Honda: fix possible controls mismatch on Nidecs (#23973)
* Honda: fix possible controls mismatch on Nidecs

* bump panda
2022-03-15 17:55:15 -07:00
Adeeb Shihadeh
8718a59330 cleanup selfdrive/test (#23967)
* move test routes and test_models

* move fingerprints

* little more

* remove that
2022-03-14 15:46:16 -07:00