Commit Graph

150 Commits

Author SHA1 Message Date
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
Shane Smiskol
860f441e2f Car interface: set common params after port (#26613)
* remove pylint exception, _get_params takes no defaults

* clean up

* mock uses it too

* unused

* unused

* fix that

* bump

* Update selfdrive/car/interfaces.py
2022-11-29 11:49:13 -08:00
Vivek Aithal
0706b03e8c [controlsd] Toyota Prius 2017 (#26455)
* increase lag on prius

* better offline values computation

* split prius ecu more, set deadzone to 0

* add deadzone back

* replace deadzone with slack

* reduce deadzone to 0.2

* update refs
2022-11-29 10:47:13 -08:00
Shane Smiskol
3253b85900 Toyota: alert when in standstill (#26585)
* add resume required alert

* possibly need this (pressing resume with brake held does nothing)

* better text (has both meanings)

* try this

* Revert "try this"

This reverts commit 5b2991929b62f5bcd9bfa0767d709b5fe83b094b.

* no alert with interceptor

* check long
2022-11-25 16:00:58 -08:00
Vivek Aithal
c64e2c228a [controlsd] Toyota Rav4 TSS2 bugfix (#26421)
bugfix toyota rav4 pid init values
2022-11-09 12:09:55 -08:00
Vivek Aithal
a0edd05bb0 [controlsd] Revert Rav4 TSS2 to PID control (#26403)
* revert rav4 tss2 to pid control

* Update interface.py
2022-11-07 18:25:39 -08:00
Shane Smiskol
3e69973819 car docs: auto-generate footnote for DSU cars (#26321)
* note for dsu cars

* don't hardcode dsu footnote (1/2)

* test

* revert the experimental long toggle

* another day:(

* DSU doesn't have to be toyota specific, it's a generic carParam!

* this is safe, just make sure it's unknown

* these cars do not have OP long for some reason

* UNSUPPORTED_DSU_CAR

* forgot this

* fix autoResume

* fix autoResume 2
2022-11-03 01:00:33 -07:00
Shane Smiskol
b0656f2c75 Toyota: add unsupported DSU car list (#26336)
* note for dsu cars

* don't hardcode dsu footnote (1/2)

* test

* revert the experimental long toggle

* another day:(

* DSU doesn't have to be toyota specific, it's a generic carParam!

* this is safe, just make sure it's unknown

* these cars do not have OP long for some reason

* UNSUPPORTED_DSU_CAR

* forgot this

* .

* .

* revert

* revert

* smaller diff
2022-11-02 20:12:35 -07:00
Shane Smiskol
423d16693a Toyota: unify deadzone params (#26325)
* i'm sure this makes no difference

* update refs
2022-11-02 02:09:54 -07:00
Vivek Aithal
f6bab0cd67 [torqued] Extend to all Toyota and Hyundai cars (#26238)
* extend to toyota and hyundai

* remove all pid control in hyundai

* remove indi tunes

* remove toyota lat tunes

* release notes

* rm tunes.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-10-25 16:09:36 -07:00
cydia2020
2704e2cf4d Toyota: longitudinal tune condition cleanup (#25676)
* Toyota: clean up long tunes a bit

* Update selfdrive/car/toyota/interface.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-09-10 16:42:28 -07:00
Adeeb Shihadeh
655a64b603 single longitudinal toggle for e2e and disable radar (#25688)
* single longitudinal toggle for e2e and disable radar

* write disable radar param

* rename

* better param name

* clean that up

* update refs

* update translations

* not live for experimental

* write it out

* vanish
2022-09-07 17:12:49 -07:00
Shane Smiskol
452d5e42ec Car docs: add auto-resume column (#25572)
* Move auto resume in sng to car interface

* Update docs

* shorter name, star

* order

* resumes?

* add hidden detail sentence

* good to know this works, but revert

* VW auto resume

* bump cereal to master

* Update ref_commit

* match cereal

* try this

* ?

?

* like this
2022-08-30 17:54:40 -07:00
Adeeb Shihadeh
d462a08056 remove CS.steeringRateLimited (#25251)
* remove CS.steeringRateLimited

* bump cereal

* update refs
2022-07-24 14:56:55 -07:00
Shane Smiskol
5ea641b79a Highlander: merge params (#25210)
* merge highlander params

* weight is average of tss normal/hybrid and tss2 normal/hybrid
2022-07-18 23:54:45 -07:00
Shane Smiskol
d2c2154a32 Clean up CarControllers (#25008)
* do VW

* Do the rest

* unused

* ford cc formatting

* final clean ups

* also just return update output
2022-06-30 17:23:12 -07:00
Adeeb Shihadeh
062a8bcdbd cleanup torque tuning config (#24951) 2022-06-24 13:01:49 -07:00
HaraldSchafer
d8bfe2f005 Cleanup car interfaces (#24948)
* remove interface overrides

* Fix test

* set torque tune for ev6
2022-06-22 19:20:07 -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
Shane Smiskol
a78197ab1a Move RAV4 2022 out of bronze 2022-06-13 21:49:50 -07:00
HaraldSchafer
dbfe923ecc Move couple toyotas to torque table values (#24849)
* Move couple toyotas to torque table values

* Dont set for all cars yet

* Dont regress docs

* update ref
2022-06-13 19:08:09 -07:00
Shane Smiskol
566de12671 Toyota Camry TSS2: update torque control params (#24819)
Use updated accel and friction values for TSS2 Camry
2022-06-13 09:29:28 -07:00
HaraldSchafer
843e59f6f0 Misc torque control fixes (#24801)
* Fiction compensation should be based on error

* Update refs

* Add deadzone

* update ref
2022-06-10 22:52:48 -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
AlexandreSato
074f614f88 Lexus: NX Hybrid 2020 support (#24796)
* LEXUS: Missing esp and engine FW versions in values.py

DongleId: 09ae96064ed85a14  | testRoute: 09ae96064ed85a14|2022-01-10--01-57-37 |

* Make a new platform for NX Hybrid TSS2

* Update releases

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2022-06-09 12:01:31 -07:00
Shane Smiskol
c6bc03311c Car documentation: set steering torque star using car interface (#24709)
* Set good torque using torque controller tuning

* should be equal to

* save lateral accel to car params

* use maxLateralAccel

* always

* same convention

* nan will always evaluate to false

* The great good torque purge

* adjust default friction

* Add data for more cars

* adjust name

* Welcome back, guys. Only adjust good torque if maxLatAccel is set

* Update refs (1.7 is 1.7000001...)
2022-06-03 17:41:20 -07:00
ntegan1
7115f1f7c8 TSS-P Corolla: use torque lateral control (#24291)
use torque controller for tssp corolla

Co-authored-by: ntegan <nick.egan.gg>
2022-05-27 15:11:16 -07:00
HaraldSchafer
d708a134bd Tssp prius torque control (#24669)
* use llk

* use steering sensor at low speed stil

* Try more simple

* rm prius tune

* updated ref
2022-05-27 10:21:02 -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
Shane Smiskol
bdaf174154 Support RAV4 2022 with stock longitudinal (#24367)
* support for ICE 2022 RAV4

* add to releases

* swap

* add fingerprints from a5c341bb250ca2f0

* update test route

* update docs

* add test for rav4

* values.py is a comma file
2022-05-18 19:04:11 -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
cydia2020
3f5afa158a Toyota: correct weight for the Prius V (#24499)
* correct weight for the Prius V 

https://www.toyotacertified.com/content/dam/tcuv/sections/brochures/en/prius-v/2017_priusv_ebrochure.pdf

* Remove comment

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

* Extra whitespace

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-05-11 21:02:47 -07:00
Shane Smiskol
191fbd4f67 Camry TSS2: use torque controller (#24268)
* use measurements from harald

* update from table

* average of hybrid and non-hybrid
2022-05-07 21:34:17 -07:00
HaraldSchafer
8cdeaf9aee Latcontrol torque: update tuning (#24357)
* Little more chill

* Update ref

* Update refs
2022-05-02 14:42:18 -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
Adeeb Shihadeh
3e098c9ba5 Toyota: add safety param flag for alt brake message (#24341)
* Toyota: add safety param flag for alt brake message

* update refs

* update refs

* bump panda
2022-04-27 12:08:11 -07:00
HaraldSchafer
506650bab6 Latcontrol torque: max_torque rename (#24265) 2022-04-20 11:26:24 -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