Commit Graph

524 Commits (master)

Author SHA1 Message Date
HaraldSchafer adf34c3414
CarParams: remove max steer (#24044)
* Remove max steer

* Update ref
2022-03-25 17:33:11 -07:00
Shane Smiskol e91613bc62
update unsafeMode to alternativeExperience (#23995)
* update unsafeMode to alternativeExperience

* fix

* fix

* bump submodules

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-03-24 14:59:16 -07:00
HaraldSchafer 4a8fffd0f4
Apply EU guideline lateral limits (#23974)
* Apply EU limits

* Lower bound v_ego

* Add curvature limit comment

* Remove comment

* Update ref
2022-03-22 19:46:04 -07:00
Adeeb Shihadeh a6d4bb5d01
Add warning for unsupported NVME (#23972)
* Add warning for unsupported NVME

* fix it up

* fix typo

Co-authored-by: Comma Device <device@comma.ai>
2022-03-20 17:28:09 -07:00
HaraldSchafer dcece099ff
Add angular rates carcontroller packet (#23980)
* Controlsd: give carcontroller angular rates

* Update cereal

* Needs to be list

* Update refs
2022-03-16 21:12:11 -07:00
Shane Smiskol 5fe00fb773
Move gas/brake pedal event logic to controlsd (#23850)
* move some state machine logic to controlsd

move some state machine logic to controlsd

* same order

same order

* move unsafeMode up

* disable at standstill

* save last CS

save last CS

* do we need to copy at all?

* don't copy

* rename

* Update selfdrive/controls/controlsd.py

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

* Revert "Update selfdrive/controls/controlsd.py"

This reverts commit 10bb51a0f0.

* Update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-03-15 20:51:07 -07:00
Gregor Kikelj 08c2d066cf
Improve style in drive_helpers (#23962) 2022-03-14 14:03:28 -07:00
Adeeb Shihadeh f1aab78d08
longitudinal MPC: add MAX_T in T_IDXS_LST (#23960)
* longitudinal MPC: add MAX_T in T_IDXS_LST

* update refs

Co-authored-by: KexianShen <shenkexian@gmail.com>
2022-03-13 21:45:23 -07:00
Adeeb Shihadeh 5c3f3e44bc
break up selfdrive.config (#23959)
* break up selfdrive.config

* add to release files

* fix import order
2022-03-13 21:42:39 -07:00
Shane Smiskol 629399a449
carControl: add long and lat active fields (#23859)
* proof of concept

* actuators packet describes which actuators are active

* bump cereal

* fixes

* not needed for this PR

* Do Toyota

* add back controlsState.active

* bump cereal

* rest of cars

* in actuators

* add active back

* which

* use controlsState.active for now

* will make an issue

* Update selfdrive/controls/controlsd.py

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

* move local lat_active checks into CC.latActive

* remove redundant checks

* move comment

move comment

* fix joystick mode

* get enabled from carcontrol

* do standstill check in controlsd

* make sure we consider the gas press case for GM

* use CC.actuators

* fix

* capitalization

* Bump cereal

Bump cereal

* make intermediate actuators

* similar convention to before

* clean that up

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-03-13 20:58:44 -07:00
Jonathan Frey d653dd843a
Upstreamed and update acados (#23927)
* change acados version to finalized PR https://github.com/acados/acados/pull/791

* acados: update include and x86_64 build

* acados: update pyextra

* adapt mpc files to updated acados

* acados buid: clear acados_template and include dir before updating

* update acados again

* acados MPC: only generate solver, building is done via scons

* update acados to latest acados/master

* c3 libs

* c2 libs

* acados scons files: add acados build script as a dependency

* acados scons files: add libacados.so and ocp_nlp_interface.h, build script not in files_common

* update acados

* adapts long & lat MPC file

* update acados reference commit to acados/master

Co-authored-by: Comma Device <device@comma.ai>
2022-03-11 11:49:27 +01:00
Willem Melching 37a8b09cad
lower model FCW + stock longitudinal threshold to -1.25m/s^2 (#23915) 2022-03-07 10:42:07 +01:00
Shane Smiskol 274885fc4d
controlsd: fix vCruise jumping on pcmCruise cars (#23388)
* clean up v_cruise_kph

fix

fix

* Revert "clean up v_cruise_kph"

This reverts commit 211b5c3dbe073414ef5c39b19d6d2c6e8de2cf0b.

* always update vCruise and don't init if pcmCruise

* revert change

* update refs
2022-03-03 05:23:14 -08:00
Shane Smiskol 7254db3906
LongControl: fix control state oscillation (#23333)
* check if plan is to accelerate or not

* remove comment

* needed to see it

needed to see it

* test logic with Toyota TSS2

* hackily log conditions

* Revert "hackily log conditions"

This reverts commit 7a6b5691e2b982c7a1e3911d980fb7530647affd.

Revert "test logic with Toyota TSS2"

This reverts commit e583d6e3caaa5f5b896165cd7949dfc1caabfd9a.

order

* revert

* fix
2022-03-03 03:27:24 -08:00
Jonathan Frey ab371f888a
Longitudinal MPC set qp tolerance to 1e-3 (#23899)
* initialize solverExecutionTime longitudinal_planner

* test_onroad: improve timing evaluation

* longitudinal MPC: set qp_tol to 1e-3

* update ref

Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
2022-03-02 21:38:40 -08:00
Jonathan Frey 1801baba68
remove trivial terminal constraint and associated CasADi generated functions (#23898)
* remove trivial terminal constraint and associated CasADi generated functions

* Update refs

Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
2022-03-02 20:53:21 -08:00
Adeeb Shihadeh 87849f93b1
better steer fault names (#23890)
* better steer fault names

* bump cereal
2022-03-01 22:53:55 -08:00
Jonathan Frey d09dffb7cd
Cython acados and minor (#23835)
* acados_ocp_solver_pyx.pyx: implement get_stats for timings and ints

* long_mpc: use acados timers

* acados_ocp_solver_pyx.pyx: fix dynamics_get

* acados_ocp_solver_pyx.pyx: get statistics

* use acados_ocp_solver_pyx.pyx from commaai/cython2 branch

* acados_ocp_solver_pyx.pyx: implement store_iterate

* acados_ocp_solver_pyx.pyx: implement get_residuals

* acados_ocp_solver_pyx.pyx: fix set() for empty fields

* acados_ocp_solver_pyx.pyx: load_iterate

* cython acados: add print_statistics

* test_following_distance: fix typo

* test_longitudinal: unique names for test maneuvers

* longitudinal MPC: comments for evaluation

* longitudinal MPC: add comments to eval acados residuals

* long_mpc: use qp_solver_cond_N = 1

* long MPC: comments, simplify set_cur_state

* update acados version in build script

* longitudinal mpc: weigh a_change in 1 place only

* update ref

* Update ref

Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
2022-02-25 14:16:44 -08:00
martinl 160a8cfd58
Remove unused MPC_COST_LONG class (#23843) 2022-02-23 17:26:05 -08:00
Willem Melching 428d412c1f
longitudinal planner: disable change cost when stopped. not engaged or gas pressed (#23639)
* disable change cost completely on standstill and gas press

* cleanup

* set accel to zero

* clean up logic around standstill

* update ref
2022-02-21 16:14:41 +01:00
ClockeNessMnstr f0b3593682
cleanup import chaining of T_IDXS (#23806) 2022-02-20 17:03:01 -08:00
Willem Melching 85efde269d
bigmodel (#23684)
* Added wide cam vipc client and bigmodel transform logic

* Added wide_frame to ModelState, should still work normally

* Refactored image input into addImage method, should still work normally

* Updated thneed/compile.cc

* Bigmodel, untested: 44f83118-b375-4d4c-ae12-2017124f0cf4/200

* Have to initialize extra buffer in SNPEModel

* Default paramater value in the wrong place I think

* Move USE_EXTRA to SConscript

* New model: 6c34d59a-acc3-4877-84bd-904c10745ba6/250

* move use extra check to runtime, not on C2

* this is always true

* more C2 checks

* log if frames are out of sync

* more logging on no frame

* store in pointer

* print sof

* add sync logic

* log based on sof difference as well

* keep both models

* less assumptions

* define above thneed

* typo

* simplify

* no need for second client is main is already wide

* more comments update

* no optional reference

* more logging to debug lags

* add to release files

* both defines

* New model: 6831a77f-2574-4bfb-8077-79b0972a2771/950

* Path offset no longer relevant

* Remove duplicate execute

* Moved bigmodel back to big_supercombo.dlc

* add wide vipc stream

* Tici must be tici

* Needs state too

* add wide cam support to model replay

* handle syncing better

* ugh, c2

* print that

* handle ecam lag

* skip first one

* so close

* update refs

Co-authored-by: mitchellgoffpc <mitchellgoffpc@gmail.com>
Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Comma Device <device@comma.ai>
2022-02-19 16:06:31 -08:00
Shane Smiskol 2c7845fce0
Longitudinal control: interpolate longitudinal plan (#23787)
* interpolate longitudinal actuator delay

rename

* formatting

* interpolate v_target most importantly!

* fix interpolation and rename

* nicer setup

* left in from testing

* update refs
2022-02-18 00:45:00 -08:00
Willem Melching 14260c01c6
process replay: fix branch name alert (#23783)
* env is modified after start

* update ref
2022-02-17 16:47:42 +01:00
Adeeb Shihadeh f59adbeaaa keep the new alert consistent for process replay 2022-02-16 23:47:02 -08:00
Adeeb Shihadeh ff965c772b
add branch name to startup master alert (#23782)
* add branch name to startup master alert

* still orange

* update refs
2022-02-16 20:27:07 -08:00
ClockeNessMnstr 9535dc606d
Longitudinal: add Kf to carParams (#23752)
* sane_kf

* long_kf + cereal

* update ref

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2022-02-16 15:38:22 +01:00
Willem Melching 8effa2d878
hide localizerMalfunction alert (#23730)
* hide localizerMalfunction alert

* update ref
2022-02-08 22:22:03 -08:00
Dean Lee 414d4cae78
radard.py: remove trailing space (#23703) 2022-02-03 15:43:00 -08:00
Adeeb Shihadeh e6d8a84578 for those who want to live in the moment 2022-01-31 14:30:40 -08:00
Jafar Al-Gharaibeh 1c31c9b7a3
Mazda: alert when LKAS is disabled (#23288)
* Mazda: alert when LKAS is disabled

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

* update refs

* revert that

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-01-30 21:04:07 -08:00
Adeeb Shihadeh 602f92fc0e
controlsd: only add startup event until initialized (#23671)
* controlsd: only add startup event until initialized

* update refs

* update again
2022-01-30 20:38:05 -08:00
Willem Melching ee71fd2fcc
clip steer saturation counter to steerLimitTimer (#23638)
* clip steer saturation counter to steerLimitTimer

* update ref
2022-01-27 12:31:36 +01:00
Willem Melching cf9eee4272
INDI: replace internal rate limit by actuatorsOutput (#23243)
* INDI: replace internal rate limit by actuatorsOutput

* update ref
2022-01-26 17:45:05 +01:00
Shane Smiskol 9de8f8cd8c
base LatControl class (#21967)
* base LatControl class, move sat check out of pid.py

clean up

clean up

* fix

* global variable for min control speed

* nicer name

* unify latcontrol class init arguments

* add to release files

* saturated if close to limit

* move angle mode saturation checks into class

* check_saturation function takes in current saturated status

undo

* apply latcontrol_angle's active checking to all controllers

* clean up

* move those back

* make abstract baseclass

* add test for saturation

* keep clip

* update ref

* fix static analysis

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2022-01-26 17:10:41 +01:00
Shane Smiskol 6be70a063d
LateralPlanner: Move lane change logic to another class (#23476)
* should work

* Revert "should work"

This reverts commit dabc2ea17a072a6c835e4bd1c75a2c1e2d10623d.

* move lane change logic to DesireHelper class

* clean up desires

clean up desires

* comments

* Revert "clean up desires"

This reverts commit 7301c921e305fcbd4746b19040631d935d50dfd9.

* Update selfdrive/controls/lib/desire_helper.py

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

* add to files_common

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
2022-01-25 13:40:03 +01:00
Shane Smiskol 31d147dca2
controlsd: verify unsafe mode consistency (#23563)
* add unsafe mode check to controlsd

bump submodules

forgot to add to health_t struct

bump

ahh forgot to set it!

bump

bump

clean up

clean up

bump

* fix ordering

* move to end

* unsigned

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2022-01-25 12:09:13 +01:00
Adeeb Shihadeh e50efd7671 controlsd: remove redundant condition 2022-01-24 21:28:30 -08:00
Adeeb Shihadeh 3e9cb7fa12
remove community features toggle (#23214)
* remove community features toggle

* bump cereal

* little more

* update refs
2022-01-24 14:49:47 -08:00
Willem Melching d3d10e014a
Ensure controlsd can engage again in process replay (#23556)
* hacks to make process replay engage again

* dont change that

* enable engagement check again

* chmod +x

* first working regen

* proper logMonoTime

* fix video framerate consistency

* mpc is valid again

* proper alive checks

* revert loggerd change

* ensure engaged in regen, fix managerState, peripheralState

* ubloxRaw is unused

* add submaster config for gm

* regen all services we can run without HW

* fix loggerd

* loggerd: matroska without the extension

* update ref
2022-01-21 13:13:34 +01:00
Jonathan Frey 0681474840
work on acados lateral MPC (#23558)
* lat_mpc: make v_ego, rotation_radius parameters instead of states

* lat_mpc: remove rotation_radius argument, since it is part of the parameters

* lat_mpc: use qp_solver_cond_N = 1

slightly faster and in line with case study in Fig. 2/ 3 in Frison2016 - https://cdn.syscop.de/publications/Frison2016.pdf
An Efficient Implementation of Partial Condensing for Nonlinear Model Predictive Control

* adapt test_lateral_mpc to formulation with parameters

* lat_mpc: set parameters in reset() and copy values

* acados_ocp_solver_pyx: make options_set useable

* update ref

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2022-01-18 09:49:48 -08:00
Willem Melching f76328b426
Log MPC solver time (#23566)
* add solve time to plan output

* add to process replay ignore list

* print in CI
2022-01-18 14:51:03 +01:00
Adeeb Shihadeh 59894a6666
clear no entry alerts if engaged (#23559)
* clear no entry alerts if engaged

* fix test
2022-01-17 13:57:53 -08:00
Dean Lee 5cd103c3d4
controlsd: remove extra space (#23553) 2022-01-17 13:51:44 +01:00
Adeeb Shihadeh c6b892fe58 shutdownd is non essential 2022-01-14 11:59:04 -08:00
Dean Lee fd042a5924
controlsd: cleanup parsing android log (#23421)
* cleanup parse android log

* global CSID_MAP

* use generator express

* cleanup

* no walrus

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-01-13 19:43:22 -08:00
Dean Lee 48b6dfa15d
controlsd: check self.enabled out of the any() (#23507) 2022-01-13 11:53:04 +01:00
Dean Lee dbae5e7601
lateral_planner: use nympy.isnan().any() (#23500) 2022-01-12 15:56:41 +01:00
Dean Lee a186bcc9f1
cleanup iterate keys in dictionaries (#23497) 2022-01-12 12:42:50 +01:00
Dean Lee 678732d0ce
AlertManager: cleanup add_many (#23438) 2022-01-11 14:16:52 -08:00