Commit Graph

187 Commits

Author SHA1 Message Date
Shane Smiskol
8f174d82d6 Toyota: RAV4 Hybrid cannot do stop and go as stock (#31931)
* rav4 also like this

* docs
2024-03-19 21:10:20 -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
Adeeb Shihadeh
3a7582d9a6 Abstract out common CarInterface.apply (#31924) 2024-03-19 13:46:31 -07:00
Adeeb Shihadeh
fa12a67228 remove pedal (#31903)
* remove pedal

* bump panda

* fix

* update refs
2024-03-17 22:42:49 -07:00
Alexandre Nobuharu Sato
c4ef17ac28 Toyota TSS-P: parse distance button from SDSU (#31741)
* Toyota TSS-P: parse distance button from SDSU

* it's 1000hz wtf... da99509bd910288a/2024-03-04--13-51-30

* add events for SDSU

* need to check for CAN filter

* clena up

* check

* whoops

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2024-03-07 02:03:39 -08:00
James
a2de0115b3 Toyota TSS2: parse distance button (#31722)
* Enable the distance button to switch personalities for Toyota/Lexus

* Default to the "standard" personality for now

* only parsing first

* only parse

* no personality in card

* safe

* comment

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2024-03-06 01:06:06 -08:00
Shane Smiskol
1b9df8aca6 Toyota: move stop and go cars to one tuple (#31726)
* One tuple!

* rm
2024-03-05 23:23:47 -08:00
Shane Smiskol
fcd33786ca Toyota: remove Mirai from interface (#31725)
* mirai

* just mirai
2024-03-05 23:11:10 -08:00
Shane Smiskol
2df61a30eb Toyota: flag for cars without PCM accel limit under 19 mph (#31724)
use flags
2024-03-05 23:04:41 -08:00
Shane Smiskol
342a20ef8e Toyota Highlander: also check unplugged DSU to enable sng (#31723)
* also check unplugged DSU

* fix
2024-03-05 22:50:14 -08:00
Shane Smiskol
eaefdb386f Toyota: Highlander can not do sng as standard (#31721)
* .

* update docs

* fix docs

* Update selfdrive/car/toyota/interface.py
2024-03-05 21:34:06 -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
b1f452d42b Toyota TSS2: radar disable support (#29094)
* try to disable radar

* fix bug and bump panda

* prep

* always attempt longitudinal for testers

* fix rav4

* send ACC_HUD

* bump panda

* revert

* check for failure to disable

* fix arg

* allow

* this has no effect

* bump

* update docs

* bug fix

* fix

* check relay malfunc for acc control

* remove route where SDSU caused a relay malfunction

* missing rav4

* bump

* use chr route

* bump

* add back

* relay malfunction

* bump to master

* add to releases
2024-02-14 23:27:07 -08:00
Shane Smiskol
0e94567a18 Toyota: only read gas interceptor if we're using it (#31473)
* we shouldn't be reading from interceptor and not writing/sending gas command

* better

* add a test!

* comment is clear
2024-02-14 21:32:44 -08:00
Nelson Chen
b234f5abef Update Lexus LC Convertible Steer Ratio to 13 (#31354)
https://media.lexus.co.uk/wp-content/uploads/sites/3/2021/06/1612190405210201MLCConvertibleTechSpec.pdf

Minor follow-up to port
2024-02-07 12:34:45 -08:00
Nelson Chen
879e2521ac Lexus LC 2024 (#31199)
* Initial pass

* Add physical measurements for LEXUS_LC_2024

* Add new test route for TOYOTA.LEXUS_LC_TSS2

* Add new public-OK test route for TOYOTA.LEXUS_LC_TSS2

* update docs

* | not /

---------

Co-authored-by: Justin Newberry <justin@comma.ai>
2024-02-07 11:45:12 -08:00
Shane Smiskol
29536324c1 Toyota: combine more hybrid platforms (#31057)
* Combine

* migrate test models segs

* fix highlander engine

* no change
2024-01-18 18:51:24 -08:00
Shane Smiskol
582743fdb5 Use a safety param for gas interceptor (#30719)
* bump

* bump

* space

* remove from boardd

* set flag for honda to pass tests

* migrate

* Update ref_commit

* final bump

* bump cereal

* bump to master
2023-12-14 16:53:22 -08:00
Shane Smiskol
bf4026ed7e Toyota: enable LTA (#30109)
* bump panda

* enable lta

* try upper/lower delay similar to longcontrol lag comp

* add comment about eps torque rate limits

* more clear

* more clear

* Revert "try upper/lower delay similar to longcontrol lag comp"

This reverts commit 8e85333ee6e2456fcda076af4c31a9e9babbc897.

* bump

* no driver torque limiting to test

* fix the setme_x3

* bump

* bump

* enable inactive safety

* use vEgoRaw

* rename

* fix

* some comments/organization

* bump

* docs

* no corolla

* shorter name

* bump

* bump

* add to releases

* bump panda

* remove camry

* bump

* bump

* rm

* bump

* bump

* bump again

* bump
2023-12-08 15:31:10 -08:00
Shane Smiskol
54517c0638 Toyota: LTA cleanup (#30579)
* have been running this for a few weeks: good

* set setme_x3 closer to stock

* add comment to values about additional EPS torque rate safety

* rename some variables

* should use vEgoRaw here to match panda!

* switch

* more notes

* specify

* smaller

* for

* oof
2023-12-01 22:27:29 -08:00
Calvin Chui
2647a4b4a9 Toyota: Add Lexus GS F 2016 (#30245)
* added GSF ECU values

* Added Lexus GSF data

* added route for GSF

* test RC code

* revert fingerprints back from RC test to GSF

* fixed type for route

* specify route segment for GSF

* added GSF to torque substitute

* removed year designation for GSF

* added MY back to all "Lexus GSF"

* removed route, don't think it does anything

* move GSF ecu values to better place

* remove whitespace from toyota > interface.py

* added in public route for LEXUS_GSF

* added GSF to docs

* update test route

* update test route

* update 266 Supported cars

* trying different dbc

* updated to working route

* clean up

* add to releases

* updated test route

* new route

* docs

* slightly better torque params

---------

Co-authored-by: cchui <cchui@eogresources.com>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-11-14 02:31:27 -08:00
Shane Smiskol
c626078e9d Toyota: combine rest of hybrid platforms (#30259)
* Highlander TSS2: merge

* Highlander TSS2: remove duplicate FW

* Highlander TSS2: merge torque params

* C-HR TSS2: merge

* Alphard TSS2: merge

* Avalon 2019: merge

* Avalon TSS2: merge

* Camry TSS2: merge

* Camry TSS-P: merge

* Camry TSS-P: remove duplicate FW

* RAV4 TSS 2022: merge

* RAV4 TSS 2023: merge

fix

* clean up tss2 car list

* fix from merge

* rename internal seg list platforms

* fix test
2023-10-23 11:41:42 -07:00
Shane Smiskol
3cd0e392eb Toyota: combine similar TSS2 hybrid platforms (#30194)
* combine corolla

* corolla tss2: remove duplicates

* remove gas pedal hybrid signal

* combine RX TSS2

* we only split for static DSU msgs, or sng differences

* Combine NX TSS2

* remove nb

* Combine ES TSS2

* Combine RAV4 TSS2 (torque params for each EPS variant are similar enough, and eps and fwdcamera all are identical)

* Merge TSS-P Lexus NX

* TSS-P Lexus NX: remove duplicates

* TSS-P C-HR: merge

* TSS-P C-HR: remove duplicates

* fix routes

* re-did everything: no diff 🎉

* update test models seg list

* Update ref_commit
2023-10-07 01:26:49 -07:00
Shane Smiskol
b50a769ae9 Revert "Toyota: use torque control for Japanese-made 2023 RAV4" (#29978)
Revert "Toyota: use torque control for Japanese-made 2023 RAV4 (#29896)"

This reverts commit 9dfd0579d4.
2023-09-19 14:29:54 -07:00
Shane Smiskol
9dfd0579d4 Toyota: use torque control for Japanese-made 2023 RAV4 (#29896)
* use torque for 2023 RAV4s that allow it

* FW

* better cmt

* better

* better values comment

* switch

* add torque params

* simpler

* better to use steerControlType

* ???

* fix condition

* adjust params

* pid is only for old cars

* add comment

* move comment up

* one if

fix

* invert

* better comment

* better here

* for

* add torque hybrid test route

* fix condition

* this might be simpler

* back to one if

fix

* better name

* other way

* this reads so much better

* last change

* better

* did i break ci?
2023-09-14 14:48:12 -07:00
Eric Day
89d6bc6c7b Toyota: detect TSS-P CAN filter device as smartDsu to enable long (#28387)
* detect tss-p canfilter device as smartDsu to enable long

* Add canfilter test case

* add comment, behind alpha long

* add doc

* safe

* update check

* cmt

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-09-06 01:36:16 -07:00
Justin Newberry
4e69937d0d Precommit: ensure executable bit is set (#29784)
* precommit ensure executable

* exclude tinygrad

* bump submodules

* exclude tinygrad globally
2023-09-05 16:33:26 -07:00
Irene
cb342461f0 Toyota: add TODO comment for TSS-P BSM (#28396)
* Toyota: enable BSM on C-Hr

* Update selfdrive/car/toyota/carstate.py

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>

* remove duplicate block

* Remove useless addition

* make this a comment for now

* remove extra bit

* clean up

* clean up

---------

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-08-23 20:52:01 -07:00
Shane Smiskol
0aa6e2ce41 Toyota: prepare to disable radar (#29542)
* try to disable radar

* fix bug and bump panda

* prep

* always attempt longitudinal for testers

* fix rav4

* send ACC_HUD

* bump panda

* revert

* check for failure to disable

* fix arg

* bump to master

* revert to master

* comments only

* correct check

* carcontroller

* something like this

* or this

* use flag

* send PCS HUD

* clean up

* carstate checks

* fix from test models

* consistent
2023-08-22 21:17:30 -07:00
Shane Smiskol
cb36816315 Revert "Toyota: prepare to disable radar (#29541)"
This reverts commit 61653bf343.
2023-08-22 19:50:24 -07:00
Shane Smiskol
61653bf343 Toyota: prepare to disable radar (#29541)
* try to disable radar

* fix bug and bump panda

* prep

* always attempt longitudinal for testers

* fix rav4

* send ACC_HUD

* bump panda

* revert

* check for failure to disable

* fix arg

* bump to master

* revert to master

* comments only
2023-08-22 17:16:38 -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
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
Shane Smiskol
6ffdc32bfc Toyota: set stop and go if TSS2 car (#29303)
we should assume all TSS2 have stop and go (because we set them all manually)
2023-08-09 17:46: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
LC
5ace930c5c Toyota: Lexus IS 2023 port (#29257)
* added LEXUS_IS_TSS2 to values.py

* added LEXUS_IS_TSS2 to interface.py

* Apply suggestions from code review

* add torque params

* add test route

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-08-08 16:34:37 -07:00
eFini
1b98fea696 Toyota: experimental longitudinal when using smartDSU on radar-ACC TSS2 car (#28440)
* disallowed openpilotLongitudinalControl when experimental_long is off on radarUnavailable vehicle

* try this

* this is a better check?

* use it here

* use it here

* more explicit (pending more cleanup)

* some documentation

* clean up

* same

* this also works, but it adds a bunch of indirection

* Revert "this also works, but it adds a bunch of indirection"

This reverts commit 822095b96569faf10a6841cf3892b5db29f0c01b.

* Update selfdrive/car/toyota/interface.py

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-06-28 21:16:01 -07:00
Shane Smiskol
8bf5364b56 Toyota LTA: set actuator delay (#28722)
* higher actuator delay and raise steer limit timer

* add comment
2023-06-27 18:27:29 -07:00
Shane Smiskol
1e9f794abe Toyota LTA: show alert when steering angle sensor is initializing (#28717)
* add lockout for this case

* initialized

* angle sensor

* who
2023-06-27 16:56:40 -07:00
Shane Smiskol
84965525b8 Toyota: set radarUnavailable (#28707)
toyota: set radarUnavailable
2023-06-26 14:27:43 -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
57f3b483e3 Lexus: support ES 2018 (#27683)
* add ES 2018

* standard

* add FW versions

* need to add a route

* verified

* add to DSU messages

* add to torque params

* older lexus do not have all-speed dynamic radar cruise control

* update docs

* Update selfdrive/car/toyota/values.py

* add CI route

* update docs

* add to releases

* assume no stop and go (can't know without dsu unplugged)

* Update selfdrive/car/toyota/values.py

* update docs

* update docs
2023-04-13 12:17:03 -07:00
eFini
133721aafc Toyota: support openpilot long with a smartDSU on nodsu models (#27417)
* init

* fix syntax

* add test route

* syntax

* cleanup

* bool

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-04-01 15:34:55 -07:00
Shane Smiskol
b61a0b785a Toyota: use DBC for alt brake safety param (#27686)
* use DBC

* use DBC
2023-03-24 20:07:11 -07:00
Shane Smiskol
57c4d78869 Toyota: add 2023 RAV4/RAV4 Hybrid as dashcam (#27609)
* test out lta message

* correctly send

* percentage is percentage driver isn't overriding

* closer to stock system

* should be able to send LTA at 100hz, counter is the same as LKA

* small amount of torque towards desired

* Offset commanded torque correctly

* Too little torque

* use car's SETME's

* Revert "use car's SETME's"

This reverts commit c88856969995f97cc5ec4e2b24a5cc4e3ef4721a.

* try cutting steer every second

* Didn't seem to matter

This reverts commit 6923498b2a9eed8beb3998f441899f1df4948f6f.

* steer to 0

* let packer set counter

* add for camry

* log steer faults

* comments

* bump opendbc

* add opParams

* add lta safety

* set safety param

* fix torque control bug

* bump panda

* fix missing signal

* [experiment] apply some rate limiting and anti-windup

* no faults, clip to 90 deg, decent torque blending

* clean up blending

* toyota angle rate limits

* use std angle limits

* assert we only add angle control to TSS2 cars

* clean up carcontroller a bit

* space space

* bump opendbc

* clean up toyotacan from opendbc change

* bump panda

* will tests run?

* steer at zero

* refactor angle to use LatControlPID with zero gains

* stop some faults and tuning

* possibly fix integral wind up at max torque

* Add 2023 rav4

* limit torque inside EPS when overriding (no huge windup in edge cases when overriding)

* fix wind up issue after turns (or prolonged saturation)

* this doesn't work that well

* try these limits

* try this

* log the angle!

* global variable

* Apply suggestions from code review

* clip angle to 3 m/s/s

* some tolerance for roll

* raise limits a bit

* bumppanda

* fix faults

* still not good

* offsetting causing hugging?

* Revert "offsetting causing hugging?"

This reverts commit a42ec0b772ed74a1fd54b7fef2e7c275a3e8333b.

* reduce kp

* class var not needed

* limit up angle delta

* fix saturation check

* feedforward includes offset

* some threshold for roll

* bump panda

* surely we don't need this

* test stuff

* Toyota: Add FW for 2023 RAV4 Hybrid (#27494)

* Toyota: Add FW for 2023 RAV4 Hybrid

* Set RAVH_TSS2_2022 to use angle SteerControlType

* bump panda

* remove extras

* Revert "remove extras"

This reverts commit 87378e734915c107f57f99a5feef4dcb2b2a9a37.

* no max angle limit for now

* add as separate platforms

* remove debug scripts

* revert to master

* remove these FW versions from 2022

* dashcam these cars :(

* fix test

* interface

* add to untested routes

* never send torque with LTA cars

* fix values

* clean up controlsd

* reset lat control files

* use the car param

* add to params

* bump panda to master

* Update selfdrive/car/toyota/carcontroller.py

* don't set torque params if angle control (fixes controlsd bug)

* reset controlsd

* keyword

* in another pr

* simplify test

* rm line

* Update selfdrive/car/toyota/tests/test_toyota.py

---------

Co-authored-by: crispbee <84819466+crispbee@users.noreply.github.com>
2023-03-17 00:03:21 -07:00
Manu
5ee4740821 Toyota: C-HR Hybrid 2022 support (#27269)
* Added C-HR 2022

* add harness link

* Revert "add harness link"

This reverts commit 54eaf4a5d83b2e844175cdcf4637329490e1a5b0.

* Revert "Added C-HR 2022"

This reverts commit b75a54886fbd0236a309b5c89bf74fd748a5b9e2.

* Added Toyota C-HR Hybrid 2022

Added Toyota C-HR Hybrid 2022

* another year

* it's a hybrid

* fix platform name

* new route

* add to releases

* right right, it's a hybrid

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-02-09 16:54:25 -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
eFini
134766fe26 Toyota: Car Port for Toyota C-HR 2021 (TSS2) (#27212)
* Toyota C-HR 2021 TSS2 Port

* remove

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-02-08 18:05:23 -08:00
Shane Smiskol
ba7a474765 Toyota: lower stopping speed (#26274)
* lower toyota stopping speed

* order

* Update selfdrive/car/toyota/interface.py

* Update ref_commit
2022-12-10 02:25:16 -08:00