Commit Graph

259 Commits

Author SHA1 Message Date
Tim Wilson 1d03fb59c8 Car port: CADILLAC ESCALADE ESV 2019 (#29913)
* add CADILLAC ESCALADE ESV PLATINUM 2019

* add test route

* Update selfdrive/car/gm/interface.py

* combine params

* that's just a trim

* wow, there's a huge torque offset (left is 1.2 m/s^2, right is 1.9 m/s^2 max lat accel)

* don't hard code

* Update selfdrive/car/torque_data/override.yaml

* consistent formatting

* add to releases

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: b95d69ae1bc357edea20141c215289b0bdb68680
2023-10-21 02:04:24 -07:00
Justin Newberry 58936aa0cb Use StrEnum for car classes (#30114)
* str enum

* import sort

* fix car helpers

* fix that

* fix static analysis
old-commit-hash: 6ae465e4af76e21c6a31c541f37555f6bd0727fc
2023-09-30 17:15:34 -07:00
Shane Smiskol 173e95c37d bump opendbc (#29922)
* change signals

* bump opendbc

* bump

* bump
old-commit-hash: 7ceccaf6c31a194bacb9eaa96cad74bb8a148567
2023-09-15 00:30:49 -07:00
Shane Smiskol c5a673b998 car interfaces: handle buttons changing state without going unpressed (#26463)
* rename function first and foremost

* the function

* comment

* move usages over

* probably fine

* comments

* btn

* single line

* not comments

* fix keyword

* is it not clear?

* noEntry while holding cancel

* bumpo

* remove

* better?

* better?

* try this

* try this

* loop

* better

* more clear

* Revert "more clear"

This reverts commit 37e0277e4bfe6f1c553dbbcece6f532a280be62e.

* no optional

* fine

* add comment

* clean up honda

* one line

* can also do this

* but unclear

This reverts commit 1984a72cc8680b23c202695b8aeeb1aa28f7160c.

* bumppanda
old-commit-hash: 24f5a6170dc2e3bea9565115a09a1e20e18572de
2023-08-25 16:47:10 -07:00
Vivek Aithal ab4788cb3b CHEVROLET SILVERADO 1500 2020: Make Silverado lateral tune non-linear (#29540)
add nonlinear values to silverado
old-commit-hash: 2fe3231b49ea8cd82dd270682a4641ffd016d73a
2023-08-22 16:11:21 -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: a9626f95b69af19306143fc4def02fb5769405d2
2023-08-20 20:49:55 -07:00
Shane Smiskol 1a2818d775 Revert "radard: tie radard frequency to modelV2 vol. 2 (#29240)" (#29474)
* Revert "static analysis fixes"

This reverts commit 2271d0adf9a02aee1359717c47cb6280893a6b9b.

* Revert "radard: tie radard frequency to modelV2 vol. 2 (#29240)"

This reverts commit 6757e90415766e84ad1b6c921a2edb29ceb3bbbe.

* update refs
old-commit-hash: 1a08c2986e5600dd4e84bfeaed26c74e679085de
2023-08-18 22:56:43 -07:00
Jason Young ac83f87b36 interfaces: add common STD_CARGO_KG to mass (#29416)
* cleanup std_cargo_kg

* fix Sonata mass

* remove snowflake construct

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: f76ffbdbbcef50ba201edc0349f777e4e372b515
2023-08-17 21:06:07 -07:00
Shane Smiskol c817cb942d CAN fingerprinting test (#29427)
* 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

* stash

* draft

* draft

* remove old script

* clean up

* revert

* use it

* remove test

* opt

* no partial

* remove

* revert test_models

* test can fingerprinting

* so much simpler!

* fix dict resizing

* simplify

* need to do this

* fix

* move to new file

* rename

* comment

* ignore function-uses-loop-variable
old-commit-hash: fd8f8d8785dd07777f150bd61c7ba9a0ed00d786
2023-08-17 00:57:12 -07:00
Jason Young b4614b3c28 car interfaces: cleanup tire stiffness calculation (#28263)
* cleanup tire stiffness calculation

* bump cereal

* think these todos still apply

* gm: same default

* revert comments

* bump

* update refs

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 90c4bbe8e4ee11f3c1289a0dbb93262824fa430c
2023-08-15 14:17:08 -07:00
morrislee d668470d29 Closer Silverado 1500 Weight (#29355)
old-commit-hash: 060aa33b99b965ca1a47994a72eaf43071101676
2023-08-12 17:24:12 -07:00
Kacper Rączy 4017b1707c radard: tie radard frequency to modelV2 vol. 2 (#29240)
* radard: tie radard frequency to modelV2

Accumulate parsed messages until state is updated (toyota)

Same for honda

Rename rr to something more descriptive

* Change _update method name, since signature has changed

* Update ref commit

* Some renames

* Check for number of cans
old-commit-hash: 460f5c8e0b2fd2c420e211b09b70d1d79834a929
2023-08-11 18:07:06 -07:00
Justin Newberry f33b4de80b Ruff: b905 (strict zip) (#29336)
* added mutable default args

* most of the Bs

* add comment about lrucache

* b905
old-commit-hash: e4ead4f1830618f5f61978491930cb0b8d36ab26
2023-08-11 16:13:51 -07:00
Shane Smiskol 151b707901 Car interfaces: remove hard-coded signal definitions (#27773)
* What if: no signals! 🙅🤌🎆

* do hyundai

* honda!

* do gm

* and vw! (sorry comments)

* do those

* -500

* little more

* fix subie

* change back

* bumpopendbc

* oof lol

* messages

* some clean up

* here too

* clean up honda radar_interface.py

fix

rm

* bump opendbc to master

* add todo

* rename checks in tesla/radar_interface

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: cbfcc405715ae4fa45b3beea03dd82ba925495c4
2023-08-10 20:30:35 -07:00
Justin Newberry 3ee0786de3 CI: Pylint to ruff (#29294)
* pylint to riff

* pylint to riff

* pylint to riff

* revert more

* undo exclude removal

* exclude tinygrad

* set line length

* pylint exclusions to ruff

* same excludes as old linter

* fix tools QA

* remove unrequired check

* revert linting third_party

* ignore e402
old-commit-hash: 7fdd9fc37c1c5febf1cd3dc86441ebf0dec7f370
2023-08-09 13:26:54 -07:00
Justin Newberry 7b677910df Linter: Fix >160 line length test (#29287)
* test

* fix line length

* fix line length

* fix file size

* revert poetry

* cleanup for PR
old-commit-hash: cf64b27168614f851087adab2d7f766425922f64
2023-08-08 17:13:35 -07:00
Shane Smiskol 5d45abcb55 GM: remove unused CANParser flag (#29244)
setting to 0 does same thing
old-commit-hash: 8bff75c010afb04b3acc43ebec312be01dd4efe3
2023-08-04 21:42:34 -07:00
Kacper Rączy c92e7265a6 Revert "radard: tie radard frequency to modelV2 (#29063)" (#29243)
This reverts commit 4b221cb4fd271664ab7d39c5cfefb4225ca07c2a.
old-commit-hash: 1774b4fc61c8f92fae16545a68854238660737e6
2023-08-04 20:25:40 -07:00
Kacper Rączy 79fa322d4a radard: tie radard frequency to modelV2 (#29063)
old-commit-hash: 255f5c13f2d8c6796fd960b248856f11a3c1b05a
2023-08-03 22:10:21 -07:00
Vivek Aithal ad986b39cf [GMC ACADIA DENALI 2018] Move to torque control, non-linear feed-forward (#28923)
* move GMC ACADIA to torque control, with a Bolt-like feedforward

* update offline values

* update offline values

* reduce friction

* update values

* update values

* cleanup
old-commit-hash: 3612c12b14b90bdc14151194b560a5ff8216b9e0
2023-07-21 11:28:48 -07:00
Shane Smiskol d456293479 GM ASCM: don't apply gas when stopping (#28699)
* don't apply gas when stopping

* simpler?

* todo

* fixme
old-commit-hash: 653daba9edad96215e16ab13089aed214e3e264d
2023-07-14 05:58:17 -07:00
Shane Smiskol cfe294dde0 GM: allow enabling down to a stop for Silverado/Sierra (#28708)
* Silverado: allow enable down to 0 without user brake

* update docs

* firmly

* better comments, fix docs

* revert docs
old-commit-hash: 82f2f9448b9c7905d6dd9ff088d9d6605ab7ef06
2023-06-27 00:36:53 -07:00
morrislee 9bd006f551 GM camera ACC: add camera diagnostic address to fingerprints (#28331)
* add missing addresses FP for silverado

* add for all camera acc gm

* add test

* check both rx and tx

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 2914fa9d12d59f26dafc14fc37dccba03d8f778f
2023-06-25 20:13:55 -07:00
Shane Smiskol 31c1e66a01 car docs: document parts of parts (#28292)
* more stuff

* even more

* all parts func

* start to use it

* include self in parts

* use car_parts_new

* not used

* more usages

* remove get_parts

* remove more commented stuff

* remove iter

* clean up some more stuff

* more

more

* ford

* optional

optional

* nissan

* use new classes

* fix tests

* fix

* order

* no more required

* connector

* CARS.md

---------

Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
old-commit-hash: 024abe6455d44c7616ca7c694643c5324d0d371c
2023-05-31 21:30:50 -07:00
Maxime Desroches 734b6481b7 car docs: list all needed hardware (#28212)
* generic car parts

* better carparts

* add part type

* more tests

* multiple enums

* unit tests

* just check isinstance

* better name

* remove _connector suffix

* remove those hyundai lines

* remove default arg

* Revert "remove default arg"

This reverts commit 139650a3b6b94358c3b9b12bb5fbe0a326d7abad.

* cleaner code structure

* use fingerprint

* review

* abstrac data class + common

* no more dataclass

* conflict

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 9f5f8b603cf69b06c4804632268491cf38cfac7e
2023-05-22 10:17:33 -07:00
Shane Smiskol c7ebc05373 GM: explicitly copy signals to forward (#28243)
* gm

* same order as DBC
old-commit-hash: 3d94423108cbe313d47301c7d6e3f24227157c07
2023-05-20 18:09:57 -07:00
Maxime Desroches 4626add29c add harness kit content to the doc (#28139)
* add harness kit content to the doc

* parts as enum

* nissan

* merge column

* rename column

* scaling

* scaling again

* 500px

* align text

* more px

* add style

* more width

* more

* more

* smaller text

* make all text smaller

* prev width

* default list

* remove hidden a ref

* try to remove again

* revert

* replace harness with harness_kit

* try fix

* cleaner

* center everything

* make pylint happy

* allow more than 1 of each parts

* use copy module

* review

* testing spacing

* revert

* bigger text

* formating

* split harness col lines

* remove print

* resolve

* rename to view

* keep formating in template

* simplify

* add unit test

* more generic way

* better

* harness connector only

* comment

* review

* put back harness parts

* missing dash

* too much space

* don't reload when clicking

* shorter comment

* only last line

* generate

---------

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 70677fe5fc044bff0ea99eab6bba5a6d02d5a85f
2023-05-15 15:33:54 -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: 5aebdb0ad0e7e527f5deb553ffd193abea02a357
2023-04-18 12:22:22 -07:00
Yong-seok, Jang f8453b27d5 GM: Trailblazer 2021-22 support (#27830)
* Add trailblazer support

* Update routes.py

* Update routes.py

* Update CARS.md

* Fix incorrect torque name

* Update values.py and CARS.md

* Change to update another route

* update docs

* only 2021 https://en.wikipedia.org/wiki/Chevrolet_Trailblazer_(crossover)

only 2021

* new FP with missing addrs

* Update selfdrive/car/gm/interface.py

* tune the torque params

* update docs

* remove as a new platform

* Revert "remove as a new platform"

This reverts commit c9c65f29dbb1e1a5926540bb75433928325d6c0e.

* add comment and comment out FP

* need it to be in all_known_cars to test_model

* add to releases

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: e1ad8df5192c9273688ced8f4a379f6d65d09f4d
2023-04-12 23:32:03 -07:00
Adeeb Shihadeh 9410a4f513 car docs: add field for min compatibility requirements (#27805)
old-commit-hash: 088cbfc9d506ab24fe79e37c0ca4dd76f3883e45
2023-04-04 17:47:49 -07:00
royjr 53aa021ecb Cleanup: GM remove unnecessary variable (#27779)
old-commit-hash: 2ab05f96c3e535938533dd877968a7f6ae79f583
2023-04-01 15:24:29 -07:00
Vivek Aithal b6909a65e7 Bolt EUV: Non-linear torque function (#27696)
* add erf based ff

* silly bug; diff of nonlinear != nonlinear of diff

* add sigmoid based ff, ensure slope at 0 > 1

* reduce steer down limit and increase driver allowance

* rebase panda

* atry without friction, and with tanh nonlinear

* finalize the nonlinear function

* do not disable friction compensation in the ff

* bump panda

* bump panda

* update refs

* update refs

* resolve comments

* Add type hints

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 15b880c0ea6fb306e916a2ec015b5f03cec22b20
2023-03-29 15:10:39 -07:00
Shane Smiskol f20e33a2c5 GM: common longitudinal actuator delay (#27357)
* common longitudinal actuator delay

* comment

* remove dup

* move

* clean up

* Update ref_commit
old-commit-hash: aefe636cc1b415f4ebf63f71ae9ae298461e37ac
2023-03-22 00:23:51 -07:00
koch-cf b39f632403 GM: Buick LaCrosse 2017-19 support (#27332)
* Added Buick LaCrosse 2017

* Added Buick LaCrosse as candidate

* Added Buick LaCrosse CAR_INFO and Fingerprint

* Added Buick LaCrosse to non_tested_cars

* Added Buick LaCrosse

* Updated number of supported cars to 237

* Added ACC and LKAS description to Buick LaCrosse

* Updated CAR_INFO for Buick LaCrosse

* Added the Escalade which was recently updated

* Update selfdrive/car/gm/values.py

Suggested fingerprint by @sshane

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

* Premium is a trim with ACC. Use package name instead

* lacrosse custom FF;
fit info:
describe(steer_offsets) = DescribeResult(nobs=1649402, minmax=(-0.7127894163131714, 5.3997602462768555), mean=3.3090523060153645, variance=0.3130325564084465, skewness=-1.5986155151533736, kurtosis=8.18810418298873)
Samples: 1357787
Regularizing...
Regularized samples: 1140
speed: DescribeResult(nobs=1140, minmax=(8.478170424241286, 35.837870224662446), mean=27.888804767013475, variance=34.16742353763829, skewness=-1.068587303119431, kurtosis=0.6193071765927134)
angle: DescribeResult(nobs=1140, minmax=(-21.057768565637094, 28.516874490999708), mean=-0.4328602593886506, variance=43.19046813273241, skewness=0.001966426701503317, kurtosis=0.20547357649038434)
steer: DescribeResult(nobs=1140, minmax=(-0.8432471203007578, 0.9634959333674695), mean=-0.021981142946747863, variance=0.20152217060233915, skewness=0.03202313890158864, kurtosis=-1.2318826088567174)
Performing fit...
Fit: [5.85397825e-01 3.27650818e-01 4.60531117e-03 1.32307599e+01
 1.37194709e-01 1.33099557e-01 6.14782304e-02]
ANGLE_COEF = 0.58539783
ANGLE_COEF2 = 0.32765082
ANGLE_OFFSET = 0.00460531
SPEED_OFFSET = 13.23075991
SIGMOID_COEF_RIGHT = 0.13719471
SIGMOID_COEF_LEFT = 0.13309956
SPEED_COEF = 0.06147823
MAE old 0.2098, new 0.0309
STD old 0.1021, new 0.0273
deg 00-03:457, deg 03-06:258, deg 06-09:218, deg 09-12:132, deg 12-15:62
deg 15-18:6, deg 18-21:4, deg 21-24:1, deg 24-27:0, deg 27-30:2
deg 30-33:0, deg 33-36:0, deg 36-39:0, deg 39-42:0, deg 42-45:0

mph 10-15:0, mph 15-20:1, mph 20-25:18, mph 25-30:12, mph 30-35:30
mph 35-40:26, mph 40-45:52, mph 45-50:54, mph 50-55:73, mph 55-60:86
mph 60-65:204, mph 65-70:228, mph 70-75:179, mph 75-80:176, mph 80-85:1
mph 85-90:0,

* Update routes.py

* remove from non tested routes

* use torque controller

* update docs

* update releases

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
Co-authored-by: Tim Wilson <twilsonco@gmail.com>
old-commit-hash: ae423a68686ca258c40fa679b931011e99f5f780
2023-03-20 13:10:19 -07:00
Shane Smiskol 4cf0ce33d5 steer limits: rename common dist to meas function (#27453)
* rename function

* make a wrapper function (ford uses dynamic up/down limits

* make two functions consistent

* make torque function convert to int
old-commit-hash: 581fd62d2642629b23ac111112245a963202143f
2023-02-26 17:32:52 -08:00
Adeeb Shihadeh 5da2a5fa05 GM: revert steering limits update (#27413)
* Revert " GM: update steering limits (#27331)"

This reverts commit b8740c4d6c5bad5ac947d9eefeb38a5b47876ca3.

* update refs

* bump panda
old-commit-hash: 1504c10760627406ce26478bcb98957c64deafac
2023-02-21 15:48:10 -08:00
Adeeb Shihadeh 956918eb1d GM: revert custom Bolt torque tune (#27403)
* Revert "GM: cleanup torque feedforward function (#27347)"

This reverts commit cdd8f003e3571d4b33fc71c4bc23744cea02140c.

* Revert "Chevrolet Bolt: Non-linear torque tune (#27344)"

This reverts commit b6737ca5903ecaac3d6322b92112ccb67116b149.

* update refs
old-commit-hash: 2008332bd42528ae56d937a2ec0e9a1dd244b2ea
2023-02-21 15:27:48 -08:00
Shane Smiskol b12d2b5dd4 GM: add longitudinal delay to Escalade (#27406)
* add delay to escalade too

* order
old-commit-hash: 79749a306c7621e047d1a57fae40493b40c25954
2023-02-20 16:12:11 -08:00
Shane Smiskol 8d0277a2ed GM: remove redundant CarController class variable (#27280)
* clean up

* fix check

* only set ts_nanos on update
old-commit-hash: 14d44e444418e1b6bd23afe5a371db886e8273e2
2023-02-20 15:33:15 -08:00
Eric Brown b98587ae87 GM: detect unplugged or missing radar (#27245)
* Add flashed Volt fingerprint

* Add another fingerprint

* Detect radar header message

* dashcamOnly if ASCM vehicle with radar unavailable

May be able to change this in the future to OP long off with experimental long available

* no submodule update

* Revert minEnableSpeed

* combine into one fingerprint

* Don't use GM radar DBC

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

* unused

* add new FP

* update docs

* use_off_car_defaults

use_off_car_defaults

* update docs

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: c3ba2a025ba96684cd0371ae46b3847589b5c773
2023-02-20 15:28:32 -08:00
Ricky Gilleland 701bde9de3 GM: Escalade 2017 support (#27276)
* Initial 2017 Escalade values

* update docs/CARS.md

* revert back to v1 fingerprint & add test route

* revert bad merge

* update fingerprint

* update

* update

* Update selfdrive/car/gm/values.py

* Update selfdrive/car/gm/values.py

* no engine

* Try global tune

* pcm

* Driver Assist Package has ACC, and includes LKAS from previous package

* update docs

* add to releases

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: b76795d7f083c956004fefd07dbb406eeeb20584
2023-02-15 17:07:24 -08: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: 89934b35d04291384b7a287a41ce49905f321167
2023-02-15 16:27:00 -08:00
Shane Smiskol 7357149f5a GM: cleanup torque feedforward function (#27347)
no numpy
old-commit-hash: 8c099dd4e5adf040f7f454714cf729725bee7f91
2023-02-14 22:06:23 -08:00
Vivek Aithal 5edcf1380e Chevrolet Bolt: Non-linear torque tune (#27344)
* add non linear tune

* update refs

* rerun tests
old-commit-hash: e49748d571d06a65a4361dde1f2f63c7294da13a
2023-02-14 16:20:28 -08:00
Vivek Aithal 474e072c02 GM: update steering limits (#27331)
* reduce steer down limit, driver allowance

* update refs

* update refs
old-commit-hash: 1cdf80003dcaea79375cf398ec65849424f2f44b
2023-02-14 13:22:49 -08:00
Shane Smiskol 70a6e03692 GM: add permanent ACC fault signal (#27306)
* bump opendbc

* check signal

* bump opendbc
old-commit-hash: 6474e16a720e88181f03652dcfe91306ddbdc06e
2023-02-11 00:12:33 -08:00
Shane Smiskol 698c6e6624 GM: add hysteresis to cluster speed (#27301)
* add cluster hysteresis

* Update ref_commit
old-commit-hash: 5831a83c907f9f90aac2c53839cd37554b5b235a
2023-02-10 16:14:53 -08:00
Shane Smiskol 58e6704a6f GM: split steering speeds (#27277)
* split steering speeds

* update docs

* Update ref_commit
old-commit-hash: 29ca52bc48dbcfb5e0f74a889229cf44f7a686a6
2023-02-09 16:53:16 -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: 8f5057ff2dbea4ebc85bc8f55bc7a37e4d5969b6
2023-02-09 15:37:39 -08:00
Shane Smiskol 2e78f89e74 GM: increase min steer speed to avoid temporary faults (#27274)
* increase min steer speed to avoid temp volt faults

* actually 10.15 is safe

* Update ref_commit
old-commit-hash: 9aac0806e3c25c374b67770086cdfd67ffafaf07
2023-02-09 13:24:52 -08:00