Commit Graph

449 Commits

Author SHA1 Message Date
HaraldSchafer 0512c89d34 various cleanup (#22289)
old-commit-hash: cc6af379ce0930ec3b635fda9d441654d2ac0c03
2021-09-20 16:26:10 -07:00
Mitchell Goff aa4b201b96 Added update_with_xva method to long_mpc so it can be used in sim (#22284)
old-commit-hash: 485afda79db7b65d00eb03553511c14f4b2f5301
2021-09-20 14:20:01 -07:00
HaraldSchafer bc1882e3fb More extreme lead init for lead mpc (#22273)
* More harsh lead init for lead mpc

* update refs
old-commit-hash: 7495100177acd53f06e553a49207b8413db9e2e2
2021-09-20 09:35:55 -07:00
Harald Schafer b1e2f219c9 Clip radar acceleration for mpc stability
old-commit-hash: a1fcedda21d1ff7d53bd647dc4359c5e5941bf47
2021-09-18 22:21:03 -07:00
HaraldSchafer e190dfaf13 Dont run plannerd for long tests (#22260)
old-commit-hash: f0be9a57ac1cf4931d7ebbfeb80a25e5d185167b
2021-09-16 20:45:13 -07:00
HaraldSchafer 8f84b2421a sane lead clips to prevent reset (#22255)
old-commit-hash: 5e995e5aff9f6b25b8c0a0e9d898add039294019
2021-09-16 17:31:32 -07:00
HaraldSchafer 3305024cfc remove ACADO (#22247)
* remove acado

* not relevant anymore
old-commit-hash: 42d93e94df410dc38b7f96e8061cff462a97d646
2021-09-15 21:14:11 -07:00
HaraldSchafer 2d4b64ed04 Acados long fast (#22233)
* acados long

* new ref

* SPPEEEEEDDD

* less iterations

* this shouldn't be so high

* reset only essentials

* minimal reset for long mpc

* more cpu usage plannerd

* Use lead mpc even when going to crash

* reset to current state

* Use open loop speed for lead mpc

* 1 iteration is too little for cruise mpc

* add whitespace

* update refs
old-commit-hash: 66c275b71128355d634d4daf0f5c18891d4fb047
2021-09-15 19:00:12 -07: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
HaraldSchafer 8877772a95 Less QP iterations for lateral acados (#22231)
* Less QP iterations for lateral acados

* update ref
old-commit-hash: 96a8f8a831a2e72e195d5b384723644e8499c531
2021-09-14 13:55:30 -07:00
Willem Melching a8ce1288fd Hyundai longitudinal prerequisites (#22121)
* panda

* bring over changes

* dont check car model

* remove comment

* fix typo

* more stuff gated behind long

* not

* not used

* gate that too

* try honda tuning

* clip accel values

* fix up merge

* fix stopping

* add retry logic around knockout

* increase timeout

* keep flipping lead bit

* true for now

* less tuning

* update comment

* 0.1 s is fine now

* merge honda and hyundai knockout

* more lead fields

* another obj bit

* increase timeout

* fix stopping flag

* only lag compensate for braking

* no lead

* less tuning

* only do knockout if not readonly

* try controlling using jerk

* tuning

* try higher stopping rate

* set stopping flag at higher speed

* clip upper jerk when stopping

* remove comments

* tester present 1hz

* use positive start accel

* 1.0 to maybe improve low speed stuff

* no point going over 0

* bump panda

* bump panda

* revert that change

* update ref
old-commit-hash: c4bac6bd68ce2a91beb15bb4f4472d76525288e0
2021-09-13 22:03:08 -07:00
HaraldSchafer 65a1b386dc Fix 0 init bug for acados lateral (#22225)
* this is needed somehow

* new ref
old-commit-hash: 0dc45eaf1cebc4247b59a4508b4ef192ea7b0e56
2021-09-13 21:23:22 -07:00
HaraldSchafer c422cce205 Port lateral planning to ACADOS (#22080)
* lateral acados

* looks good!

* add another solve, needed for init somehow

* use copy

* init correctly

* cleanup sconstruct

* Update files_common

* update cpu usage

* reset when invalid

* fix cpu usage

* cost_set doesnt leak

* new ref

* non leaky reset

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 7081ab4fb7473a5be424db4b63e6bdaacf62157f
2021-09-13 19:06:54 -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
Adeeb Shihadeh 52aaad7cad plannerd: remove last of liveMpc
old-commit-hash: da74a6cf73ab94999c6cb17d2598cdad2f1a27e0
2021-09-09 14:09:09 -07:00
Adeeb Shihadeh 7fc6a76f04 reduce startup alert duration to 10s (#22163)
* reduce startup alert duration to 10s

* update refs

* update refs

* update refs
old-commit-hash: 1c750975fc179185b270f2063831431538d075d8
2021-09-07 13:40:31 -07:00
Willem Melching 83ce6c65bb actually set longControlState in actuators packet (#22155)
* actually set longControlState in actuators packet

* update ref
old-commit-hash: 4f84e1b2ad689fb43b06d28def2bd58abf722748
2021-09-06 20:14:01 -07:00
Willem Melching ab7d2f1d08 put LongControlState in CarControl.Actuators (#22154)
old-commit-hash: 21ae64868e2ab2d75cf77fa816087847b0496ade
2021-09-06 18:45:59 -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
Adeeb Shihadeh 50ea63cb76 no battery (#22124)
* no battery

* little more

* used for power monitoriong
old-commit-hash: 69fd26623846e6b82bfa4cb022bc84a8f2df1771
2021-09-03 22:17:57 -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
Harald Schafer 4e7cca187c unused
old-commit-hash: a4ae99a489911bcaa0fe86633b7c6e21ae2a09fe
2021-09-01 16:46:17 -07:00
Willem Melching a06ffc48c1 Smarter longitudinal lag compensations (#22094)
* smarter lag compensations

* need to use speed from plan

* update ref

Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
old-commit-hash: edae2218d76e3fb81839eabab344c9dabc852fe9
2021-09-01 15:28:16 -07:00
grekiki afe4df11dd Add angleError to pid_log (#21611)
* add angleError

* Log all the time

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 21fad4d1adcaea1fd802f8dcb80f267d6d5b19d3
2021-09-01 13:45:22 -07:00
robbederks f8085a47ef Smarter thermal controls for tici (#21923)
* dumb controller 'tuned' on a desk

* reduce Ki

* fix prev_time bug

* reset integral on going onroad

* cleanup thermal detection logic

* more minor tuning

* use controls' PI controller

* get rid of bat_temp

* change if once more

* cleanup

* cleanup import order

* add back bat temp in this PR

* move to constructor

* consistency

* add bp

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: f539cd45c99034d379c797bb7faeb0e0dc44899e
2021-08-31 12:29:53 -07:00
Adeeb Shihadeh 1244074094 add TSS2 replay route (#21953)
* add TSS2 replay route

* skip on sim

* do not set on import time

* update ref

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 86f68ff22ed184dc40bfe58761a554aea1e3995e
2021-08-31 10:48:21 -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 d0dce9a166 don't check cpu usage in simulation mode
old-commit-hash: 9afa0eec6451a37a0dc0c39bf4837edd2ad53531
2021-08-28 14:55:12 -07:00
Adeeb Shihadeh 9de66112fb remove deprecated mpc logging code
old-commit-hash: 9be7cf2cdaa4c274cc4fd55797ac5d6421fc9652
2021-08-26 13:33:43 -07:00
Adeeb Shihadeh ac8b08fa0c alert for per-core cpu usage (#21983)
* thermald: per-core cpu usage

* add alert

* better alert text

* list

* fix process replay
old-commit-hash: fc8b571a847f1a89abb331eef8f85f310453fd77
2021-08-19 19:14:51 -07:00
Willem Melching f92f51d2b5 controlsd: ensure actuators packet is finite (#21958)
* controlsd: ensure actuators packet is finite

* do not hardcode fields

* cleaner way to get fields

* move line up
old-commit-hash: 4fcd51e0215d5f81a343d2f12108ad1528ab496e
2021-08-19 19:00:03 +02:00
HaraldSchafer e13349366e Remove HUD alert from green DM alert (#21942)
old-commit-hash: c0cacc7d2f30b18f1a19eb3b508a62ba4e2f0121
2021-08-16 22:30:51 -07:00
Mitchell Goff b7b87efed9 Retuned desire model (#21919)
* New model: d8e7f76f-7bec-4a83-af00-c0fae792527f/950

* Updated process replay refs

* Updated model replay ref
old-commit-hash: 05b37552f3a38f914af41f44ccc7c633ad152a15
2021-08-12 21:06:26 -07:00
sshane 41b7cbdadf longitudinal comments (#21898)
* cmt

* Update longcontrol.py
old-commit-hash: 737a79e5560816f1ef852eb42f761af86f57a55c
2021-08-11 01:33:59 -07:00
Mitchell Goff 7fffcd9baa Update long_mpc api for use with sim (#21890)
old-commit-hash: 3022f68fa70574202d7bd5ed0100133719e2316c
2021-08-10 10:51:38 -07:00
Adeeb Shihadeh 13b3649211 add that back
old-commit-hash: 8aafbc78f65a398b7d354a68453df15c1324eb9d
2021-08-06 15:48:16 -07:00
HaraldSchafer b615987244 Cleaner lane change alerts (#21857)
* less is more

* small

* remove HUD warnings

* update ref

* safe

* update refs

* update again

Co-authored-by: Willem Melching <willem.melching@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: aa689176fc84e57f16a4fe9f1769e76fb8effc46
2021-08-05 14:23:27 -07:00
sshane 51698f04bc Use first order filter (#21411)
* Use first order filter in INDI

* use first order filter in LP as well

* Update selfdrive/controls/lib/lane_planner.py

Co-authored-by: Willem Melching <willem.melching@gmail.com>

* RC->rc

* division safe

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: c900bce1b08e28edb777a5e9032d241c52bb1a2c
2021-08-03 13:47:46 +02:00
Adeeb Shihadeh eb8a334bfc remove alert for stock fcw (#21834)
old-commit-hash: fb028041cd895765a1c0dd88ba6cdf145477a005
2021-08-02 21:59:03 -07:00
Mitchell Goff 2d0512b8a1 Revert "New desire model (#21729)" (#21805)
* Revert "New desire model (#21729)"

This reverts commit 709932b3bfb4c3b4f33711b8d07615469e762832.

* Updated process replay ref and reverted release notes
old-commit-hash: 15d6bbb47c3a33f98d33377d95bf7e69c46565fa
2021-07-30 14:34:29 -07:00
Adeeb Shihadeh 8e8edfe185 increase controls initializing timeout a bit
old-commit-hash: 03255d83bea80c92d3bd5739ea20f7c510417646
2021-07-28 15:50:40 -07:00
Mitchell Goff 3fb1a1c746 New desire model (#21729)
* New model: b822ee32-917c-4639-99f8-25be3e6aabad/900

* Enable keeps

* use new packet

* Send keep pulses once per second

* Updated model_replay_ref_commit

* New model: 0f160bf9-1bce-43e6-9785-564b2453eeac

* Bump model_replay_ref_commit

* Bump submodules

* New model: fd904bf9-5dd8-4619-8997-c5668400e078/550

* New model: fd904bf9-5dd8-4619-8997-c5668400e078/950

* No keeps

* Bumped model replay ref

Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
old-commit-hash: e83973b9b31199c1594b9be2371a7af0c589c2d9
2021-07-26 21:11:09 -07:00
HaraldSchafer dee5a3e9a0 safer low speed (#21705)
old-commit-hash: 4bd4ed4999ef86824ef2d3a9dfa86ba61ae24b4f
2021-07-25 15:15:50 -07:00
Adeeb Shihadeh 4df47022d5 increase timeout for controls init (#21680)
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 7c3b7b53485069e1402f7351d9f032909c581021
2021-07-22 00:04:00 -07:00
HaraldSchafer d1c5e054d0 Better localizer unstable alert (#21660)
* use canonical language

* filter out when gps signal is flaky

* Update selfdrive/locationd/locationd.cc

Co-authored-by: Willem Melching <willem.melching@gmail.com>

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 049a1bca34c74ea1fae473386e8bea62f1b3041c
2021-07-20 19:20:00 -07:00
HaraldSchafer 4455ae1b86 add jerk to longitudinal plan (#21598)
* add jerk output, so its like lateral

* typo

* add to packet

* update cereal and ref
old-commit-hash: ef0b120a9ac589b22672b95adb57ecb4e4cee336
2021-07-14 11:51:48 -07:00
HaraldSchafer bbd7181df2 Taper off high speed accel (#21599)
* max 0.2 diff from before to preserve bad tuned cars

* update ref
old-commit-hash: 5d078190840adf2e6d50cdd3937ca407538886e6
2021-07-14 10:53:14 -07:00