Commit Graph

83 Commits

Author SHA1 Message Date
Eric Brown
20c6cbc1d2 Remove ASCM harness footnote from car docs (#32271)
* Remove ASCM harness footnote from car docs

* Re-add Footnote class

* fix

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2024-04-22 12:22:48 -07:00
Shane Smiskol
9f4cf8017f GM: hide ASCM from car docs (#32260)
* stash

* clean up

* programmatically

* Update selfdrive/car/gm/values.py

* do flags later

* clean up
2024-04-19 20:33:48 -07:00
Justin Newberry
b0eb3ba4f4 cars: platform enums -> prepend brand name (#31927)
* with brand name

* migrate

* Fix

* fixes

* more

* passes

* fix

* fix the doc

* collects

* these too

* more stuff

* body exception :/

* more

* hardcode i guess

* update ref

* toyota

* more toyota

* and here

* final!

* fix notebooks and ccs

* move this here
2024-03-19 17:29:50 -07:00
thenhnn
489528dcae PlatformConfig: automatically get platform_str from the enum name (#31868)
* get platform_str from the enum name

* fix tests

* add migration table

* remove impossible todo

* Add link to PR in MIGRATION table

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

* Remove useless brand name comments and rename RAM_1500 to RAM_1500_5TH_GEN

* rename RAM_HD to RAM_HD_5TH_GEN

* rename references to RAM_HD and RAM_1500

* change "mock" to "MOCK" and rename torque data of Nissan Leaf 2018 IC

* remove MOCK from fingerprints.py

* change hard-coded car model in test_can_fingerprint.py/test_timing

* migration

* update ref

* space

* prius

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: justin newberry <justin@comma.ai>
Co-authored-by: Justin Newberry <jnewberry0502@gmail.com>
2024-03-19 11:16:02 -07:00
Justin Newberry
655e5f7c3e rename CarInfo to CarDocs (#31879)
car info to car docs
2024-03-15 11:45:44 -07:00
Shane Smiskol
bdae188c6f docs: don't support multi-type car info (#31875)
don't support multi-type car info
2024-03-15 00:11:41 -07:00
Shane Smiskol
78a46ce724 car values formatting (#31747)
values formatting
2024-03-06 15:47:44 -08:00
Justin Newberry
25ccb2426c cars: remove CAR_INFO map (#31739)
* no carinfo map

* smaller diff

* not on mock
2024-03-06 11:22:12 -08:00
Shane Smiskol
638aaa9e53 Platform configs: move tire stiffness into config (#31678)
* first one to open PR

* mazda

* oh it is

* fix gm car specs and create MazdaCarSpecs

* fix

* do honda

* ruff
2024-03-05 15:10:58 -08:00
Justin Newberry
b0eae8c1b7 platformconfig and carspecs are now required, carspecs no longer kwarg (#31667)
* required

* mock can be a platform!

* default is mock

* fix that

* and that one
2024-03-01 11:31:51 -08:00
Justin Newberry
3a6c3315ab Subaru: move to flags within PlatformConfig (#31584)
* flags

* update ref

* use the flags directly

* use post_init (don't freeze)

* we can maintain frozen with custom class

* not preglobal

* move to common

* cleanup
2024-02-28 20:12:14 -08:00
Shane Smiskol
ec9856b784 GM: add more FW logging (#31633)
* add more DIDs

* one more

* update refs

* rm

* btr

* Update selfdrive/car/gm/values.py
2024-02-28 18:01:58 -08:00
Justin Newberry
9ecff49118 platformconfig: freeze all dataclasses (#31605)
* frozen

* frozen
2024-02-26 21:16:05 -08:00
Eric Brown
5012e15aa6 GM: move to platform config (#31553)
* subaru platform config

* forester wrong dbc

* spacing

* subaru car specs

* someday!

* more red diff

* Move GM to platform config

* Implement CarSpecs

* Simplify centerToFront

* Accidentally had subaru DBC

* Fix typo in DBC name

* done above

* two spaces

* that is moved up

* fix hardcoded fingerprints

* whitespace

* values

* better?

* fix

* bump

* fix

* fix

---------

Co-authored-by: Justin Newberry <justin@comma.ai>
2024-02-25 17:53:26 -08:00
Cameron Clough
995250ae49 use pyupgrade to update to new typing syntax (#31580)
* add pyupgrade hook

* run pyupgrade (pre-commit run -a)

* ruff --fix

* Revert "add pyupgrade hook"

This reverts commit 56ec18bb6b8602a0b612f3803d96cdad14b52066.

* revert changes to third_party/

* manual type fixes

* explicit Optional wrapping capnp objects
2024-02-24 16:41:23 -08:00
Shane Smiskol
06f0e50964 GM: FPv2 logging (#31221)
* bump

* from https://github.com/commaai/openpilot/pull/27929

* get VIN on bolt!

* might as well try on other gms

* remove vin

* ugh gm is going to be slow

* fix

* should really fix this

* revert

* happy?1

* fix unit test

* bump

* functional addressing must be an OBD gateway feature, this does nothing

* fix vin response

* fix addr!

* finally fix fw_versions bugs since boardd IsOnroad refactor

* for

* only bus 0

* clean up

* Update selfdrive/car/gm/values.py

* ChatGPT re-write

* filter out did

* todo

* oof

* preview: what multiple DIDs per ECU would look like in the future

* Revert "preview: what multiple DIDs per ECU would look like in the future"

This reverts commit 88f0d8611e638de644adc5feabade848c03d59e4.

* function to get all ecus

* we can remove this!

* can also do this!

* and this one too :o

* consistency

* yay

* clean up
2024-01-30 02:19:12 -08:00
Adeeb Shihadeh
af137bac58 GM: remove GMLAN dash msg (#30547)
* remove GMLAN

* update refs
2024-01-08 19:49:22 -08:00
Justin Newberry
28eed156e0 Move all fingerprints to fingerprints.py (#30790)
* move fingerpints

* fix circular imports

* fix circular imports

* fix auto fingerprint

* fix those tests

* and controlsd

* add labeler rule

* no defaultdict
2023-12-18 14:04:27 -08:00
Tim Wilson
b95d69ae1b 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>
2023-10-21 02:04:24 -07:00
Justin Newberry
6ae465e4af Use StrEnum for car classes (#30114)
* str enum

* import sort

* fix car helpers

* fix that

* fix static analysis
2023-09-30 17:15:34 -07:00
Adeeb Shihadeh
a9626f95b6 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
2023-08-20 20:49:55 -07:00
Shane Smiskol
fd8f8d8785 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
2023-08-17 00:57:12 -07:00
Justin Newberry
7fdd9fc37c 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
2023-08-09 13:26:54 -07:00
Justin Newberry
cf64b27168 Linter: Fix >160 line length test (#29287)
* test

* fix line length

* fix line length

* fix file size

* revert poetry

* cleanup for PR
2023-08-08 17:13:35 -07:00
morrislee
2914fa9d12 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>
2023-06-25 20:13:55 -07:00
Shane Smiskol
024abe6455 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>
2023-05-31 21:30:50 -07:00
Maxime Desroches
9f5f8b603c 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>
2023-05-22 10:17:33 -07:00
Maxime Desroches
70677fe5fc 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>
2023-05-15 15:33:54 -07:00
Yong-seok, Jang
e1ad8df519 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>
2023-04-12 23:32:03 -07:00
Adeeb Shihadeh
088cbfc9d5 car docs: add field for min compatibility requirements (#27805) 2023-04-04 17:47:49 -07:00
Vivek Aithal
15b880c0ea 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>
2023-03-29 15:10:39 -07:00
koch-cf
ae423a6868 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>
2023-03-20 13:10:19 -07:00
Adeeb Shihadeh
1504c10760 GM: revert steering limits update (#27413)
* Revert " GM: update steering limits (#27331)"

This reverts commit 1cdf80003d.

* update refs

* bump panda
2023-02-21 15:48:10 -08:00
Eric Brown
c3ba2a025b 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>
2023-02-20 15:28:32 -08:00
Ricky Gilleland
b76795d7f0 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>
2023-02-15 17:07:24 -08:00
Vivek Aithal
1cdf80003d GM: update steering limits (#27331)
* reduce steer down limit, driver allowance

* update refs

* update refs
2023-02-14 13:22:49 -08:00
Shane Smiskol
86d86fa9da GM: reduce steering message rate (#27201)
* Lower active rate and raise limits to compensate

* bump panda

* bump panda

* Update ref_commit

* bump panda to master
2023-02-07 23:38:05 -08:00
Shane Smiskol
47cca343ec docs: open footnotes in new tab 2023-01-12 15:07:14 -08:00
Shane Smiskol
aab33b1c5f Lateral jerk unit test (#25759)
* stash

* more test

* less test

* clean test

* no angle

* add tolerance

* fix gm

fix gm

* test both

* lower some rates on hkg

* stash

* simpler

* bump panda

* Revert "bump panda"

This reverts commit f2137c221145cca723fe6ee3378ba947b7061965.

* only torque

* make kona pass

* duplicate __init__

* move

* half clean up

* half clean up

* more clean up

* more clean up

* fix static analysis

* calculate over 0.5 seconds

* limit to max steer

* type annotation

* calc once
2022-12-15 21:52:07 -08:00
Shane Smiskol
3e2a49c6e5 GM: add Bolt EV test route (#26681)
* bolt ev!

* releases

* it's a trim
2022-12-02 22:09:42 -08:00
Shane Smiskol
1367f84425 Car docs: add a make-specific init function (#26565)
* add a hook function for makes to implement custom docs logic

* don't need this

* use the pre-defined list for honda's harnesses

* one line 😎

* Update selfdrive/car/docs_definitions.py

* i didn't know you didn't need a pass!

* don't change docs order
2022-11-21 18:01:08 -08:00
Tim Wilson
187f8c177a Add video_link for GMC Sierra (#26506)
* Add video_link for GMS Sierra

* fix precommit

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2022-11-17 02:03:13 -08:00
Tim Wilson
bdc432d218 Add video link for Volt (#26504) 2022-11-15 10:55:43 -08:00
Shane Smiskol
2fb7b4ffad GM camera ACC: vision-only ACC behind toggle (#25631)
* put gm camera voacc behind disable radar toggle

* bump panda

* bump panda

* bump panda

* experimental long

* fixes

* car control notes and fixes for Bolt EUV

* might enable stop and go

* consistent name

* min enable speed seems to be around 5 kph

* camera acc can engage under 5 kph if stopped

* comment

* comment

* remove this for now

* only real brake

* comments

* update max brake

* bump

* clean up/fix

* same if

* simplify

* fix

* old comment

* no brake_pressed

* temporary fault fix

* tune longitudinal

* update docs

* bump panda

* GM camera ACC cars have no regen in ACC

* cleaner

* cleaner

* fix

* set max gas

* fixes

* fix LKAS unavailable warning from camera

* only camera

* bump panda

* bump panda

* bump panda

* bump panda

* clean up gmcan

* clean up CC

* flip

* rm

* rm comment

* clean up

* custom starting/stopping probably not needed

* Update selfdrive/car/gm/carcontroller.py

* fix crash

* long tuning

* we need long control state to resume

* CAMERA_ACC_CAR not needed

* no interp on accel

* tuning

* formatting

* formatting

* formatting

* formatting

* formatting

* no need to init ccp

* makes more sense now
2022-11-02 02:46:29 -07:00
Shane Smiskol
27e315e58f GM: reduce LKAS faults while inactive (#26196)
* send at 10hz when inactive

* try to make it fine to switch rates

* fix rate

* todododo

* fine if we skip, we usually send too early

* clean up

* this may be required, 50Hz is not really needed to sync/initialize

* preserves previous behavior (not sure if this makes sense)

* Revert "preserves previous behavior (not sure if this makes sense)"

This reverts commit 3b297bca72307b5cba09bec4e2cd8e0f2761af42.

* Revert "this may be required, 50Hz is not really needed to sync/initialize"

This reverts commit a6b4693814214d3f508db922f3b371c402a13995.

* rm com

* Update ref_commit

* gate behind GM Cam

* common logic

* bet

* update refs
2022-10-25 00:12:49 -07:00
Shane Smiskol
3a70253567 GM: inactive gas/regen safety (#26184)
* Add INACTIVE_REGEN

* bump

* Update selfdrive/car/gm/carcontroller.py
2022-10-21 01:14:15 -07:00
Shane Smiskol
84adb8d925 GM: raise max brake (#25810)
* -4 didn't make any sense?

* comments

* comments

* update to 400

* bump panda

* remove unused iso limit vars

* update comments

* bump panda

* Update selfdrive/car/gm/values.py

* Update ref_commit
2022-10-04 00:39:19 -07:00
Cameron Clough
89768376c0 docs: remove redundant keyword args (#25899)
remove unnecessary keyword args, unnecessary package
2022-09-27 14:00:08 -07:00
Jason Shuler
cfaa1b7d3e GM: Chevy Bolt EV 2022-23 (#25430)
* Chevy Bolt EV w ACC Port

* dashcam

* The website allows you to select the package without ACC

* fix Bolt E(U)V centerToFront

* Update selfdrive/car/gm/values.py

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2022-09-15 20:11:53 -07:00
Jason Shuler
1aa8c0525e GM: Chevy Equinox 2019-22 (#25431)
* Chevy Equinox Port

* LKAS is not standard on 2019, but it's the same package as ACC. (LKAS standard 2020+)

* 2019 here too

* clean up

* add to untested

* not in docs

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2022-09-15 17:55:02 -07:00