Commit Graph

342 Commits

Author SHA1 Message Date
Adeeb Shihadeh
abdcce3ad5 locationd: body support (#24098)
* body: locationd support

* fewer hacks

* my body is never still

* body on localizer

* minor change

* move wait back to 5 secs

* update refs

* try again

Co-authored-by: nuwandavek <vivekaithal44@gmail.com>
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 0b9790dd24d7824746aac42cd06f7fe3a331b3c2
2022-03-31 23:02:47 -07:00
Igor Biletskyy
df806cdbeb car port: comma body (#24019)
* body FPv2

* ..

* ..

* ..

* Temp, REVERT!

* more cleanup

* typo

* ..

* del eyes

* should work?

* fix

* new dbc

* ..

* fixes

* static analysis

* cln balancing code

* no test route

* excluded_interfaces

* THE DOCS!

* comments on steer/speed mixin

* switch to bus 0

* less UDS

* FAKE bus 0 vin and fingerprint

* FAKE locationd

* Keep steady and remove handcoded offset

* Improve startup sequence, get closer to stock openpilot

* Forgot to define angle

* lowercase

* revert that

* little cleanup

* change safety model

* update refs

* body is gold

* handle no llk

* oops

* litte more

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 031f79ba88c58f9fbc087df0a1e2ba5ddc3f80db
2022-03-31 17:16:15 -07:00
Adeeb Shihadeh
c319dfd924 controlsd: no cruise speed while main off (#24052)
* controlsd: no cruise speed while main off

* probably more accurate

* update refs
old-commit-hash: 49498aa7b5c7e5aed7a6ea767a0a9f10cb7dfdc7
2022-03-27 18:06:28 -07:00
HaraldSchafer
d42962014c CarParams: remove max steer (#24044)
* Remove max steer

* Update ref
old-commit-hash: adf34c3414642611bb2c62ed2ff65a006f9ad8ca
2022-03-25 17:33:11 -07:00
Shane Smiskol
2f05c9381d Honda Nidec: don't actuate while longitudinal is inactive (#24028)
* don't command any pcm_speed when long is not active

* update refs
old-commit-hash: c88ced1f10b939bf67fa63ca37adaf9adc39ee58
2022-03-23 18:30:05 -07:00
HaraldSchafer
b24d669861 Apply EU guideline lateral limits (#23974)
* Apply EU limits

* Lower bound v_ego

* Add curvature limit comment

* Remove comment

* Update ref
old-commit-hash: 4a8fffd0f45305cd1f1fd09e37bfb3cff508880b
2022-03-22 19:46:04 -07:00
HaraldSchafer
45b028e39a Add angular rates carcontroller packet (#23980)
* Controlsd: give carcontroller angular rates

* Update cereal

* Needs to be list

* Update refs
old-commit-hash: dcece099fff5def6c6d8feea6883ab0e0ee5b661
2022-03-16 21:12:11 -07:00
Shane Smiskol
ca394949cc 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 10bb51a0f0ee0d8e2a27c746a0638280a5eaea8a.

* Update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 5fe00fb7738358c19b7db907047353d8785b5f20
2022-03-15 20:51:07 -07:00
ZwX1616
e8a8e37185 DM: more precision running on DSP + e2e outputs (#23900)
* update cereal

* run but not use

* log distraction type

* regression scaling

* clean up naming

* add calib buf

* add to header

* fake model

* no calib model

* adjust threshs

* 018a305f

* fix bn

* tweak1

* tweak2

* 0ff2/666

* tweak3

* t4

* t5

* fix out of bound

* skip when replaying old segments

* update ref

* fix onnxmodel

* get calib

* update model replay refs

* up ref
old-commit-hash: de4031c98eac2d7151bb99b787e5d68193eee1b3
2022-03-15 19:02:21 -07:00
Vivek Aithal
069fe1a749 locationd: Commissue fix (#23951)
* check allAliveAndValid only at filter init

* revert cereal and bugfix test

* rename filterValid to filterInitialized

* bump cereal

* correct err

* update refs
old-commit-hash: dfc12926144df063fb6bd20a97bb4390a4f5a4ef
2022-03-15 14:40:29 -07:00
Adeeb Shihadeh
479ac5753c 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>
old-commit-hash: f1aab78d085c416f9dc56f4fdfd2e1f5eb9d4b4b
2022-03-13 21:45:23 -07:00
Shane Smiskol
3e61c7e6ae 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>
old-commit-hash: 629399a44925080b2c35b6dde35c093cc2e32035
2022-03-13 20:58:44 -07:00
Shane Smiskol
6303d97278 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
old-commit-hash: 274885fc4d6b1bffafa2b78e628f4fb3005ed52e
2022-03-03 05:23:14 -08:00
Jonathan Frey
0d5d9a43d3 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>
old-commit-hash: ab371f888a8ee0d309130bd56aba04ab84820921
2022-03-02 21:38:40 -08:00
Jonathan Frey
aa549592f7 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>
old-commit-hash: 1801baba68c752ee424338cf56bd36ba3ccf1565
2022-03-02 20:53:21 -08:00
Vivek Aithal
5bad0f4400 locationd, paramsd: Check conditions before updating kalman filters (#23789)
* update filters only when all messages are alivbe and valid

* update message valid and fix unit test

* update refs

* move check outside loop

* modify fake message fn in test

* deprecate inputsOK and resolve PR comments

* avoid double looped list comprehension

* follow import conventions

* modify paramsd valid to only be invalid in case of commIssue

* update refs
old-commit-hash: 7e6903b58f141b94d645f25c5e0ce15825b60075
2022-03-02 01:01:29 -08:00
Jonathan Frey
baab5d7a7b 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>
old-commit-hash: d09dffb7cd99aefb7e3c251265f2cfd9ae9e72f8
2022-02-25 14:16:44 -08:00
Adeeb Shihadeh
9bd6dbea43 Subaru: remove Impreza CAN fingerprints (#23841)
* Subaru: remove Impreza CAN fingerprints

* fix process replay

* update refs
old-commit-hash: 04b2545ec013d27e4022604101014f5cf9e6e43b
2022-02-23 15:44:17 -08:00
Willem Melching
dc16307917 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
old-commit-hash: 428d412c1f5480c527b296ed85185de34f5082c2
2022-02-21 16:14:41 +01:00
Shane Smiskol
1f5570a96d 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
old-commit-hash: 2c7845fce0be2bfa72a5d2429daa35fb735c154c
2022-02-18 00:45:00 -08:00
Willem Melching
849bbc8a2f process replay: fix branch name alert (#23783)
* env is modified after start

* update ref
old-commit-hash: 14260c01c6a91554a63377acfce504758af4d096
2022-02-17 16:47:42 +01:00
Adeeb Shihadeh
ddde46c503 keep the new alert consistent for process replay
old-commit-hash: f59adbeaaa4ac8634cba663fa39679f4af0c9325
2022-02-16 23:47:02 -08:00
Adeeb Shihadeh
693b66c1e0 add branch name to startup master alert (#23782)
* add branch name to startup master alert

* still orange

* update refs
old-commit-hash: ff965c772bd1bc85dec717d090cee4466033ce73
2022-02-16 20:27:07 -08:00
ClockeNessMnstr
c12656f397 Longitudinal: add Kf to carParams (#23752)
* sane_kf

* long_kf + cereal

* update ref

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 9535dc606dddfe6f0807e0b7b2e21867304e507a
2022-02-16 15:38:22 +01:00
Vivek Aithal
1329847be0 controlsd: Fix Toyota steer angle sensor race condition (#23747)
* fix steer angle race condition

* update ref

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 3e915cf628d24d04843730a9f5f664a20083291a
2022-02-11 13:54:17 +01:00
Vivek Aithal
1eb13fdc65 paramsd: fix VehicleModelInvalid errors (#23726)
* bound steerratio, stiffness std

* remove start steer_ratio limits after looking at data

* reduce sf obs noise

* update refs

* update refs

* add comment explaining change
old-commit-hash: 8a2cbfe00bffa82c7bd70a2b13c1ccf66f7271e0
2022-02-09 17:37:28 -08:00
Willem Melching
5a78f1d29c hide localizerMalfunction alert (#23730)
* hide localizerMalfunction alert

* update ref
old-commit-hash: 8effa2d8786b408222c504bed241426b9c8f6f0b
2022-02-08 22:22:03 -08:00
Adeeb Shihadeh
5d29eb6386 update refs
old-commit-hash: af33998335511413d4b782c6fea7ea25f561be09
2022-01-30 20:46:40 -08:00
Adeeb Shihadeh
97ea3c8ff2 controlsd: only add startup event until initialized (#23671)
* controlsd: only add startup event until initialized

* update refs

* update again
old-commit-hash: 602f92fc0e337ee5143dd2691f20fead68365b64
2022-01-30 20:38:05 -08:00
Adeeb Shihadeh
71da8d1250 No actuation while in pre-enabled state (#23658)
* No actuation while in pre-enabled state

* update refs
old-commit-hash: 72e00a07686fa112dde7928fa48ab4a56ed7a7f5
2022-01-28 16:03:44 -08:00
Shane Smiskol
fadba4b34d CANParser: remove default values (#23642)
* draft

* remove rest

* bump

* update radar interfaces

* do rest and formatting

* bump

* fix mising check

* try this

* Revert "try this"

This reverts commit 0d26d9a072f87dbc897ed525b70fb1db9cb04a06.

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 3645186d7cfcbe8889fed14caf5c51a0a84f14bb
2022-01-27 17:06:18 -08:00
Willem Melching
9f202e63f5 clip steer saturation counter to steerLimitTimer (#23638)
* clip steer saturation counter to steerLimitTimer

* update ref
old-commit-hash: ee71fd2fccdca9c311d7912f1fbaae6d50aac27a
2022-01-27 12:31:36 +01:00
Adeeb Shihadeh
c6e3e83a01 update refs
old-commit-hash: 013cccf6a8290a53d43a3ff780e9b7fb136fabde
2022-01-26 17:46:12 -08:00
Willem Melching
6101a6caca INDI: replace internal rate limit by actuatorsOutput (#23243)
* INDI: replace internal rate limit by actuatorsOutput

* update ref
old-commit-hash: cf9eee4272f4ea3c810c9caf4bbd220f04eb4af2
2022-01-26 17:45:05 +01:00
Shane Smiskol
beeb0442ce 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>
old-commit-hash: 9de8f8cd8c384596868edf3307da51819b28bb4b
2022-01-26 17:10:41 +01:00
Adeeb Shihadeh
badf4dff4f Toyota: move gas pedal definitions into common DBC (#23582)
* Toyota: move gas pedal definitions into common DBC

* add rest of cars

* auto detection

* cleanup

* update refs
old-commit-hash: b18c4eeb82f94a655c46e50750debcb37b49a598
2022-01-24 15:43:10 -08:00
Adeeb Shihadeh
70f1418256 remove community features toggle (#23214)
* remove community features toggle

* bump cereal

* little more

* update refs
old-commit-hash: 3e9cb7fa12b5f686fdcf6122ef5979d01c41f0a3
2022-01-24 14:49:47 -08:00
Willem Melching
962201fff1 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
old-commit-hash: d3d10e014a69f77d3f67c8d01100b03fde8ab034
2022-01-21 13:13:34 +01:00
Harald Schafer
490f9efc7d Update refs for PR:#23584)
old-commit-hash: 920829875f87956fe6d0441cc2fa3a81d366b77a
2022-01-20 14:24:36 -08:00
Jonathan Frey
6f4c93238f 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>
old-commit-hash: 06814748409bd8538edca1b2bcef66f15e1c3ab6
2022-01-18 09:49:48 -08:00
Vivek Aithal
e4c2c2cf2e use roll std from locationd (#23449)
* use roll std from locationd

* cleaner

* add todo

* new ref

Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
old-commit-hash: f808b174afbcc1fc6924d49fb0c32da5c02aad33
2022-01-12 21:37:09 -08:00
Shane Smiskol
d05c173fe6 Longcontrol: remove starting state (#23328)
* remove starting state

* new ref

* ready for merge

* try this

* cereal now on master

Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
old-commit-hash: cf9792dc536db343447cfa64edecc72565c4eefd
2022-01-04 15:40:39 -08:00
HaraldSchafer
c90287391a Controlsd: fix bug in curv rate limit (#23250)
* Controlsd: fix bug in curv rate limit

* update ref
old-commit-hash: d3f064f5ca2563ab139687550eb5d3139b6b8fea
2022-01-04 13:21:56 -08:00
Shane Smiskol
efd1ff1452 Longitudinal planner: make v_desired a FirstOrderFilter (#23341)
* make v_desired a FirstOrderFilter

* forgot one

* one more ref

* Add a new object for the filter

* fix

* fix tests

* update ref

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 9f88ba188a19cd90e8fee48353668dda7b47b2ba
2022-01-04 12:17:33 +01:00
HaraldSchafer
f64c2974b4 Road Roll Compensation Rebased (#23251)
* first commit

* update refs
old-commit-hash: cf466222f623df5fac325b86b71dc4e181b40d55
2021-12-16 17:34:12 -08:00
Willem Melching
7b3e330def 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
old-commit-hash: 4f1eb4278a83a3abebebef67a081961e27594d90
2021-12-16 13:08:20 +01:00
Harald Schafer
8d8b61e73f Update ref with minSpeedCAN removed
old-commit-hash: c25ed45437b7b216a3df528915c7cab56f09e198
2021-12-14 12:31:30 -08:00
ZwX1616
f464a02782 DM: more adaptive pose policy (#23184)
* rename and add dep

* proto thresholds

* tweak vk

* update natural offset and clip offsets

* 95th looks good

* no punish for being relaxed

* yaw laplace only

* some pay more attention

* update ref

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: af5a418fa65347fb9215ce28c86c85cd3c4d9b0a
2021-12-14 12:13:59 -08:00
Adeeb Shihadeh
0c76321224 update refs
old-commit-hash: af125f3c5124bd44ceb999a8cabcc7bea20dc7fe
2021-12-12 13:49:14 -08:00
Adeeb Shihadeh
700ad9ec50 alerts: handle min duration properly (#23191)
* alerts: handle min duration properly

* add active

* tests

* cleanup test

* update refs
old-commit-hash: 07b971d4735d891cc59f404095812f5d001b3092
2021-12-10 19:20:07 -08:00