Commit Graph

71 Commits

Author SHA1 Message Date
Shane Smiskol 83e26d674f LongControl: fix control state oscillation (#23333)
* check if plan is to accelerate or not

* remove comment

* needed to see it

needed to see it

* test logic with Toyota TSS2

* hackily log conditions

* Revert "hackily log conditions"

This reverts commit 7a6b5691e2b982c7a1e3911d980fb7530647affd.

Revert "test logic with Toyota TSS2"

This reverts commit e583d6e3caaa5f5b896165cd7949dfc1caabfd9a.

order

* revert

* fix
old-commit-hash: 7254db3906eedf06da9e6e6947233848599a7862
2022-03-03 03:27:24 -08:00
Adeeb Shihadeh 63bbcd7279 better steer fault names (#23890)
* better steer fault names

* bump cereal
old-commit-hash: 87849f93b165507ad980dbefdcf9c376d5165a18
2022-03-01 22:53:55 -08:00
Shane Smiskol 1f5570a96d Longitudinal control: interpolate longitudinal plan (#23787)
* interpolate longitudinal actuator delay

rename

* formatting

* interpolate v_target most importantly!

* fix interpolation and rename

* nicer setup

* left in from testing

* update refs
old-commit-hash: 2c7845fce0be2bfa72a5d2429daa35fb735c154c
2022-02-18 00:45:00 -08:00
ClockeNessMnstr c12656f397 Longitudinal: add Kf to carParams (#23752)
* sane_kf

* long_kf + cereal

* update ref

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 9535dc606dddfe6f0807e0b7b2e21867304e507a
2022-02-16 15:38:22 +01:00
Shane Smiskol a2f9ac2b5e unsafe mode: update safety declaration comment (#23753)
* update safety declaration comment

* whoops
old-commit-hash: 7410160d09b09c529efece237f20cd0d5c062686
2022-02-11 19:20:27 -08:00
Willem Melching 9f202e63f5 clip steer saturation counter to steerLimitTimer (#23638)
* clip steer saturation counter to steerLimitTimer

* update ref
old-commit-hash: ee71fd2fccdca9c311d7912f1fbaae6d50aac27a
2022-01-27 12:31:36 +01:00
Shane Smiskol 183715ccea controlsd: verify unsafe mode consistency (#23563)
* add unsafe mode check to controlsd

bump submodules

forgot to add to health_t struct

bump

ahh forgot to set it!

bump

bump

clean up

clean up

bump

* fix ordering

* move to end

* unsigned

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 31d147dca2ada336d14c08ae35f5af510c309730
2022-01-25 12:09:13 +01:00
Jason Young b32725c94f Chrysler: remove standstill exception for gas disengage (#23515)
* Chrysler: remove standstill exception for gas disengage

* remove test exception

* bump panda

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 57156c44826e223ffbdfdc200fbb05fa5bc29b24
2022-01-13 16:06:56 -08:00
Shane Smiskol d05c173fe6 Longcontrol: remove starting state (#23328)
* remove starting state

* new ref

* ready for merge

* try this

* cereal now on master

Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
old-commit-hash: cf9792dc536db343447cfa64edecc72565c4eefd
2022-01-04 15:40:39 -08:00
Shane Smiskol 4058a8f64f Add comment about vEgoStarting to interfaces (#23327)
old-commit-hash: 0148b233cd44a72ca1aabbb962a36a6b8e671f19
2022-01-04 12:05:58 +01:00
Willem Melching 686a38aea4 Abstract classes inherit from ABC (#23246)
old-commit-hash: 14bf834fefc136bec817a69e066c325055841474
2021-12-16 15:31:53 +01:00
Willem Melching 7b3e330def Log actuators after applying rate limits in CarController (#23230)
* return actuators from carcontroller

* log it

* pass to latcontrol

* chrysler

* gm

* honda

* more brands

* rest of the brands

* gm cleanup

* hyundai cleanup

* update ref

* rename field

* fix subaru

* add types

* more subaru fixes #23240

* consistent whitespace

* bump cereal
old-commit-hash: 4f1eb4278a83a3abebebef67a081961e27594d90
2021-12-16 13:08:20 +01:00
Shane Smiskol 91ff6918e5 Remove minSpeedCan (#22991)
* Remove minCanSpeed

Remove minCanSpeed

* it actually only goes out to 2.5 seconds, this is okay to remove

* test to see if this preserves behavior

add minSpeedCan

* Revert "test to see if this preserves behavior"

This reverts commit 31b11f017f7e9da7654fc8064b5983d4a6cc22e5.

* preserve behavior (don't enter stopping as early)

* vEgoStopping needs to be less than or equal to vEgoStarting to avoid state oscillation
old-commit-hash: 2799ef52928126d4b704a6ad83e25a35d0b56da3
2021-12-14 12:09:32 -08:00
Harald Schafer cf3c8cd301 fix max speed comments
old-commit-hash: 44adea73ce2281cd0d0117c7ef6d1609031be2b9
2021-12-08 17:13:43 -08:00
Willem Melching b8ab21bd64 add CarParams.wheelSpeedFactor (#23079)
* add CarParams.wheelSpeedFactor

* Fudge speed for Lexus RX

* should have been the TSS2 model

* bump cereal

* refactor into function

* update refs
old-commit-hash: e6180738fdc4c55ba913905e6591de5435966eb1
2021-12-03 14:57:53 +01:00
sshane 8472503305 Toyota: handle brake hold (#22810)
* disallow engagement if brake hold active

* we can check once

* move to common events

revert

* fix

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: a0e5eccb70ac9209307d0994252f5bf089ae48ae
2021-11-08 14:26:30 -08:00
Adeeb Shihadeh f5a382ce03 better alerts for temporary EPS faults (#22747)
* better alerts for temporary EPS faults

* reorder
old-commit-hash: b76ccaac375712ee3ff215721db26009986d2f6d
2021-10-29 23:20:59 -07:00
Jason Young a399abf438 GM: EPS fault workaround (#22404)
* seems legit

* panda -> loopback

* fix comment

* add some "why" comments for the next guy

* re-test with stock 50Hz rate

* ugly test

* Update selfdrive/car/gm/carstate.py

Co-authored-by: qadmus <42746943+qadmus@users.noreply.github.com>

* update refs

* Update selfdrive/car/gm/carstate.py

Co-authored-by: qadmus <42746943+qadmus@users.noreply.github.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: b49f518782436f2d58ae6c6b11956b4625d28441
2021-10-28 16:54:12 -07:00
sshane 263b37364c Quiet steer temp unavailable alert at standstill (#22680)
* only sound critical alert when not at standstill

* need to flip

* just change the one line
old-commit-hash: 82ad6642e2229db8bf59e4f33aa0e2e0880abc1c
2021-10-25 14:28:05 -07:00
qadmus dcf3fc2089 [Lateral PID] Function for steer feedforward (#22638)
* store a function for steer feedforward

* use classmethod

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 778374d3dd8ebd3bdd51149228b3c70767bc64ec
2021-10-21 11:38:03 +02:00
qadmus 810e859169 Lateral PID: move steer feedforward to CarInterface (#22411)
* move steer feedforward to car interface, in car parameters

* LatControlPID.get_steer_feedforward()
old-commit-hash: 3461e25944ae4f4ba4f55960a9748c0f57236c76
2021-10-04 10:03:53 +02:00
Willem Melching d688b62c62 Add upper/lower bounds for longitudinal lag (#22235)
* Add upper/lower bounds for longitudinal lag

* add ref

* update ref

* bump cereal

* bump cereal
old-commit-hash: 417e229624583a3a618aaf7fe6bd48162dfc35b6
2021-09-14 18:57:16 -07:00
Willem Melching 523219c678 Parameterize longitudinal control using carParams (#22200)
* use CP.startAccel

* missing values

* order

* update ref

* cereal
old-commit-hash: b7d1aac1972d8317e77d1f48edb22156b2c67bd6
2021-09-11 18:01:54 -07:00
Willem Melching b079219b93 Use CP.vEgoStopping and clean up CP.startAccel (#22199)
* use CP.vEgoStopping and clean up

* update ref
old-commit-hash: 1e62b09e5dd70cae6721d2da9f7bcef59aa87c10
2021-09-11 17:13:30 -07:00
HaraldSchafer cb1cd01bdf cleanup old nidec accel override logic (#22181)
* cleanup old nidec accel override logic

* add ref without deprecated fields

* no more override
old-commit-hash: 74b6c872545ac64055a914789a89ccc173168d8b
2021-09-10 10:34:18 -07:00
Willem Melching 977cf8ca02 parameterize longitudinal actuator delay (#22153)
* paremetrize longitudinal actuator delay

* update ref
old-commit-hash: b39f6efa3fc91b3df851a133109ec18f598dce68
2021-09-06 17:56:52 -07:00
Willem Melching 6f5c9d5ad1 Clean up PID controller ACCEL_MIN/ACCEL_MAX (#22148)
* use ISO 15622:2018 limits in PID controller

* allow more for nidec

* limit PID inputs

* CP is not needed

* add GM

* not used

* update ref

* fix honda bosch
old-commit-hash: f941111dcdc9d651fe7169044fb7f52fd70f94ab
2021-09-06 17:29:32 -07:00
HaraldSchafer 1b98341932 Prevent PID windup on Honda NIDEC (#22112)
* add higher set speed

* freeze when close to cruise

* dont bias this

* higher set speed

* start high

* 2mph might be needed

* better condition

* limit accel windup like this

* wrong name
old-commit-hash: ebf2a2279d837feb3ce55a7bc44c7f0053e77f27
2021-09-02 14:16:44 -07:00
HaraldSchafer a73a820338 Change car controller interface from gas/brake to acceleration (#21911)
* retune civic

* seems smooth

* back to normal

* new ref

* fix conflict

* runs

* rm

* accel scale is 4

* toyota should be good

* more cleanup

* fixup

* better naming

* update ref

* deprecated

* sending brake when not enable causes a fault

* rm gas and brake

* unused

* update ref

* acura logic is no more

* wrong before

* revert tuning cleanup

* adress comments

* update ref

* already on master

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 1ac89f14aa7c45c56049e8dbb0d6c5bb83a0fc6b
2021-08-30 09:32:52 -07:00
Adeeb Shihadeh b7c1b9a6e8 rename enableCruise -> pcmCruise (#21546)
old-commit-hash: cb7e96f99d59cc56ac532d4b5e08e03c013cf946
2021-07-10 13:56:11 -07:00
Adeeb Shihadeh 4b79c86b5f fix unnecessary harsh steering unavailable alerts (#21541)
old-commit-hash: 092c728e766bc17a63279b42ea88a4f0f1c51a6d
2021-07-10 01:53:14 -07:00
Willem Melching c3cc9e8eeb Honda: emulate convenience blinker from stalk (#21387)
* Honda: emulate convenience blinker from stalk

* comment

* light->lamp

* reset on rising edge

* update ref
old-commit-hash: 6729e963c93f2d562021fc074e6fd26dd0b02a47
2021-06-29 12:10:35 +02:00
Willem Melching 5bc0d28708 Honda Bosch longitudinal prerequisites (#21217)
* untested changes

* set compute_gb

* community feature for good measure

* add code for rolling backwards

* init needs CarParams

* stay in elm mode until carParams is written

* fix tester present bus number

* fix can errors

* fix enableCruise flag

* print when radar disable is done

* move retry logic to controlsd

* move lookup table into carcontroller params

* cleanup brake error values

* make init return

* that should be 1

* floats

* back to no failure handling

* try simplify knockout

* bump panda

* Move flags to panda

* add warnings

* Revert "try simplify knockout"

This reverts commit 4f496245791ea6bd041d4412b96035c6b434b91c.

* add note about LoC.long_control_state

* update ref
old-commit-hash: a8fac002ae8e7c6ab37e9b1a5deb8cfcea2a71ac
2021-06-22 16:28:11 +02:00
Greg Hogan d0e5f3fb92 default carParams.stoppingControl to True (#21248)
* hyundai has full brake control

* set default stoppingControl to True

* update ref

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 8071111f59371c9aee16dee3d6fb87f42464894b
2021-06-15 14:00:57 +02:00
Adeeb Shihadeh 646ed50060 add note about max speed
old-commit-hash: dc3d8f2ea2cd96f3c281b626c8c82d8ceddb41d1
2021-05-11 15:20:30 -07:00
Adeeb Shihadeh cc29fdfed2 less harsh steering unavailable alert when overriding (#20718)
* less harsh steering unavailable alert when overriding

* just steer

* 1s

* orange

* update refs
old-commit-hash: 836668f1050e1dbc185af7d472e2016627711aeb
2021-04-20 21:01:28 -07:00
HaraldSchafer df9381abd4 Do not allow engagement outside of training distribution (#20112)
* higher is out of the training distribution

* Update RELEASES.md

* Update RELEASES.md

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

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: a0cdacbb2ad6a26012ca374723539e838488dcc5
2021-02-18 17:16:20 -08:00
Adeeb Shihadeh 966945880b Cereal cleanup (#20003)
* start cleanup

* fan speed

* cleanup dm

* fix cereal

* hwType -> pandaType

* update refs

* update refs

* bump cereal

* freeSpacePercent

* cereal master
old-commit-hash: 000bd226aa9902da01e6010bf26762fca2c20df0
2021-02-03 19:57:30 -08:00
Igor 8bc42f4aff Parametrize startingBrakeRate (#19511)
* Parametrize startingBrakeRate

* new ref_commit
old-commit-hash: 717bc747c32114df13e8334eeb591f9ca289a034
2020-12-16 20:58:07 +01:00
Igor faa4c57ee1 Parametrize stoppingBrakeRate (#2745)
* Parametrize stoppingBrakeRate

* ref_commit updated
old-commit-hash: d3c2a0e6c1e898b08570dd0a9b1eef12934f6c9a
2020-12-11 16:30:35 +01:00
Igor 95bb79c51c Parametrize MIN_CAN_SPEED in car interfaces (#2684)
* Parametrize MIN_CAN_SPEED in car interfaces

* fixed instance in planner.py

* fix typo

* var name change

* changed var name to minSpeedCan for consistency with other uses of CAN in the capnproto files

* added default value to get_std_params, removed unneeded instances from car interface files

* Revert PEP8 autoformat corrections

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 093456cc40f2bafac6a36491cac8e57db42ee9e5
2020-12-04 11:09:34 +01:00
Willem Melching 69440d8037 Typing experiments (#1633)
* add more types

* car

* no abc

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 40acdc4524eb5d3365c363ac7441daf407f4adbd
2020-11-24 22:45:37 -08:00
Adeeb Shihadeh f25cec394e grey panda is unsupported (#2458)
old-commit-hash: 47c21f10f598639307994392e96f4d9293b295c7
2020-11-03 19:56:25 -08:00
Adeeb Shihadeh 8531345bf9 HKG fixups (#2342)
* fix hyundai blinker state

* consistency with update_speed

* update refs

* make hyundai resume reliable

* update refs

* 20 works

* don't need that

Co-authored-by: Greg Hogan <gregjhogan@gmail.com>
old-commit-hash: 725e3b78ea1baaefa6795116c582a63c7a61686b
2020-10-14 18:27:27 -07:00
Adeeb Shihadeh 39d98d3d2d Car cleanup (#1924)
* cleanup car code

* more pruning

* little more

* less pylint disables

* radar stuff

* fix

* udpate refs

* fix honda bosch

* fix test
old-commit-hash: 892e1162c0bfa0970cbe262452a70745eccb8ba6
2020-07-25 15:07:27 -07:00
Adeeb Shihadeh dbdcaef1a1 Test Car Models 2.0 (#1903)
* start with radar interface

* car interface

* panda safety rx check

* check panda safety inits

* check NO_RADAR_SLEEP in all radar interfaces

* sonata 2019 and kia optima should use hyundai legacy safety

* check radar errors

* check radar can errors

* real fingerprint

* run in CI

* it shoud pass now

* ignore old openpilot msgs

* ensure safety mode is set

* sort can msgs

* filter out openpilot msgs
old-commit-hash: 99106fd9c465b366c7c61b8a0452b73455a9b96d
2020-07-25 02:27:56 -07:00
Greg Hogan f646a64cce Honda CRV BSM alert from B-CAN (#1867)
old-commit-hash: 825821f010db63c3498d3730069f3eac08ace789
2020-07-21 17:41:45 +02:00
Adeeb Shihadeh b16559c4a0 Block entry on non-adaptive cruise mode (#1708)
* block entry on non-adaptive cruise mode

* user disable

* toyota
old-commit-hash: 25688f36cc16f4a4ce57e2e6d7a5c33e78cd520f
2020-06-15 18:11:50 -07:00
Willem Melching a56e2b01f8 Make pylint more strict (#1626)
* make pylint more strict

* cleanup in progress

* done cleaning up

* no opendbc
old-commit-hash: 843a64c72fb94397a1edf814fa66044c8d92acbf
2020-06-02 16:29:32 -07:00
Adeeb Shihadeh 68a3061c9d enable E261 in flake8: two spaces before inline comment
old-commit-hash: 27754a277c36b82ef4040e536cc918ba8ad77bec
2020-05-31 14:07:29 -07:00