Commit Graph

172 Commits

Author SHA1 Message Date
HaraldSchafer
cf466222f6 Road Roll Compensation Rebased (#23251)
* first commit

* update refs
2021-12-16 17:34:12 -08:00
Willem Melching
4f1eb4278a Log actuators after applying rate limits in CarController (#23230)
* return actuators from carcontroller

* log it

* pass to latcontrol

* chrysler

* gm

* honda

* more brands

* rest of the brands

* gm cleanup

* hyundai cleanup

* update ref

* rename field

* fix subaru

* add types

* more subaru fixes #23240

* consistent whitespace

* bump cereal
2021-12-16 13:08:20 +01:00
Adeeb Shihadeh
7f618b16bf increase cruise mismatch threshold 2021-12-12 13:35:12 -08:00
Adeeb Shihadeh
8068df0b2a alerts: escalate soft disable alert near disengagement (#23198)
* alerts: escalate soft disable alert if resulted in disengagement

* show 0.5s before disengagement
2021-12-11 17:07:37 -08:00
Adeeb Shihadeh
07b971d473 alerts: handle min duration properly (#23191)
* alerts: handle min duration properly

* add active

* tests

* cleanup test

* update refs
2021-12-10 19:20:07 -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
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
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
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
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
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
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
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
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
Adeeb Shihadeh
74a3c92704 only check low battery on EON 2021-10-15 15:04:19 -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
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
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
Willem Melching
88d248a5af Remove fuzzy fingerprint startup alert (#22328)
* deprecate fuzzy fingerprint startup alert

* bump cereal
2021-09-23 17:15:33 -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
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
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
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
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
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
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
Adeeb Shihadeh
8aafbc78f6 add that back 2021-08-06 15:48:16 -07:00
Adeeb Shihadeh
03255d83be increase controls initializing timeout a bit 2021-07-28 15:50:40 -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
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
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
Adeeb Shihadeh
c72d163e14 deprecate CP.enableCamera (#21509)
* deprecate CP.enableCamera

* more removal

* one more

* update refs
2021-07-07 14:59:18 -07:00