Commit Graph

524 Commits (master)

Author SHA1 Message Date
HaraldSchafer 68015f75ed
Set accel trajectory to a_ego when not engaged (#23100)
* Set accel trajectory to a_ego when not engaged

* update ref
2021-12-01 23:12:11 -08:00
HaraldSchafer 8f3bc4872f
Less sensitive torque saturated warning (#23003)
* Less sensetive torque saturated warning

* better comment
2021-12-01 13:53:42 -08:00
Adeeb Shihadeh e679d05d9e
New sounds (#22652)
* new engage/disengage + amp config

* first family

* cleanup audible alerts

* tici isn't special

* fix up debug cycle alerts

* these were better

* extend range

* use distracted sound

* log scaling

* getting closer

* slightly louder

* prompt

* update tests

* update refs

* fix c2 test

* resolve todo

* adjust tolerance

* revert for now

* should work

Co-authored-by: Comma Device <device@comma.ai>
2021-11-30 19:47:33 -08:00
HaraldSchafer 048cc3ac9f
Longcontrol : pid error should be 0 when plan is followed (#23066)
* v_pid error should be 0 when plan is followed

* update ref
2021-11-29 15:22:02 -08:00
Shane Smiskol 113988ae31
longitudinal: only apply overshoot prevention when braking (#22986)
* only if braking is desired

* use v_target to determine stopping

* more clear?
2021-11-29 11:29:32 +01:00
Shane Smiskol 93fd662adf
Clean up planner files (#23031)
* clean up planner files

clean up planner files

* fix plant instance
2021-11-26 14:57:39 +01:00
Robbe Derks 4960578bdf
Tesla longitudinal control (#22561)
* tesla long squashed changes

* fix no resume from stop

* try setting accel limits to 0 to remove jerk with fast switchover

* expand radard lookup tables

* bump merged panda submodule
2021-11-18 13:57:12 +01:00
Adeeb Shihadeh 2a72e2a514
add offroad alerts for car unrecognized (#22934)
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Chris McCammon <chrismccammon123@gmail.com>
2021-11-17 20:29:00 -08:00
HaraldSchafer 24aadaf1f3
Lateral planner: lower max cost (#22960)
* prevent ping pong when tuning is not so great

* update refs
2021-11-17 20:24:10 -08:00
Adeeb Shihadeh 5296ca8d73
improve crc camera error (#22943) 2021-11-16 22:57:22 -08:00
Adeeb Shihadeh 8d917b6702 more alert checks 2021-11-16 22:56:29 -08:00
HaraldSchafer b3b45c8d29
Add cost to long plan change for smoother lag comp (#22923)
* add plan changing cost

* fix compile

* set weights

* try this cost

* horizon problem

* looks pretty good

* update refs

* update refs

* smoother plan changes
2021-11-16 17:57:55 -08:00
Adeeb Shihadeh d8a5c415cd Revert "add offroad alerts for car unrecognized"
This reverts commit fb1e8ce086.
2021-11-16 13:31:10 -08:00
Adeeb Shihadeh fb1e8ce086 add offroad alerts for car unrecognized 2021-11-16 13:30:33 -08:00
Adeeb Shihadeh 833399e941
alerts: make soft disables an orange alert (#22925) 2021-11-16 13:11:32 -08:00
Adeeb Shihadeh 3302239013 put cruiseMismatch event in logging only mode 2021-11-15 21:16:54 -08:00
Adeeb Shihadeh 5265c36de7
alert cleanup (#22919) 2021-11-15 16:14:31 -08:00
Adeeb Shihadeh db92006dc0 CI: skip cruise mismatch check for can replays 2021-11-12 18:22:39 -08:00
HaraldSchafer a04114f68c
Give car interface roll and pitch (#22891)
* Give car interface roll and pitch

* fixup

* whitespace
2021-11-12 12:21:22 -08:00
Joost Wooning 89d0a52d16
cython wrapper for acados (#22784)
* cython wrapper for acados

* fix building

* sconscript cleanup

* no cython numpy

* cleanup

* upgrade build script

* try without slices

* new acados commit

* c3 update acados libs

* c2 libs

* make faster

* undo profiling

* fix build

* somewhat faster

* tryout cost_set_slice

* Revert "tryout cost_set_slice"

This reverts commit d358d93a13.

* cleanup

* undo t_renderer change

Co-authored-by: Comma Device <device@comma.ai>
2021-11-12 17:09:08 +01:00
Adeeb Shihadeh e528e2e3e2
allow update snoozing (#22876)
* allow update snoozing

* not immediately visible

* dismiss and close

* grey button
2021-11-11 15:32:25 -08:00
Adeeb Shihadeh 308219c5b1
alerts: use repeating warning2 sound for steerSaturated (#22874) 2021-11-11 11:55:34 -08:00
sshane bdaea086f8
Longcontrol: do not clip vEgo to minSpeedCan (#22832)
* fix tss2 slow reacceleration in sng

(should) preserve stopping behavior

add comments since it's confusing

fix

* Revert "fix tss2 slow reacceleration in sng"

This reverts commit 42abde0eb945d8bc5ad9b502d1d89b3e3dc16f8a.

* don't max(vEgo)

* update ref

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-11-11 13:24:38 +01:00
Adeeb Shihadeh 327464fb84 increase engagement alerts duration 2021-11-10 22:11:14 -08:00
Adeeb Shihadeh 035bc0c20f
controlsd: alert on cruise mismatch for >1s (#22841)
* controlsd: alert on cruise mismatch for >1s

* bump cereal

* update refs

* bump allowed soundd cpu

* bump cereal
2021-11-10 13:01:42 -08:00
Adeeb Shihadeh c5d6b85c90
alerts: use a single duration for sound, text, and HUD (#22856)
* alerts: use a single duration for sound, text, and HUD

* little cleanup

* update refs
2021-11-10 11:54:12 -08:00
Adeeb Shihadeh 93ba52c76c
controlsd: optimize alert management (#22846)
* controlsd: optimize alert management

* little cleanup

* dataclass is nice

* fix tests

* update refs

* sort by start frame

* update refs

Co-authored-by: Comma Device <device@comma.ai>
2021-11-10 10:54:18 -08:00
Jason Young 2006fff2b6
Fix momentary false blind spot alerts when changing lanes (#22819)
* reset LaneChangeDirection after finishing

* update ref

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-11-10 17:21:36 +01:00
HaraldSchafer 35d6ed1014
ACADOS: partial condensing (#22830)
* partial condense

* new refs

* new ref

* newerest refs
2021-11-09 19:29:55 -08:00
Adeeb Shihadeh 445a5aaca4
soundd: don't loop controls unresponsive sound infinitely (#22839)
* soundd: don't loop controls unresponsive sound infinitely

* update tests

* actually fix
2021-11-09 16:58:21 -08:00
Mayfield 8c501f0265
alerts: show min enable speed in "speed too low" alert (#22755)
* alerts: show min enable speed in "speed too low" alert

* commonize display speed construction
2021-11-02 14:10:07 +01:00
Adeeb Shihadeh 385f3c5387
controls: don't wind up while EPS is faulted or below min steer speed (#22739)
* controlsd: don't wind up while EPS is faulted

* also check if above min steer speed

* car params
2021-10-29 14:13:41 -07:00
Adeeb Shihadeh 3312bf6d15
lower profile below steer speed alert (#22740) 2021-10-29 13:39:12 -07:00
Robbe Derks 585c16cd2a
Multipanda support (#22402)
* squash all PR commits for easy rebase

* merged all panda rx can into one message

* fix buffers in can_send

* more cleanup and minor fixes

* fix even more stuff

* fix non-allocated send buffer

* make connecting more robust

* fix bus offset

* fix controls_mismatch?

* simplify mismatch check

* C++ style struct

* fix connect loop

* update ref

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-10-29 13:04:26 +02:00
Robbe Derks efb5abec41
Make longitudinal planning triggered on model (#22641)
* Make long planning triggered on model

* fix process replay

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-10-28 12:27:09 +02:00
Adeeb Shihadeh f4c2398db4
add sdcard support (#22703)
* generalize

* factory reset
2021-10-26 19:34:08 -07:00
Vivek Aithal 2ea4feffb9
plannerd: add useLaneLines to lateralPlan (#22699)
* add laneless toggle in lateral plan message

* update cereal

* add refs
2021-10-26 14:32:41 -07:00
Adeeb Shihadeh f2b48a1803
always show lane lines on HUD (#22693)
* always show lane lines on HUD

* update refs
2021-10-25 23:47:12 -07:00
Adeeb Shihadeh 7394956a90 temporarily disable per-core cpu usage check 2021-10-25 15:03:28 -07:00
HaraldSchafer 7868baeac9
e2e long planner: use position, speed and accel (#22688)
* a little bit more moderate

* cleaner
2021-10-25 14:03:41 -07:00
Adeeb Shihadeh 897492d27c
more specific no fw startup alert 2021-10-21 16:24:01 -07:00
qadmus 778374d3dd
[Lateral PID] Function for steer feedforward (#22638)
* store a function for steer feedforward

* use classmethod

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-10-21 11:38:03 +02:00
Mitchell Goff 38f775edfc
Only trigger model FCW on stock long when not already braking (#22620)
* Only trigger model FCW on stock long when not already braking

* Split model_fcw checks for better readability
2021-10-20 16:16:40 +02:00
Harald Schafer 791de68689 plannerd: position std size check bug 2021-10-17 19:52:11 -07:00
Adeeb Shihadeh 74a3c92704 only check low battery on EON 2021-10-15 15:04:19 -07:00
HaraldSchafer c4510024da
Remove accel cost in long MPC (#22527)
* ACCEL not useful

* new ref
2021-10-11 17:20:40 -07:00
HaraldSchafer 04cf12cb00
ACADOS fix non-convergence when long_plan changes (#22495)
* debug commit

* cleanup

* some indexing bugs

* need more its

* BALANCE is way better it seems

* fix test

* this converges in 2000segs

* new ref

* less cpu
2021-10-10 00:05:29 -07:00
Robbe Derks 91987f38d4
Make pandaState and safetyMode a list (#22454)
* wip: move to pandaStates

* bump cereal

* wip: SafetyMode struct

* move to safetyMode

* fix typo

* this can be None

* fix potential empty pandaStates list

* fix thermald

* fix controlsd

* rename safetyModes to safetyConfigs

* update process_replay

* fix test_models

* bump cereal
2021-10-08 17:54:34 +02:00
Willem Melching 5587964d58
Fix cruise button mph increment (#22487) 2021-10-08 11:10:29 +02:00
HaraldSchafer a4bc1bbb74
Long MPC cleanup (#22462)
* cleaner extrapolation

* some comments

* new ref

* more comments

* new ref
2021-10-06 17:51:23 -07:00
HaraldSchafer 9ab09f5ae9
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
2021-10-06 09:37:53 -07:00
Willem Melching e636f03c7a
Set CarControl.active (#22442)
* Set CarControl.active

* update ref
2021-10-05 14:32:39 -07:00
speedking456 23b9316603
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>
2021-10-04 21:11:17 +02:00
Willem Melching f4e2537b12
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>
2021-10-04 11:30:11 +02:00
qadmus 3461e25944
Lateral PID: move steer feedforward to CarInterface (#22411)
* move steer feedforward to car interface, in car parameters

* LatControlPID.get_steer_feedforward()
2021-10-04 10:03:53 +02:00
Greg Hogan 92895f1e68
accel/decel button short/long press 1mph/5mph (#22013) 2021-10-01 11:09:56 +02:00
HaraldSchafer a8b4249ebc
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
2021-09-29 11:55:54 -07:00
HaraldSchafer 85dc43d166
Small long MPC optimizations (#22360)
* Revert "temporarily relax camerad timings"

This reverts commit 174aa908ba.

* cleanup

* wrong weight size

* changes ever so slightly

* seems enough

* Revert "seems enough"

This reverts commit 24f64e9b18583462206bb77c37ba7727b9e47245.

* new ref
2021-09-28 17:37:31 -07:00
Adeeb Shihadeh 3b8fa4b7fd
controls: only send cruise cancel while cruise is enabled (#22359)
* controls: only send cruise cancel while cruise is enabled

* cleanup

* might actually do something

* update refs

* update refs again

* update refs
2021-09-28 12:30:50 -07:00
HaraldSchafer fe983a7b8c
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
2021-09-27 19:48:28 -07:00
Adeeb Shihadeh 2fe91e6085
change reverse gear event from immediate to user disable (#22337) 2021-09-24 10:27:51 -07:00
Adeeb Shihadeh 649af76fd4
remove community supported cars from community features (#22330)
* remove community supported cars from community features

* remove bosch and hkg long

* remove test case

* update refs
2021-09-23 17:34:52 -07:00
Willem Melching 88d248a5af
Remove fuzzy fingerprint startup alert (#22328)
* deprecate fuzzy fingerprint startup alert

* bump cereal
2021-09-23 17:15:33 -07:00
HaraldSchafer fcda55fbf1
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>
2021-09-21 12:19:05 -07:00
HaraldSchafer cc6af379ce
various cleanup (#22289) 2021-09-20 16:26:10 -07:00
Mitchell Goff 485afda79d
Added update_with_xva method to long_mpc so it can be used in sim (#22284) 2021-09-20 14:20:01 -07:00
HaraldSchafer 7495100177
More extreme lead init for lead mpc (#22273)
* More harsh lead init for lead mpc

* update refs
2021-09-20 09:35:55 -07:00
Harald Schafer a1fcedda21 Clip radar acceleration for mpc stability 2021-09-18 22:21:03 -07:00
HaraldSchafer f0be9a57ac
Dont run plannerd for long tests (#22260) 2021-09-16 20:45:13 -07:00
HaraldSchafer 5e995e5aff
sane lead clips to prevent reset (#22255) 2021-09-16 17:31:32 -07:00
HaraldSchafer 42d93e94df
remove ACADO (#22247)
* remove acado

* not relevant anymore
2021-09-15 21:14:11 -07:00
HaraldSchafer 66c275b711
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
2021-09-15 19:00:12 -07:00
Willem Melching 417e229624
Add upper/lower bounds for longitudinal lag (#22235)
* Add upper/lower bounds for longitudinal lag

* add ref

* update ref

* bump cereal

* bump cereal
2021-09-14 18:57:16 -07:00
HaraldSchafer 96a8f8a831
Less QP iterations for lateral acados (#22231)
* Less QP iterations for lateral acados

* update ref
2021-09-14 13:55:30 -07:00
Willem Melching c4bac6bd68
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
2021-09-13 22:03:08 -07:00
HaraldSchafer 0dc45eaf1c
Fix 0 init bug for acados lateral (#22225)
* this is needed somehow

* new ref
2021-09-13 21:23:22 -07:00
HaraldSchafer 7081ab4fb7
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>
2021-09-13 19:06:54 -07:00
Willem Melching b7d1aac197
Parameterize longitudinal control using carParams (#22200)
* use CP.startAccel

* missing values

* order

* update ref

* cereal
2021-09-11 18:01:54 -07:00
Willem Melching 1e62b09e5d
Use CP.vEgoStopping and clean up CP.startAccel (#22199)
* use CP.vEgoStopping and clean up

* update ref
2021-09-11 17:13:30 -07:00
HaraldSchafer 74b6c87254
cleanup old nidec accel override logic (#22181)
* cleanup old nidec accel override logic

* add ref without deprecated fields

* no more override
2021-09-10 10:34:18 -07:00
Adeeb Shihadeh da74a6cf73 plannerd: remove last of liveMpc 2021-09-09 14:09:09 -07:00
Adeeb Shihadeh 1c750975fc
reduce startup alert duration to 10s (#22163)
* reduce startup alert duration to 10s

* update refs

* update refs

* update refs
2021-09-07 13:40:31 -07:00
Willem Melching 4f84e1b2ad
actually set longControlState in actuators packet (#22155)
* actually set longControlState in actuators packet

* update ref
2021-09-06 20:14:01 -07:00
Willem Melching 21ae64868e
put LongControlState in CarControl.Actuators (#22154) 2021-09-06 18:45:59 -07:00
Willem Melching b39f6efa3f
parameterize longitudinal actuator delay (#22153)
* paremetrize longitudinal actuator delay

* update ref
2021-09-06 17:56:52 -07:00
Willem Melching f941111dcd
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
2021-09-06 17:29:32 -07:00
Adeeb Shihadeh 69fd266238
no battery (#22124)
* no battery

* little more

* used for power monitoriong
2021-09-03 22:17:57 -07:00
HaraldSchafer ebf2a2279d
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
2021-09-02 14:16:44 -07:00
Harald Schafer a4ae99a489 unused 2021-09-01 16:46:17 -07:00
Willem Melching edae2218d7
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>
2021-09-01 15:28:16 -07:00
grekiki 21fad4d1ad
Add angleError to pid_log (#21611)
* add angleError

* Log all the time

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-09-01 13:45:22 -07:00
robbederks f539cd45c9
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>
2021-08-31 12:29:53 -07:00
Adeeb Shihadeh 86f68ff22e
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>
2021-08-31 10:48:21 -07:00
HaraldSchafer 1ac89f14aa
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>
2021-08-30 09:32:52 -07:00
Adeeb Shihadeh 9afa0eec64 don't check cpu usage in simulation mode 2021-08-28 14:55:12 -07:00
Adeeb Shihadeh 9be7cf2cda remove deprecated mpc logging code 2021-08-26 13:33:43 -07:00
Adeeb Shihadeh fc8b571a84
alert for per-core cpu usage (#21983)
* thermald: per-core cpu usage

* add alert

* better alert text

* list

* fix process replay
2021-08-19 19:14:51 -07:00
Willem Melching 4fcd51e021
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
2021-08-19 19:00:03 +02:00
HaraldSchafer c0cacc7d2f
Remove HUD alert from green DM alert (#21942) 2021-08-16 22:30:51 -07:00
Mitchell Goff 05b37552f3
Retuned desire model (#21919)
* New model: d8e7f76f-7bec-4a83-af00-c0fae792527f/950

* Updated process replay refs

* Updated model replay ref
2021-08-12 21:06:26 -07:00
sshane 737a79e556
longitudinal comments (#21898)
* cmt

* Update longcontrol.py
2021-08-11 01:33:59 -07:00
Mitchell Goff 3022f68fa7
Update long_mpc api for use with sim (#21890) 2021-08-10 10:51:38 -07:00
Adeeb Shihadeh 8aafbc78f6 add that back 2021-08-06 15:48:16 -07:00
HaraldSchafer aa689176fc
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>
2021-08-05 14:23:27 -07:00
sshane c900bce1b0
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>
2021-08-03 13:47:46 +02:00
Adeeb Shihadeh fb028041cd
remove alert for stock fcw (#21834) 2021-08-02 21:59:03 -07:00
Mitchell Goff 15d6bbb47c
Revert "New desire model (#21729)" (#21805)
* Revert "New desire model (#21729)"

This reverts commit e83973b9b3.

* Updated process replay ref and reverted release notes
2021-07-30 14:34:29 -07:00
Adeeb Shihadeh 03255d83be increase controls initializing timeout a bit 2021-07-28 15:50:40 -07:00
Mitchell Goff e83973b9b3
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>
2021-07-26 21:11:09 -07:00
HaraldSchafer 4bd4ed4999
safer low speed (#21705) 2021-07-25 15:15:50 -07:00
Adeeb Shihadeh 7c3b7b5348
increase timeout for controls init (#21680)
Co-authored-by: Comma Device <device@comma.ai>
2021-07-22 00:04:00 -07:00
HaraldSchafer 049a1bca34
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>
2021-07-20 19:20:00 -07:00
HaraldSchafer ef0b120a9a
add jerk to longitudinal plan (#21598)
* add jerk output, so its like lateral

* typo

* add to packet

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

* update ref
2021-07-14 10:53:14 -07:00
HaraldSchafer 6a93346729
fix low speed override bug and cut-in bug (#21593)
* fix low speed bug and cutin bug

* update ref
2021-07-13 23:36:25 -07:00
HaraldSchafer fd41e9f01b
Lower speed for lowest planned acceleration (#21578)
* 55mph sounds about right

* update refs
2021-07-13 14:22:06 -07:00
Adeeb Shihadeh 88424ede2c
Revert model (#21571)
* Revert "New desire model (#21458)"

This reverts commit 4230d5d212.

* revert rel notes
2021-07-12 19:26:50 -07:00
HaraldSchafer a42d8f3a14
less accel (#21565)
* less accel

* new refs

* Update longitudinal_planner.py

* update refs
2021-07-12 18:30:56 -07:00
Jafar Al-Gharaibeh ff704e18b7
Car Port: Mazda CX-9 2021 (#20864)
* Mazda CX-9 no steer lockout, and newer cars can use more torque

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Mazda CX-9 2021 test route

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* cleanup

* more cleanup

* don't show community features alert if dashcam only

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-07-10 23:50:03 -07:00
Adeeb Shihadeh cb7e96f99d
rename enableCruise -> pcmCruise (#21546) 2021-07-10 13:56:11 -07:00
Adeeb Shihadeh b4fc208166
move fuzzy fingerprinting out of community features (#21542) 2021-07-10 13:23:39 -07:00
Adeeb Shihadeh 092c728e76
fix unnecessary harsh steering unavailable alerts (#21541) 2021-07-10 01:53:14 -07:00
HaraldSchafer 148c202bc4
less np (#21536) 2021-07-09 11:34:00 -07:00
HaraldSchafer 4230d5d212
New desire model (#21458)
* 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

Co-authored-by: mitchell <mitchellgoffpc@gmail.com>
2021-07-07 19:44:17 -07:00
HaraldSchafer be5ddd25cd
Refactor long (#21433)
* refactor

* needs casting

* tests pass

* fix that test

* refactor in controls

* lets not go crazy

* change of names

* use constants

* better naming

* renamed

* soft constraints

* compile slack variables

* rm git conflict

* add slack variables

* unused

* new edition

* fcw

* fix tests

* dividing causes problems

* was way too slow

* take a step back

* byeeee

* for another time

* bad idxs

* little more cpu for cruise mpc

* update refs

* these limits seem fine

* rename

* test model timings fails sometimes

* add default

* save some cpu

* Revert "little more cpu for cruise mpc"

This reverts commit f0a8163ec90e8dc1eabb3c4a4268ad330d23374d.

* Revert "test model timings fails sometimes"

This reverts commit d259d845710ed2cbeb28b383e2600476527d4838.

* update refs

* less cpu

* Revert "Revert "test model timings fails sometimes""

This reverts commit e0263050d9929bfc7ee70c9788234541a4a8461c.

* Revert "less cpu"

This reverts commit 679007472bc2013e7fafb7b17de7a43d6f82359a.

* cleanup

* not too much until we clean up mpc

* more cost on jerk

* change ref

* add todo

* new ref

* indentation
2021-07-07 19:42:26 -07:00
Adeeb Shihadeh 685e33c067
improved commIssue logging (#21515) 2021-07-07 18:43:41 -07:00
HaraldSchafer 2aadf8beb2
Remove DM high std alert (#21501)
* cleaner

* no face and high stds is the same

* change test

* final clean

* need to deprecate
2021-07-07 17:08:55 -07:00
Adeeb Shihadeh c72d163e14
deprecate CP.enableCamera (#21509)
* deprecate CP.enableCamera

* more removal

* one more

* update refs
2021-07-07 14:59:18 -07:00
Adeeb Shihadeh 8dce135279
update speedTooHigh alert sound (#21484) 2021-07-04 19:23:09 -07:00
HaraldSchafer 6838e1c82c
Refactor lateral lag compensation (#21334)
* add T_IDXS

* refactor

* fix test

* unused

* typo

* needs casting

* Update selfdrive/controls/lib/drive_helpers.py

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

* deprecate field

* regen all

* new segs

* add todo

* split back

* clean

* bad names

* do in controls

* add arg

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-06-30 14:19:39 -07:00
Adeeb Shihadeh 8e36a7d07c fix warning -> userPrompt 2021-06-28 21:46:26 -07:00
Adeeb Shihadeh 880435f6a2 make speed too high alert orange 2021-06-28 21:42:25 -07:00
Adeeb Shihadeh a420c7ad50
remove lte toggle (#21392)
* remove lte toggle

* little more
2021-06-23 17:01:17 -07:00
Willem Melching a8fac002ae
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
2021-06-22 16:28:11 +02:00
Chris McCammon 317afa335f
steer unavailable below speed audible alert (#21209) 2021-06-17 14:10:24 -07:00
Willem Melching 7b0d27e612
Don't check RAM/disk in simulation (#21261)
* Don't check RAM/disk on PC

* simulation
2021-06-16 11:59:15 +02:00
ShaneSmiskol ae77f693a2
Fixup joystick (#21129)
* some common changes

* rename to joystick

* add alert and update controlsd to work with joystick

* update joystickd

* Update Joystick readme

* assume we have inputs

* only send gb or steer when engaged_toggle is true

* Update instructions

* fix --ip

* Easier to understand at a glance

* much better

* -a

* receive events and send msg in same loop

* always import

* Update selfdrive/controls/lib/events.py

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

* Update selfdrive/controls/lib/events.py

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

* combine logic and clean up

* use argparse

* outdated, and use normal class

* rm

* bit of a refactor

* refactor part 2 / 3

* much better (3 / 3)

* Simplify

* bump cereal and update readme

* capitalize

* Update tools/joystick/joystickd.py

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

* Update tools/joystick/joystickd.py

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

* make joystick abstraction class clearer

* use interp, clearer without comments

* no need to use apply_deadzone

* more explicit

* define btns and axes once

* split function by use_keyboard again, but simpler

* we can use handle_button as a reset function

* need to flip sign

* remove

* invert axes map for kb, easier to read the button mapping

* apply changes from review

* new lateral log for debug mode

* bump

* add saturated

* static alert

* joystick_mode

* conditionally subscribe

* Update selfdrive/controls/controlsd.py

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

* move params instantiation

* Spoof active and enabled

* Only allow car to engage

* no startup alert if joystick

* Update controlsd.py

* Should be orange not enabled, green enabled

* no more button states

* should work

* blue

* submaster conflates, so only send when we have an update

* final change

* remove msg

* clean up a bit

sort of clean up

clean up a bit

remove msg

* this was right

* Apply suggestions from code review

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

* lowercase

* suggestions from code review

* forgot laptop

* bump to latest

* fixes

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: vanillagorillaa <31773928+vanillagorillaa@users.noreply.github.com>
2021-06-11 14:33:17 -07:00
Dean Lee e4e669bb0f
add space after function name and if statement (#21225) 2021-06-11 10:17:52 +02:00
Willem Melching ec17fad41a
Alerts documentation (#21172)
* Alerts documentation

* fingerprinting

* comment not necessary

* spelling

* openpilot

* Apply suggestions from code review

Co-authored-by: Chris McCammon <chrismccammon123@gmail.com>

* Apply suggestions from code review

Co-authored-by: Chris McCammon <chrismccammon123@gmail.com>
2021-06-09 10:58:01 +02:00
CrispinFlowerday 7458e143e3
Subaru: show LDW on dash for correct lane (#20934)
* Emit correct alerts for LDW Left & Right on Subarus

This change switches the ldw event to use VisualAlert.ldw and
alters all cars to use the prior behaviour for that alert, except
global subarus - they emit the correct warning to the dash

* Remove whitespace, and add comment about not overwriting stock alerts

Co-authored-by: Crispin Flowerday <crispin@theflowerdays.com>
2021-06-07 15:06:28 -07:00
Adeeb Shihadeh 524aa55b93
fix mpc compilation (#21178) 2021-06-07 15:01:29 -07:00
Adeeb Shihadeh d4ab1f1e27
startup alert for no fw returned (#21177) 2021-06-07 14:15:09 -07:00
speedking456 24b6b4a341
Add chime to lane changed blocked alert (#21159)
* Update carcontroller.py

* Lane change blocked orange + audible alert

* Actually make it make sound

* Update carcontroller.py

* leave priority the same
2021-06-07 01:38:08 -07:00
Adeeb Shihadeh f2a9b13498 bump cereal 2021-06-04 16:06:57 -07:00
Willem Melching de34d1a527
Determine lane chane direction in preLaneChange state (#21119)
* Determine lane chane direction in preLaneChange state

* cleanup

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-06-04 10:03:13 +02:00
HaraldSchafer 1c926d23da
Many localizer resets alert (#21116)
* add excessive reset

* add alert

* add event
2021-06-03 09:26:53 -07:00
Adeeb Shihadeh 6fa573a2d6 fix camera error indices 2021-06-01 16:56:33 -07:00
Jafar Al-Gharaibeh 824f93303d
Mazda FP 2.0 support (#20879)
* Mazda FP 2.0 support

ECU FW for CX-5 2017 and Mazda3 2017

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Use standard UDS request/reponse, fix missing arg.

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Add CX-5 FW test

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* update/add FW FP

Current suported models:
  CX-5 2017/2021
  CX-9 2019/2020
  Mazda3 2017/2018

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Add Cx-9 2019 FW FP

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Remove comments, remove TESTER_PRESENT_REQUEST from Mazda

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* add transmission ecu to startup test

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
2021-05-28 15:50:58 +02:00
Adeeb Shihadeh e1d7a1af10 fix low memory on tici 2021-05-26 19:47:10 -07:00
Adeeb Shihadeh 726fb9d501
Move CAN fingerprinting behind community features (#20993)
* Move CAN fingerprinting behind community features

* fix typo

* fix startup test

* fix
2021-05-24 19:21:58 -07:00