Commit Graph

44 Commits

Author SHA1 Message Date
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
Adeeb Shihadeh
ae19308e83 add parkingBrake to carState (#23968)
* add parkingBrake to carState

* fix gm
2022-03-14 16:32:20 -07:00
Ewout ter Hoeven
55390d273f 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>
2021-12-16 14:58:17 +01:00
Jason Young
182b00896c 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
2021-05-26 14:02:42 -07:00
Adeeb Shihadeh
6c7ed8f2e4 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
2021-04-25 12:52:16 -07:00
Willem Melching
c23ec9f753 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>
2021-03-11 21:08:51 -08:00
Igor
0a65e87394 Add indi breakpoints (#19664)
* Added BP, V to latcontrol_indi

* hyundai

* toyota

* Tests for INDI outerLoopGain
2021-01-07 15:55:46 +01:00
Adeeb Shihadeh
47c21f10f5 grey panda is unsupported (#2458) 2020-11-03 19:56:25 -08:00
Adeeb Shihadeh
892e1162c0 Car cleanup (#1924)
* cleanup car code

* more pruning

* little more

* less pylint disables

* radar stuff

* fix

* udpate refs

* fix honda bosch

* fix test
2020-07-25 15:07:27 -07:00
Adeeb
c24a7e248a Release cleanup (#1649)
* start cleanup

* whitelist submodule release files

* don't need to ship tests

* revert changes to build script

* add those tests back

* fix typo

* whitelist dbcs

* test

* run the right test

* whitelist opendbc/can

* revert that

* add missing dotfiles

* clean up

* ford DBCs

Co-authored-by: Comma Device <device@comma.ai>
2020-06-08 14:24:14 -07:00
Willem Melching
4fcf47812b add some sanity checks on returned params 2020-05-30 17:15:41 -07:00
Willem Melching
60431802ba run carcontrollers multiple times 2020-03-24 16:04:42 -07:00
rbiasini
6582d632ec Test interfaces also in enabled state and fix a bug (#1213) 2020-03-06 23:48:47 -08:00
Willem Melching
e31ebda7a3 also call interface.apply in test 2020-03-06 17:02:37 -08:00