Commit Graph

524 Commits (master)

Author SHA1 Message Date
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
HaraldSchafer d6fcf6fa84
Safe interpolation in lane_planner (#20995)
* safe idxs

* make thread more safe
2021-05-21 16:34:17 -07:00
Adeeb Shihadeh 12ed986333
per camera alerts (#20992)
* per camera alert

* bump cereal

* cleanup

* space
2021-05-21 14:53:30 -07:00
Adeeb Shihadeh c04b47938d
stricter memory usage check (#20985) 2021-05-21 11:25:11 +02:00
Adeeb Shihadeh fa1df5f783 show alert for rest of drive 2021-05-20 20:03:39 -07:00
Mitchell Goff 29cc3500a5
New model outputs (#20933)
* New model: 51a237cd-9c43-4281-9072-802325e6744d/950

* Added new meta outputs and proper interp for plan_t_arr

* Added meta-based trigger for FCW

* No nans in planner, separate alert for model FCW

* Cleaned up plan_t interp logic

* Added empty cameraError alert to fix unit tests

* Use the normal FCW event

* Updated filter logic

* Updated model replay ref

* Moved disengage predictions into their own cereal struct

* Updated model replay ref for new cereal structs

* Apparently this breaks stuff?

* Bumped cereal commit and model replay ref
2021-05-19 22:30:23 -07:00
Adeeb Shihadeh 2defc730db
alert for errors in camera stack (#20932)
* camera error alert

* check crcs

* cleanup

* bump cereal

Co-authored-by: Comma Device <device@comma.ai>
2021-05-19 21:28:16 -07:00
Adeeb Shihadeh f08e01c97f
fingerprint cloudlog event (#20950)
* fingerprint cloudlog event

* kale cloudlog

* not fuzzy
2021-05-18 10:52:53 -07:00
Adeeb Shihadeh 313741062e
offroad alert for missing nvme (#20931)
* offroad alert for missing nvme

* remove that

Co-authored-by: Comma Device <device@comma.ai>
2021-05-17 13:35:24 -07:00
Adeeb Shihadeh e694f0b4d6
boardd: set can and pandaState valid flags (#20899)
* boardd: set can and pandaState valid flags

* add event

* bump cereal

* consistency
2021-05-14 21:26:02 -07:00
Adeeb Shihadeh b93ccc465d
offroad alert for unregistered devices (#20870)
* offroad alert for unregistered devices

* update tests

* add param

* fix stretch
2021-05-11 03:18:45 -07:00
Dean Lee 7222d0f20d
Cleanup selfdrive/ includes (#20822)
* cleanup include path

* continue

* format includes

* fix testraw.cc

* remove include path from SConstruct

* regroup

* rebase master

* almost done

* apply review

* rename FileReader.xx to filereader.xx

* rename Unlogger.x->unlogger.x

* rename FrameReader.xx -> framereader.xx

* apply reviews

* ui.h

* continue

* fix framebuffer.cc build error:mv util.h up

* full path to msm_media_info

* fix qcom2 camerad

Co-authored-by: Comma Device <device@comma.ai>
2021-05-08 22:15:17 -07:00
Willem Melching b38e57eb2b
Improve community feature alert text (#20803) 2021-05-03 11:59:01 +02:00
Adeeb Shihadeh f9a961f6fb
delay controls start (#20761)
* delay controls start

* shouldn't need this stuff anymore

* only delay board

* bail after 2s

* fix loopback test

* fix process replay

* update refs

* bump cereal

Co-authored-by: Comma Device <device@comma.ai>
2021-04-30 13:55:17 -07:00
Willem Melching a57f10c202
Fix ability to change lane change direction while in progress (#20765) 2021-04-29 13:03:16 -07:00
qadmus 0d10f9c4ad
ignore_avg_freq of longitudinalPlan, which is triggered by radarState (#20743) 2021-04-29 11:06:44 -07:00
Willem Melching 64d2ec38f2 Ignore radarState average frequency 2021-04-21 10:59:26 +02:00
Adeeb Shihadeh 836668f105
less harsh steering unavailable alert when overriding (#20718)
* less harsh steering unavailable alert when overriding

* just steer

* 1s

* orange

* update refs
2021-04-20 21:01:28 -07:00
Adeeb Shihadeh a19d94ae2d
Toyota: use FW query for DSU detection (#20615)
* Toyota: use FW query for DSU detection

* make sure we have at least some fw responses

* bool

* add test to test_startup

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-04-20 14:32:34 +02:00
Willem Melching e4f73fbda5
Fuzzy match on ECU FW versions (#20687)
* Fuzzy match on 3+ ECUs

* reuse dict

* exclude some shared ecus to be sure

* show alert for fuzzy match

* use title case

* require community toggle

* refactor

* do both exact and fuzzy in test script

* update test script

* add fuzz test and lower matches to >= 2

* strip alert length

* sort mismatches

* add fw tests to test_startup

* bump cereal
2021-04-20 12:00:36 +02:00
Adeeb Shihadeh 3fa86657cb show gps alert when lte's enabled 2021-04-15 22:12:16 -07:00
Adeeb Shihadeh 9edda6fbc1
tici: offline big cluster while offroad (#20668)
* tici: offline big cluster while offroad

* shuffling

Co-authored-by: Comma Device <device@comma.ai>
2021-04-12 23:06:24 -07:00
Willem Melching 8ede1b30aa
tici: move real-time processes to high-performance cores (#20634) 2021-04-09 13:41:43 +02:00
Willem Melching 44c395165b plannerd: use get_bool to read param 2021-04-09 10:32:31 +02:00
HaraldSchafer 0e10b74a61
MPC retune for laneless fix (#20616)
* was making wrong policy more aggresive

* allow to be set from simulator

* update refs

* put params together
2021-04-08 12:56:47 -07:00
Willem Melching c1075037ba
Add list for average frequency ignore (#20624)
* add list for averge frequency ignore

* typo
2021-04-08 18:04:16 +02:00
Adeeb Shihadeh 2fa1b2572d
Alerts update (#20567)
* steer temp unavailable should be a soft disable

* no mute

* these should be no entries

* sound

* better name

* deprecated

* make vehicleModelInvalid a soft disable

* update refs

* bump cereal

* bump cereal

* update refs
2021-04-07 12:18:58 -07:00
Willem Melching 1fc7bcca43
ecam toggle (#20597)
* use ecam in ui

* needs reboot

* use in modeld

* typo

* effective FL is longer in center

* normalize zoom by focal dist

* read param before init

* make 2x as wide

* review comments

* more explicit

* fix camera offset

Co-authored-by: ZwX1616 <zwx1616@gmail.com>
2021-04-07 19:12:35 +02:00
Willem Melching ae094042ad
add putBool/getBool wrappers to cython params class (#20611)
* add putBool/getBool wrappers to cython class

* use new API

* some more puts

* fix mockparams arguments

* add get_bool to MockParams

* typo
2021-04-07 15:36:37 +02:00
Willem Melching 0dca8cb7dd remove ubloxRaw from controlsd SubMaster 2021-04-07 14:41:38 +02:00
HaraldSchafer d72d433ec7
no heading cost (#20594)
* no heading cost

* live mpc weight config

* need to add stds

* make work on empty data

* no divide by 0

* update refs

* update model replay

* update proc replat

* new model replay ref
2021-04-06 23:49:29 -07:00
Willem Melching 79b5bee9dd
Check average frequency in SubMaster (#20558) 2021-04-06 10:09:47 +02:00
Adeeb Shihadeh 2319d726fb
lower min lane change speed to 30mph (#20586)
* lower min lane change speed to 30mph

* update refs
2021-04-05 15:38:53 -07:00
Adeeb Shihadeh 367aec54d1
show persistent dashcam mode alert (#20483)
* always show dashcam mode alert

* show persistent dashcam mode alert

* lowest

Co-authored-by: Comma Device <device@comma.ai>
2021-03-25 21:37:38 -07:00
HaraldSchafer 7ee79c9923
New KL model + laneless toggle (#20454)
* New model: 0bf38240-6b55-42b0-bcfb-da08ff5cd0b9/650

* laneless baby

* hardcode model difference for now

* kale toggle

* kale emoji

* sensible description

* make clear it is not just for ui

* emojis dont work yet

* 9671a8fe-539f-4a04-a163-54571df21139/650

* new model

* only read param on rising edge of ignition

* update toggle text

* fix that

* update refs

Co-authored-by: mitchell <mitchellgoffpc@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-03-24 01:10:31 -07:00
Adeeb Shihadeh 43ce7165c4
Remove lane change toggle and default LDW to off (#20442)
* remove lane change toggle and default LDW to off

* update refs
2021-03-22 20:55:57 -07:00
Erich Moraga 0fc5c86805
remove unused line (#20426) 2021-03-21 17:13:16 -07:00
Willem Melching 3c23226edc
verify safetyParam read back from PandaState (#20384)
* verify safetyParam read back from PandaState

* update ref

* bump panda
2021-03-17 14:20:05 +01:00
HaraldSchafer 27035131cc
Sane curvature rate limit in plannerd (#20366)
* safety limit

* should be in RADs

* add raw

* update refs
2021-03-16 15:00:03 -07:00
Willem Melching 2ca5bf9992 make vehicleModelInvalid a NoEntry 2021-03-15 12:15:27 +01:00
Willem Melching 9685be4090
Fix vehicleModelInvalid alert (#20352)
* Fix vehicleModelInvalid alert

* remove from if else tree
2021-03-15 11:33:45 +01:00
Willem Melching c23ec9f753
LateralPlanner should only compute curvature (#20289)
* get curvature from planner

* no need to check active

* remove that

* remove self

* liveParams not needed

* cast

* fix test bug

* fixes

* fix ui.py

* fix radians

* update refs

* update refs

* bump cereal

* bump cereal

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-03-11 21:08:51 -08:00
HaraldSchafer 0223578461
Better high speed alert message (#20322) 2021-03-11 17:01:29 -08:00
Willem Melching af02811d42 turn off gpsMalfunction alert until uBlox config is fixed 2021-03-10 11:13:46 +01:00
Willem Melching 5a3b511306
Manager cleanup (#20231)
* move manager in folder

* inital refactor

* call start

* small cleanup

* add comments

* use self.signal()

* order shouldnt matter

* newlines

* add helpers

* newlines

* add process config

* split out build part of manager

* this should fix most tests

* no sensord on pc

* dont start athena

* remove comment

* fix old athena test

* fix inject model

* fix test car models

* should be not none

* fix helpers exitcode

* ignore manage_athenad

* Use time.monotonic()

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

* combine init, remove spinner

* move manager test

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-03-05 11:03:23 +01:00
wolterhv 93911a7dbe
Replace hardcoded values for Pi (#20235)
* Avoid redefining pi, use instead math.pi or M_PI from math.h

* Revert overwriting of the gpsPi variable, which is part the GPS standard.

* Move standard library imports to top, remove standard library import comments.
2021-03-03 14:22:06 -08:00
Marius Larsen e998d6d93f
Fxing some typos in vehicle_model.py comments (#20220) 2021-03-03 11:40:22 +01:00
Willem Melching 280192ed14
only allow INDI wind down on user override (#20080) 2021-02-23 16:39:40 -08:00
HaraldSchafer 8df76b3980
Always linearize, better way of compensating for lag (#20133)
* need to divide diff by 2

* simple linearization seems to work best

* update refs
2021-02-23 12:56:12 +01:00
Adeeb Shihadeh f28673e8b5
fix apk after cereal cleanup (#20098)
* actually a percent

* update apk

* update refs
2021-02-19 12:19:29 -08:00
HaraldSchafer a0cdacbb2a
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>
2021-02-18 17:16:20 -08:00
Adeeb Shihadeh 312b681a46
cereal cleanup part 2 (#20092)
* car stuff

* thermal

* Revert "car stuff"

This reverts commit 77fd1c65eb.

* panda state

* camera stuff

* start deg

* most is building

* builds

* planner + controls run

* fix up paramsd

* cleanup

* process replay passes

* fix webcam build

* camerad

* no more frame

* thermald

* ui

* paramsd

* camera replay

* fix long tests

* fix camerad tests

* maxSteeringAngle

* bump cereal

* more frame

* cereal master
2021-02-16 21:39:32 -08:00
Igor 8f9ee10b8a
Fix division by zero in lateral_planner.py (#20071)
* Fix division by zero

* Change fix logic
2021-02-16 11:43:11 +01:00
Adeeb Shihadeh 4ace476f14 fanSpeedRpmDesired -> fanSpeedPercentDesired 2021-02-11 17:00:26 -08:00
Adeeb Shihadeh fe7f3f0ec6
remove gpsd (#20027) 2021-02-10 16:39:39 -08:00
HaraldSchafer 0c900c8ce1
fix low speed lateral (#20053)
* fix low speed lateral

* update ref

* fix failing CI jobs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-02-09 15:36:58 -08:00
Willem Melching 4c04e220a1
Timezoned (#19960)
* untested code

* add to manager

* whitespace

* only save on fix

* cleanup

* fix typo

* add to ignored processes

* import tici

* fix param name

* cleanup

* only run offroad

* use itertools

* wait for thermald

* simpler

* fall back to api call

* add param to override timezone

Co-authored-by: Comma Device <device@comma.ai>
2021-02-06 11:07:37 +01:00
HaraldSchafer c3707328f5
Different lag comp (#20024)
* more sensible

* different names for different segs

* new ref

* this is checked somewhere
2021-02-05 14:01:22 -08:00
Adeeb Shihadeh 4ca462a846 skip manager check in sim 2021-02-04 20:51:37 -08:00
HaraldSchafer bad68e4663
camera offsets (#20022)
* camera offsets

* runs on pc so is 0 in proc replay
2021-02-04 15:50:53 -08:00
Adeeb Shihadeh 000bd226aa
Cereal cleanup (#20003)
* start cleanup

* fan speed

* cleanup dm

* fix cereal

* hwType -> pandaType

* update refs

* update refs

* bump cereal

* freeSpacePercent

* cereal master
2021-02-03 19:57:30 -08:00
HaraldSchafer 61a4e3e661
Remove curv factor (#20011)
* cleaning crew

* need that to match

* smooth factor

* that didn't really work

* closer to previous

* new ref

* new names
2021-02-03 17:51:21 -08:00
Adeeb Shihadeh d7281387ad don't show on tici 2021-02-02 21:27:36 -08:00
HaraldSchafer 3f2b42b4e3
Deal with long lag compensation (#20004)
* add hack for big lags

* wrong bracket

* new pathplanner values
2021-02-02 17:09:01 -08:00
Willem Melching bacf8727d7
cloudlog once on commIssue (#19949) 2021-02-01 13:41:04 -08:00
HaraldSchafer d1b31d3697
not relevant at high speed (#19946)
* not relevant at high speed

* update ref
2021-01-27 20:28:17 -08:00
Mitchell Goff 608f00f814
Split planner and pathplanner publishing into separate 'publish' methods (#19860)
* Split planner and pathplanner publishing into separate 'publish' methods

* Updated test_following_distance.py

* Combined publish+send_mpc_solution methods
2021-01-26 20:27:24 -08:00
HaraldSchafer d628352098
important for indi (#19926)
* important for indi

* dont change that in this pr
2021-01-26 14:26:27 -08:00
Willem Melching b6a220a133
manager.py broadcast process states (#19880)
* broadcast managerstate

* Remove boardd

* show alert

* only trigger on actually receiving a manager state

* add managerstate to simulation exclude for longitudinal test

* broadcast managerState in process replay

* update alert text

* bump cereal

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-01-26 14:49:55 +01:00
Shane Smiskol 76cf500669
INDI: Time constant is used based on breakpoints (#19858)
* Time constant is used based on break points

* no need for alpha class variable
2021-01-21 15:14:50 +01:00
HaraldSchafer 124100d0fa
remove old model packet (#19769)
* remove publisher

* move to V2

* radard new model

* fix plant

* change packety

* need hack here too

* change to new

* this has been wrong all along

* no more model msg

* subscribe to new model

* not needed anymore

* make work

* need to ignore that too

* should pass tests, needs car test

* fix process replay

* no more poly

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-01-19 17:15:16 -08:00
HaraldSchafer 0e49919ab9
Cleanup pathplanner (#19827)
* no divide by 0

* misc cleanup

* final fixes

* remove last polys

* new ref

* fix test

* update again
2021-01-19 00:02:53 -08:00
Marcos S c03a95f7f9
Carla fixes (#19824)
* use carla provided frame_number

* fix carla comm issues error

* add minimal W-A-S-D keyboard controls

* fix window from carla docker not showing

* carla 0.9.7 uses `frame`, not `frame_number`

* set safetyModel on health for simulator

* safetyModel check now works with simulator

* ignore ubloxRaw and frontFrame when running sim

* Update selfdrive/controls/controlsd.py

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

* added WINDOW flag for optional show carla window

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-01-18 17:16:32 -08:00
HaraldSchafer bf5332c491
back to open loop (#19781) 2021-01-16 13:43:30 -08:00
Harald Schafer 61b7527b95 fix tests 2021-01-14 21:46:01 -08:00
Harald Schafer 90216ce620 fix init 2021-01-14 20:52:39 -08:00
HaraldSchafer 158210cde8
Mpc rework2 (#19660)
* start again

* need that too

* this actually works

* not needed

* do properly

* still works

* still works

* still good

* all G without ll

* still works

* all still good

* cleanup building

* cleanup sconscript

* new lane planner

* how on earth is this silent too....

* update

* add rotation radius

* update

* pathplanner first pass

* misc fixes

* fix

* need deep_interp

* local again

* fix

* fix test

* very old

* new replay

* interp properly

* correct length

* another horrible silent bug

* like master

* fix that

* do doubles

* different delay compensation

* make robust to empty msg

* make pass with hack for now

* add some extra

* update ref for increased leg

* test cpu usage on this pr

* tiny bit faster

* purge numpy

* update ref

* not needed

* ready for merge

* try again after recompile

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-01-14 18:43:50 -08:00
Adeeb Shihadeh 40830a216b
fix camera malfunction alert (#19757)
* fix camera alert malfunction

* remove old alert
2021-01-14 16:03:16 -08:00
Adeeb Shihadeh c114316d94
GPS malfunction alert (#19756)
* GPS malfunction alert

* fix process replay

* fix long tests

* fix long tests again
2021-01-14 14:45:10 -08:00
Igor 0a65e87394
Add indi breakpoints (#19664)
* Added BP, V to latcontrol_indi

* hyundai

* toyota

* Tests for INDI outerLoopGain
2021-01-07 15:55:46 +01:00
Willem Melching 7c43a60bda
Rebuild acado and add scons command to regenerate mpc (#19685)
* rebuild acado and add scons command to regenerate mpc

* update scons help
2021-01-07 15:18:23 +01:00
Willem Melching e4cf43c6fc
Move all CarControllerParams into values.py (#19663)
* toyota

* use scale from values.py

* nissan

* subaru

* honda

* gm

* toyota combine into CarControllerParams

* nissan refactor

* chrysler refactor

* mazda refactor

* hyundai refactor

* subaru refactor
2021-01-06 11:20:44 +01:00
Adeeb Shihadeh 389649d6ac remove old event 2020-12-21 15:55:30 -08:00
Adeeb Shihadeh 41b31a1756
don't go onroad if internet needed (#19572) 2020-12-21 15:13:20 -08:00
Willem Melching 776a67ad2e remove commIssueWarning from events 2020-12-17 22:25:22 +01:00
Adeeb Shihadeh 8674b023ba
HW abstraction layer (#19530)
* start hw refactor

* move that

* pins

* put that back
2020-12-16 21:30:23 -08:00
Shane Smiskol 89a6008841
don't wait for 4 seconds before it starts steering again after steering fault (#19520) 2020-12-16 12:24:42 -08:00
Igor 717bc747c3
Parametrize startingBrakeRate (#19511)
* Parametrize startingBrakeRate

* new ref_commit
2020-12-16 20:58:07 +01:00
Adeeb Shihadeh 6a151dcd9c
oneplus deprecation (#2748)
* oneplus deprecation

* lowercase

* too long

* no udpates
2020-12-12 12:51:12 -08:00
Igor d3c2a0e6c1
Parametrize stoppingBrakeRate (#2745)
* Parametrize stoppingBrakeRate

* ref_commit updated
2020-12-11 16:30:35 +01:00
Igor 093456cc40
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>
2020-12-04 11:09:34 +01:00
Willem Melching d5a806e564 fix typo in event name 2020-12-03 17:07:03 +01:00
Willem Melching 93e90898dd Add event for commIssueWarning 2020-12-03 16:54:54 +01:00
Adeeb Shihadeh 9d18b45cd0 don't need that 2020-11-24 22:47:44 -08:00
Willem Melching 40acdc4524
Typing experiments (#1633)
* add more types

* car

* no abc

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-11-24 22:45:37 -08:00
George Hotz 160fd207a5 remove model lag warning, leave red alert at 20 2020-11-24 13:02:56 -08:00
Adeeb Shihadeh 2d7a194f9f
model lag warning (#2608) 2020-11-23 13:42:18 -08:00
Adeeb Shihadeh d92f923d70
update frame drop filter (#2592) 2020-11-21 14:50:53 -08:00
Harald Schafer 6907714510 update comments 2020-11-12 10:21:27 -08:00
HaraldSchafer 08846b5c0e
Torch model (#2452)
* refactor draw model

* rebase master

* correct valid_len

* rename function

* rename variables

* white space

* rebase to master

* e16c13ac-927d-455e-ae0a-81b482a2c787

* start rewriting

* save proress

* compiles!

* oops

* many fixes

* seems to work

* fix desires

* finally cleaned

* wrong std for ll

* dont pulse none

* compiles!

* ready to test

* WIP does not compile

* compiles

* various fixes

* does something!

* full 3d

* not needed

* draw up to 100m

* fix segfault

* wrong sign

* fix flicker

* add road edges

* finish v2 packet

* Added pytorch supercombo

* fix rebase

* no more keras

* Hacky solution to the NCHW/NHWC incompatibility between SNPE and our frame data

* dont break dmonitoringd, final model 229e3ce1-7259-412b-85e6-cc646d70f1d8/430

* fix hack

* Revert "fix hack"

This reverts commit 5550fc01a7881d065a5eddbbb42dac55ef7ec36c.

* Removed axis permutation hack

* Folded padding layers into conv layers

* Removed the last pad layer from the dlc

* Revert "Removed the last pad layer from the dlc"

This reverts commit b85f24b9e1d04abf64e85901a7ff49e00d82020a.

* Revert "Folded padding layers into conv layers"

This reverts commit b8d1773e4e76dea481acebbfad6a6235fbb58463.

* vision model: 5034ac8b-5703-4a49-948b-11c064d10880/780  temporal model: 229e3ce1-7259-412b-85e6-cc646d70f1d8/430  with permute + pool opt

* fix ui drawing with clips

* ./compile_torch.py 5034ac8b-5703-4a49-948b-11c064d10880/780 dfcd2375-81d8-49df-95bf-1d2d6ad86010/450 with variable history length

* std::clamp

* not sure how this compiled before

* 2895ace6-a296-47ac-86e6-17ea800a74e5/550

* db090195-8810-42de-ab38-bb835d775d87/601

* 5m is very little

* onnx runner

* add onnxruntime to pipfile

* run in real time without using the whole CPU

* bump cereal;

* add stds

* set road edge opacity based on stddev

* don't access the model packet in paint

* convert mat.h to a c++ header file (#2499)

* update tests

* safety first

Co-authored-by: deanlee <deanlee3@gmail.com>
Co-authored-by: mitchell <mitchell@comma.ai>
Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: George Hotz <george@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-11-11 20:31:46 -08:00
HaraldSchafer f7d1ace883
Fix lane width (#2520)
* use prob modifiers in lane width calc

* update ref

* update ref
2020-11-10 21:12:36 -08:00