Commit Graph

153 Commits

Author SHA1 Message Date
Shane Smiskol
d0d44a51a0 card: create pedal pressed event (#32417)
* card: create pedal pressed event (#32393)

* move pedalPressed to card

* rm

* needs to be a builder

* move these

* clean up

* reader later

* Update ref_commit

* moved to card
2024-05-13 16:18:55 -07:00
Shane Smiskol
9287a69624 Revert "card: create pedal pressed event" (#32414)
Revert "card: create pedal pressed event (#32393)"

This reverts commit d18da895d3.
2024-05-13 14:25:22 -07:00
Shane Smiskol
d18da895d3 card: create pedal pressed event (#32393)
* move pedalPressed to card

* rm

* needs to be a builder

* move these

* clean up

* reader later

* Update ref_commit
2024-05-13 14:15:26 -07:00
Shane Smiskol
3dfb6d7931 CarInterface: move stateless, common car events to car interface (#32394)
* move stateless, common car events to car interface

* try to reduce process replay diff a bit

* Revert "try to reduce process replay diff a bit"

This reverts commit b12798deabea67c5a636d6e70e80a3c21c7225ff.

* update refs
2024-05-13 12:50:42 -07:00
Adeeb Shihadeh
afc96972c8 car: CarController and CarState are always present (#31925)
* always set

* add mock

* little more

* fix

* fix
2024-03-19 14:16:33 -07:00
Adeeb Shihadeh
3a7582d9a6 Abstract out common CarInterface.apply (#31924) 2024-03-19 13:46:31 -07:00
Shane Smiskol
d5852ab1b3 CarInterface: no platform config fallback (#31873)
* no mock default

* rm
2024-03-14 22:27:32 -07:00
Justin Newberry
ca5a2ed942 move getting platform to get_params (#31871)
* better

* string

* not here
2024-03-14 21:58:25 -07:00
Kacper Rączy
ecce4663d3 RadarInterfaceBase: remove no_radar_sleep field (#31715)
Remove no_radar_sleep field from base radar interface
2024-03-05 16:45:47 -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
Shane Smiskol
52ee070fe0 Toyota: use platform config (#31607)
* part 1. Toyota platform config

* more

* everything works now

* no more DBC

* janky but that saves a lot of car lines

* need to init inside values or else it won't be reliable

* no return

* fixes

* minor update

* common flags, no dbc grouping

* some clean up

* some clean up

* rename

* copied wrong :(

* another

* copied specs for easiest ones first

* second easiest

* fix erroneous commas

* more clean up

* do the rest

* bug

* the refactor is so error prone

* huh?!

* static

* fix stiffness factor

* detect unsupported DSU

* Revert "detect unsupported DSU"

This reverts commit 9b72de6c8ef282ce20f6472970874a960761884b.

* fix DBC diff

* test carparams

* test sets

* scratch

* catches this

* Revert "scratch"

This reverts commit de08daa9fb8cc0368c5847b669e87b1b2e577616.

* Revert "test sets"

This reverts commit 62402f9b021cdf16a27fd9fb0883d81169711cbd.

* Revert "test carparams"

This reverts commit b02971659c2a8268d0ac8fdff02231dc36b5a197.

* Update ref_commit
2024-03-01 02:14:33 -08:00
Shane Smiskol
f20bfacb94 move CarControllerBase up with other car classes 2024-02-28 20:23:09 -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
Justin Newberry
d4c497d826 add CarControllerBase base class to all CarControllers (#31630)
just base class for now
2024-02-28 17:13:44 -08:00
Justin Newberry
6d0027342a remove cast for platformconfig (#31604)
* this isnt required

* Cleaner
2024-02-26 21:01:41 -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
Jason Young
da540eac13 VW: Move car specs to PlatformConfig (#31567)
* subaru platform config

* forester wrong dbc

* spacing

* subaru car specs

* someday!

* more red diff

* all brands can be done like this

* but this should be done first and thats subaru specific

* that seems very low but we shouldn't change it here

* as long as it subclasses str its fine

* well that sucked

* cleanup and follow refactor

* diff reduction

* oops

* fix

* force fingerprint

* Revert "force fingerprint"

This reverts commit 600fbcd7d559703601a06c8876a640de417e5b6c.

* space

* Fix specs

* this one too

---------

Co-authored-by: Justin Newberry <justin@comma.ai>
2024-02-25 17:38:17 -08:00
Justin Newberry
e6009d80e9 cars: introduce "Platform" union type for all car enums (#31558)
* Hmm

* release

* hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

* unrelated

* forgot

* cleaner

* Platform

* new syntax

* Fix

* clean

* Fix
2024-02-24 22:18:13 -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
Justin Newberry
1161d33c18 Subaru: move carspecs to PlatformConfig (#31550)
* subaru platform config

* forester wrong dbc

* spacing

* subaru car specs

* someday!

* more red diff

* all brands can be done like this

* but this should be done first and thats subaru specific

* that seems very low but we shouldn't change it here

* as long as it subclasses str its fine

* fix
2024-02-23 13:23:40 -08:00
Adeeb Shihadeh
6f905ed979 radard: remove sleep for cars without radar (#31467)
* radard: remove sleep for cars without radar

* fix

* update refs
2024-02-14 13:12:54 -08:00
Vivek Aithal
619625625c CHEVROLET BOLT EUV 2022: Add a simple neural feed forward (#31266)
* add simple neural feed forward

* update refs

* do not sample during inference in op

* update refs
2024-02-01 12:30:43 -08:00
Vivek Aithal
056b330e8b LatControlTorque: Add more inputs (#31252)
* add history and state to the ff inputs

* add history

* resolve comments

* remove history, simplify

* don't compute lateral accel, roll comp always
2024-02-01 04:12:48 -08:00
Harald Schäfer
e6c97c3846 Delete lat planner (#31089)
* Initial commit

* Fixup

* typo

* ignore lateral plan

* Update cereal

* Remove lateralPlan

* Fix release build

* Fix release build

* give car params

* Add carParams to include_all_types

* Write car param in powerdraw test

* add demo mode

* Update model regf

* proc replay ref commit

* Try

* Move enum definition

* Update cereal

* typo

* Write car param for modeld test

* Update ref

* Update model ref again

---------

Co-authored-by: Kacper Rączy <gfw.kra@gmail.com>
2024-01-21 12:09:48 -08:00
Shane Smiskol
1a165c6580 interfaces: fix get_interface_attr typing (#30813)
* fix

* Update selfdrive/car/interfaces.py
2023-12-19 23:35:31 -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
Adeeb Shihadeh
1421551297 Cython KF1D to Python (#30773)
* Cython KF1D to Python

* cleanup

* set x

* less nesting

* fix release

* Revert "fix release"

This reverts commit 97e5d0f80405660efb861c7b9df7fbfd5dda5dd9.
2023-12-16 23:45:28 -08:00
Adeeb Shihadeh
bc54ed794b remove PyYAML package (#30770)
* remove PyYAML package

* remove those

* add comments back

* fix lock

* fix those
2023-12-16 20:48:57 -08:00
Harald Schäfer
f1b8a86464 K1FD: generate kalman gain at init (#29610)
* K1FD: generate kalman gain at init

* Update interfaces.py

* Update interfaces.py

* Update interfaces.py

* Update ref_commit
2023-08-25 13:44:03 -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
1a08c2986e Revert "radard: tie radard frequency to modelV2 vol. 2 (#29240)" (#29474)
* Revert "static analysis fixes"

This reverts commit a1e85f3661.

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

This reverts commit 460f5c8e0b.

* update refs
2023-08-18 22:56:43 -07:00
Jason Young
f76ffbdbbc 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>
2023-08-17 21:06:07 -07:00
Jason Young
90c4bbe8e4 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>
2023-08-15 14:17:08 -07:00
Kacper Rączy
460f5c8e0b 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
2023-08-11 18:07:06 -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
Kacper Rączy
1774b4fc61 Revert "radard: tie radard frequency to modelV2 (#29063)" (#29243)
This reverts commit 255f5c13f2.
2023-08-04 20:25:40 -07:00
Kacper Rączy
255f5c13f2 radard: tie radard frequency to modelV2 (#29063) 2023-08-03 22:10:21 -07:00
Vivek Aithal
3612c12b14 [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
2023-07-21 11:28:48 -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
Adeeb Shihadeh
e7c0db457a don't show temp steering faults while overriding (#27797)
Co-authored-by: Comma Device <device@comma.ai>
2023-04-04 11:28:13 -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
Adeeb Shihadeh
2008332bd4 GM: revert custom Bolt torque tune (#27403)
* Revert "GM: cleanup torque feedforward function (#27347)"

This reverts commit 8c099dd4e5.

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

This reverts commit e49748d571.

* update refs
2023-02-21 15:27:48 -08:00
Vivek Aithal
e49748d571 Chevrolet Bolt: Non-linear torque tune (#27344)
* add non linear tune

* update refs

* rerun tests
2023-02-14 16:20:28 -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
Cameron Clough
b1e744987f Ford: add Lincoln Aviator 2021 to Ford Explorer platform (#27095)
* add Lincoln Aviator 2021 to Ford Explorer platform

Based on the Ford Explorer, the Aviator has very similar firmware
versions. Add these to the Explorer platform and create a new CarInfo
for the Aviator.

f0709d2bc6ca451f|2022-12-10--12-36-59--0

VIN: 5LM5J7XC8MGL09541

* Ford: new gear shifter signal to support Aviator

* probably don't need these

* don't need to pass None here, it defaults to None

* will rename in DBC

* bump opendbc

* bump process replay ref
2023-02-02 22:00:49 -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
9be7e527a9 HKG CAN-FD: steering pressed filter (#26789)
* steering pressed filter

* use a counter

* parameterize

* double

* filter doesn't instantly reset on falling edge of true steering pressed

* Update selfdrive/car/interfaces.py

* Update selfdrive/car/interfaces.py

* Update selfdrive/car/hyundai/carstate.py

* add comment

* the pain of committing without pycharm

* more like a filter

* Update ref_commit
2022-12-13 14:33:20 -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