Commit Graph

68 Commits

Author SHA1 Message Date
Shane Smiskol
559b620b20 test_models: check if in relay-breaking safety mode (#30476)
* remove initData, remove tolerance

* can check faster now

* don't
old-commit-hash: fc8cfe1280
2023-11-15 18:57:37 -08:00
Shane Smiskol
de63cac4c7 test_models: remove ignored address check list (#30475)
* remove ignore_addr_checks_valid

* lessgoooo
old-commit-hash: e44d84a7f9
2023-11-15 18:50:39 -08:00
Justin Newberry
337b156518 Pytest: load by group by default (#30466)
* wip

* use a class marker

* this one should be grouped too
old-commit-hash: 31c682d407
2023-11-14 17:33:47 -08:00
Justin Newberry
ef75f0ab12 CI: use "slow" marker for pytest (#30063)
* skip to mark

* fix quotes
old-commit-hash: 0251742079
2023-09-26 13:44:18 -07:00
Shane Smiskol
600c5e2644 test_models: check controlsd events (#29907)
* test_moedls: check controlsd events

* clean up

* sort

* controlsd modifies CP

* fix

* can use any segment now

* final fix

* use constant
old-commit-hash: 1410a1150c
2023-09-14 20:20:49 -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
9fefac8bcc test_models: detect when OBD multiplexing/fingerprinting (#29759)
* wait to leave elm mode before checking relay malfunction

* clean up

* clean up

* pycharm is best

* clean up

* more

* use pandaStatesDEPRECATED

* fix

* use constant

* only radar

* cmt

* set inline

* comment and re-arrange

* enable for relay malfunc check

* down here

* Update selfdrive/car/tests/test_models.py

* rm

* don't affect other tests

* up here

* one line

* update cmt

* no tolerance

* Revert "no tolerance"

This reverts commit 41b1c7e8beda87a878c3bb1f37ec96b256965966.

* comment is real solution

---------

Co-authored-by: Kacper Rączy <gfw.kra@gmail.com>
old-commit-hash: 5d1550de87
2023-09-05 21:22:36 -07:00
Justin Newberry
6537493450 Tests: disable laika tests in CI (#29742)
skip laika
old-commit-hash: 4c039ab022
2023-08-31 17:17:07 -07:00
Justin Newberry
c4f322ce2d Linter: remove pylint (#29611)
remove pylint
old-commit-hash: 1ee6ed4b16
2023-08-24 16:30:54 -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
98b3087fbb test_models: remove body standstill exception (#29453)
* remove body exception

* bump to master
old-commit-hash: 3563292e65
2023-08-17 16:26:30 -07:00
Shane Smiskol
d87466556c Hyundai: match panda standstill check (#29442)
* bump panda

* clean up

* common?

* Revert "common?" (not now)

This reverts commit 197af7cdbb6a8c8e58fcbccca94f7db004ce91e4.

* fix

* no failures!

* remove time

* bump

* bump

* undo
old-commit-hash: 9d0d59ac9b
2023-08-17 00:06:38 -07:00
Shane Smiskol
dc6af2820a test_models: check panda cruise state (#29423)
* cruise state test

* add todo

* rename

* clean up

* remove
old-commit-hash: 2d636deb4e
2023-08-15 23:55:53 -07:00
Shane Smiskol
7e716dbc87 CANParser: perf benchmark on route script (#29324)
* timing test

* test

* fix

* print

* loop

* clean up

* wider range

* Update selfdrive/car/tests/test_models.py

* Apply suggestions from code review

* run many times

* Update selfdrive/car/tests/test_models.py

* run for many its

* run with unittest and print as list

* Update .github/workflows/selfdrive_tests.yaml

* Update .github/workflows/selfdrive_tests.yaml

* total time is super inconsistent (body)

* Update selfdrive/car/tests/test_models.py

* clean up

* clean up

* clean up

* this works!

* draft

* test suite not as modular

* try something like this

* can do kb, but not too representative

* clean up

* remove kb? it depends on signals

* clean up

* more clean up

* rename

* just measure all CANParsers

* can do all this manually

* but this is way simpler

* comment

* fix mypy

* this is correct too

* 3 seconds instead of 1.5
old-commit-hash: e2910d0720
2023-08-15 20:06:15 -07:00
Shane Smiskol
6c6fcd8b22 test_models: more typing (#29420)
* not type checked, but we set this in test_car_model

* type this
old-commit-hash: 6ec00f5ee2
2023-08-15 20:01:33 -07:00
Shane Smiskol
4eadeff03f test_models: some typing (#29413)
* type

* also type check this func

* unused
old-commit-hash: 936f8b9817
2023-08-15 15:25:36 -07:00
Shane Smiskol
6be9e66073 jenkins: re-enable test_models (#29394)
* re-enable test_models

* now?

* Remove bad Volt segment

* Update Jenkinsfile

* use first n segments
old-commit-hash: fb235238ad
2023-08-14 16:08:34 -07:00
Shane Smiskol
1945ef0441 test_models: match online fingerprinting behavior (#29306)
* draft

* 1x

* clean up

* final clean up

* fix

* self explan

* space

* space
old-commit-hash: 001d4e8729
2023-08-11 18:33:11 -07:00
Shane Smiskol
344cbd2049 test_models: check relay malfunction (#29270)
* check relay malfunction in test_models

* draft

* actual relay malfunction (or ASCM was turned on)

* rav4: not dashcam and op enabled, but we're not sending anything

* clean up

* spaces

* more space

* flip

* better?

* combine

* for

* move up
old-commit-hash: 1099b3486a
2023-08-11 18:10:27 -07:00
Shane Smiskol
11492496fc test_models: run on route list (#26226)
* move to openpilot

* draft

* support internal urls

* not used

* update seg list

* regen segment list

* regen seg list

* regen

* regen

* regen

* no dirty segments

* regen seg list with no fuzzy or fixed fp

* regen segments with hda2 exception

* regen with added filters

* regen without bad dongle

* regen

* regenerate!

* regenerate, only OP enabled

* regen

* regenerate!

* regenerate!

* stash

* use SegmentName

* new route list

* add temp comment

* remove comment

* let's see if this works

* comment out other tests to speed up

* fix agent

* ?

* hmm

* oh whoops...

* add matrix

* fix

* how many levels do we need?

* fix values

* matrix can't be in parallel

* how about this

* try this

* Revert matrix

Revert "try this"

This reverts commit 8d0d91fd70c467c1fbb4e4e9aed511d15b2a30ef.

Revert "how about this"

This reverts commit a8e4fc53234824e77cbfb1e471277bc033e9dea1.

Revert "matrix can't be in parallel"

This reverts commit daaa6fcc3c75c74cbb90e97c565099a94123994c.

Revert "fix values"

This reverts commit df554b6a3371d124a574eb8d26bc51ef5b5b8fde.

Revert "how many levels do we need?"

This reverts commit 1a17320fa1c5e7220ef60e29981bbb3bb7da16c6.

Revert "fix"

This reverts commit e7eb6e404358fbd2eac3fea1901a8d30ea92d729.

Revert "add matrix"

This reverts commit a1b57e5725417d3c2f639f8edfc0c889b84b6753.

* use pytest instead! (5 jobs is ~150 mins)

* split lines, uncomment

* This Sienna seg has a fault SDSU that stopped forwarding/sending msgs

* picked a route with no PSCMStatus and no panda errors, recent routes are working

* this cadillac was dashcammed (no radar)

* opened an issue for this, it's 'expected' right now

* small clean up

* small clean up

* i don't think that worked

* is this needed?

* add to new PC tests

* cache

* draft

* Revert "draft"

This reverts commit 3b7f740dd4883118747300bc3687074c2d3c2116.

* probably should be function

* draft

* clean up

* add todo

* 600 random segments

* debug

* does this fix pythonpath issues?

fix

* try this

* mount?

* pytest again!

* no need for PYTHONPATH now

* Update Jenkinsfile

* ?

* convention

* clean up

* would be even more complex (have to unset ci which is class level)

* track

* is lfs pulled at all?

* ah no it's not
old-commit-hash: 70b1e9dd75
2023-08-10 00:45:23 -07:00
Shane Smiskol
c869f920aa 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
old-commit-hash: 80bbba14f7
2023-07-20 23:16:43 -07:00
Shane Smiskol
ce88b7cf51 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
old-commit-hash: f6390c6e40
2023-07-14 16:24:07 -07:00
Shane Smiskol
718fabb4d5 test_models: fix rx message bus (#28947)
Update test_models.py
old-commit-hash: c9c636bdd7
2023-07-14 14:04:24 -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
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
Shane Smiskol
bf31067e92 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
old-commit-hash: b2c6d5d34a
2023-01-23 20:16:50 -08:00
Shane Smiskol
2b6f575473 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>
old-commit-hash: 29470d2d2d
2023-01-10 22:28:54 -08:00
Shane Smiskol
5f8b46eabe 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 :(
old-commit-hash: 01dac5d06b
2022-11-30 20:27:55 -08:00
Shane Smiskol
1ea7e49e8d 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
old-commit-hash: 74b6e22a7d
2022-11-10 19:06:31 -08:00
Shane Smiskol
1e3df07775 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
old-commit-hash: 0e162cc13b
2022-10-31 23:02:31 -07:00
Shane Smiskol
fae11a780d test_models: speed up test (#26304)
* Update test_models.py

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

* only can msgs
old-commit-hash: d793d3622b
2022-10-31 13:54:13 -07:00
Shane Smiskol
47a55f3a14 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
old-commit-hash: 826d8a8ae3
2022-10-18 11:24:13 -07:00
Shane Smiskol
fa87f05dac Subaru: match panda standstill (#25789)
* subaru: match panda standstill

* subaru: match panda standstill

* actually test standstill

* bump panda to master
old-commit-hash: 86062fee6b
2022-09-14 19:11:49 -07:00
Shane Smiskol
322abc9e16 Chrysler: match panda standstill check (#25762)
* bump panda

* bump panda to master

* flip this around

* don't forget the body!
old-commit-hash: d3795c1227
2022-09-13 14:14:22 -07:00
Shane Smiskol
5b84ad22b5 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
old-commit-hash: 4d351427c5
2022-09-13 00:22:58 -07:00
Adeeb Shihadeh
e4f9781c17 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
old-commit-hash: 655a64b603
2022-09-07 17:12:49 -07:00
Shane Smiskol
00ef925901 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
old-commit-hash: b34fe711b0
2022-08-31 13:51:10 -07:00
Adeeb Shihadeh
35ff65121e pre-commit: add codespell (#25571)
old-commit-hash: 6590fb2b93
2022-08-30 11:20:55 -07:00
Shane Smiskol
8177163c09 Silence a PytestCollectionWarning (#25537)
Silence PytestCollectionWarning: cannot collect test class 'TestRoute' because it has a __new__ constructor (from: test_models.py)
old-commit-hash: 19810f2dcc
2022-08-23 17:26:29 -07:00
Shane Smiskol
9a48839146 test_models: pass carFw into car interface (#25535)
pass carFw into get_params
old-commit-hash: f8e44f2e9b
2022-08-23 13:42:14 -07:00
Shane Smiskol
b42a6c27b2 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
old-commit-hash: beae985f98
2022-08-20 14:47:18 -07:00
Jason Shuler
3072fb4aec 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>
old-commit-hash: 4ffe9e68db
2022-08-12 16:10:34 -07:00
Jason Wen
6001970be1 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>
old-commit-hash: 6e2584ef4b
2022-08-12 11:50:52 -07:00
Adeeb Shihadeh
81389c508b test models: add env var to filter out models
old-commit-hash: a009723513
2022-07-26 22:10:14 -07:00
Shane Smiskol
bf4f8e0ca9 test_models: check cruiseState.available (#24924)
* check available is true if enabled is true

* remove extra line
old-commit-hash: e45eb1bd28
2022-06-21 00:11:55 -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
Shane Smiskol
5f1990aa05 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
old-commit-hash: e5b189416d
2022-06-02 17:23:05 -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