Commit Graph

349 Commits

Author SHA1 Message Date
Willem Melching
627c6260cf Fix cruise button mph increment (#22487)
old-commit-hash: 5587964d58
2021-10-08 11:10:29 +02:00
HaraldSchafer
5a1e44c417 Long MPC cleanup (#22462)
* cleaner extrapolation

* some comments

* new ref

* more comments

* new ref
old-commit-hash: a4bc1bbb74
2021-10-06 17:51:23 -07:00
HaraldSchafer
f495134be4 Retune long mpc (#22445)
* first try

* looks decent

* finalize retune

* back to 3 its

* may need 4 still

* misc cleanup

* new ref

* SPEEEED

* new ref
old-commit-hash: 9ab09f5ae9
2021-10-06 09:37:53 -07:00
speedking456
ca46acfd64 accel/decel button metric increments (#22399)
* add metric values

Freedom units have weird multiples compared to metric. Modified so that it increments by 10 km/h on long press and 1 km/h on short press, rather than 8 and 1.6 km/h. This mimics stock hyundai behaviour on metric vehicles.

* use is_metric from controlsd

* use actual mph value instead of rounded

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 23b9316603
2021-10-04 21:11:17 +02:00
Willem Melching
11066c6236 Split pandaState into peripheralState and pandaState (#22385)
* publish peripheralState from boardd

* refactor consumers

* rename thread

* peripheralState has panda type too

* add to process replay

* fix device build

* properly remove hardware unsupported alert

* latest peripheralState

* remove pandaState from thermal_monitor

* put that back

* add back harness check

* fix cloudlog

* needs pandaState

* Update selfdrive/thermald/tests/test_power_monitoring.py

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

* dont conflate

* Update selfdrive/thermald/tests/test_power_monitoring.py

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

* pigeon is peripheral

* cleanup

* less global

* comment

* move rtc to peripheral_control_thread

* better diff?

* whitespace

* get msg

* bump cereal

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: f4e2537b12
2021-10-04 11:30:11 +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: 3461e25944
2021-10-04 10:03:53 +02:00
Greg Hogan
a131767d0b accel/decel button short/long press 1mph/5mph (#22013)
old-commit-hash: 92895f1e68
2021-10-01 11:09:56 +02:00
HaraldSchafer
d91e0604e8 Change radar-based FCW to model-based FCW (#22379)
* just use MPC for fcw checking

* thats already bad

* model FCW is always good

* better fcw

* should be good for now

* comment

* linting

* cleaner

* unused
old-commit-hash: a8b4249ebc
2021-09-29 11:55:54 -07:00
HaraldSchafer
f02787eb75 Small long MPC optimizations (#22360)
* Revert "temporarily relax camerad timings"

This reverts commit 59b8293b70e0cbd43567275dc2c6c1d29308fb84.

* cleanup

* wrong weight size

* changes ever so slightly

* seems enough

* Revert "seems enough"

This reverts commit 24f64e9b18583462206bb77c37ba7727b9e47245.

* new ref
old-commit-hash: 85dc43d166
2021-09-28 17:37:31 -07:00
HaraldSchafer
2b470f4e38 acados long merged (#22224)
* rebased

* cleaner, seems to drive better?

* more stable

* wrong import

* new way of thinking

* reports look nice

* start move back

* works at leas

* good timestamps

* step by step

* somewhat work

* tests pass

* ALL CARS STOPPED

* should work

* fake a cruise obstacle

* cleaner costs

* pretty good except cruise braking

* works pretty well now!

* cleanup

* add source

* add source

* that is needed for unit tests

* nan recovery

* little cleaner

* stop wasting arrays

* unreasonable without unfair init

* this isnt needed without the exponential

* that works too

* unused

* uses less

* new ref

* long enough

* e2e long api

* DONT PUT IN A VIEW INTO ACADOS

* new ref for outside weights

* remove debug prints
old-commit-hash: fe983a7b8c
2021-09-27 19:48:28 -07:00
Adeeb Shihadeh
18097d7c06 change reverse gear event from immediate to user disable (#22337)
old-commit-hash: 2fe91e6085
2021-09-24 10:27:51 -07:00
Willem Melching
b3601ce43b Remove fuzzy fingerprint startup alert (#22328)
* deprecate fuzzy fingerprint startup alert

* bump cereal
old-commit-hash: 88d248a5af
2021-09-23 17:15:33 -07:00
HaraldSchafer
498e0f4212 Fix cruise MPC convergence bug and add test (#22295)
* fix tests

* fix cruise convergence bug

* update refs

* Update selfdrive/controls/tests/test_cruise_speed.py

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

* Update selfdrive/controls/tests/test_cruise_speed.py

* add msgh

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: fcda55fbf1
2021-09-21 12:19:05 -07:00
HaraldSchafer
0512c89d34 various cleanup (#22289)
old-commit-hash: cc6af379ce
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: 485afda79d
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: 7495100177
2021-09-20 09:35:55 -07:00
Harald Schafer
b1e2f219c9 Clip radar acceleration for mpc stability
old-commit-hash: a1fcedda21
2021-09-18 22:21:03 -07:00
HaraldSchafer
e190dfaf13 Dont run plannerd for long tests (#22260)
old-commit-hash: f0be9a57ac
2021-09-16 20:45:13 -07:00
HaraldSchafer
8f84b2421a sane lead clips to prevent reset (#22255)
old-commit-hash: 5e995e5aff
2021-09-16 17:31:32 -07:00
HaraldSchafer
3305024cfc remove ACADO (#22247)
* remove acado

* not relevant anymore
old-commit-hash: 42d93e94df
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: 66c275b711
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: 417e229624
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: 96a8f8a831
2021-09-14 13:55:30 -07:00
HaraldSchafer
65a1b386dc Fix 0 init bug for acados lateral (#22225)
* this is needed somehow

* new ref
old-commit-hash: 0dc45eaf1c
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: 7081ab4fb7
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: b7d1aac197
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: 1e62b09e5d
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: 74b6c87254
2021-09-10 10:34:18 -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: 1c750975fc
2021-09-07 13:40:31 -07:00
Willem Melching
ab7d2f1d08 put LongControlState in CarControl.Actuators (#22154)
old-commit-hash: 21ae64868e
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: b39f6efa3f
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: f941111dcd
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: ebf2a2279d
2021-09-02 14:16:44 -07:00
Harald Schafer
4e7cca187c unused
old-commit-hash: a4ae99a489
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: edae2218d7
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: 21fad4d1ad
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: f539cd45c9
2021-08-31 12:29:53 -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: 1ac89f14aa
2021-08-30 09:32:52 -07:00
Adeeb Shihadeh
9de66112fb remove deprecated mpc logging code
old-commit-hash: 9be7cf2cda
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: fc8b571a84
2021-08-19 19:14:51 -07:00
HaraldSchafer
e13349366e Remove HUD alert from green DM alert (#21942)
old-commit-hash: c0cacc7d2f
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: 05b37552f3
2021-08-12 21:06:26 -07:00
sshane
41b7cbdadf longitudinal comments (#21898)
* cmt

* Update longcontrol.py
old-commit-hash: 737a79e556
2021-08-11 01:33:59 -07:00
Mitchell Goff
7fffcd9baa Update long_mpc api for use with sim (#21890)
old-commit-hash: 3022f68fa7
2021-08-10 10:51:38 -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: aa689176fc
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: c900bce1b0
2021-08-03 13:47:46 +02:00
Adeeb Shihadeh
eb8a334bfc remove alert for stock fcw (#21834)
old-commit-hash: fb028041cd
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: 15d6bbb47c
2021-07-30 14:34:29 -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: e83973b9b3
2021-07-26 21:11:09 -07:00
HaraldSchafer
dee5a3e9a0 safer low speed (#21705)
old-commit-hash: 4bd4ed4999
2021-07-25 15:15:50 -07:00