Commit Graph

507 Commits

Author SHA1 Message Date
Jason Young
cb88b3ed65 controlsd: set latActive with max minimum steer speed (#26805)
* refactor minimum lateral speed handling

* rename for clarity

* simplify without joystick at standstill

* intermediate standstill variable, check notCar

* check joystick for now

* cmt

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-01-10 20:51:10 -08:00
Shane Smiskol
b45dda2d0a Longitudinal tests: test forceDecel (#26765)
* test with forceDecel

* test all combos

* fix

* fix

* fix

* ...

* remove print

* clean up

* just set cruise to 0

* update ref commit

Co-authored-by: Bruce Wayne <harald.the.engineer@gmail.com>
2023-01-10 14:46:43 -08:00
Shane Smiskol
4e9bddee5c longcontrol: enter stopping state immediately (#26879)
* enter stopping state immediately

* Update selfdrive/controls/lib/longcontrol.py
2023-01-10 13:02:43 -08:00
Adeeb Shihadeh
cd8e03d53e move all third party stuff into third_party/ (#26853)
* mv fastcluster

* move msm_kgsl.h

* camerad include

* update path

* mv pyextra

* fix tici build

* add acados_template to release build

Co-authored-by: Comma Device <device@comma.ai>
2022-12-31 21:00:50 -08:00
Shane Smiskol
9e9600a4f4 Events: actionable accFaulted alert text (#26783)
same alert text as steer and brake unavailable
2022-12-13 00:16:36 -08:00
Shane Smiskol
2545dd195e alert: smaller standstill alert (#26751)
smaller standstill alert
2022-12-09 23:30:41 -08:00
Shane Smiskol
84340f07ab LatControlAngle: fix setting saturation check speed (#26752)
set in init function
2022-12-09 23:29:56 -08:00
Shane Smiskol
d5ffb90a04 LatControlAngle: lower saturation check speed (#26749)
lower speed for angle
2022-12-09 21:43:55 -08:00
Shane Smiskol
c1b3d696bc controlsd: set steer_limited for angle cars (#26748)
* Set steer limited for angle cars

* closer to torque threshold
2022-12-09 21:43:27 -08:00
Shane Smiskol
e6fcc2d6aa planner: read experimental mode from controlsState (#26553)
read from controlsState
2022-12-05 13:58:15 -08:00
Shane Smiskol
5409895ab2 Deprecate noTarget event (#26638)
deprecate notarget
2022-11-30 02:32:47 -08:00
Shane Smiskol
dbe512d167 controlsd: preEnable on brake at a standstill (#26273)
* pre-enable on brake at standstill

* test by getting rid of noTarget

* Update events.py

* rename

* stash what we got so far

* cmt

* not sure if best way to fix, but enabled with current states defs is fine

* no noEntry in preEnabled

* bumpcereal

* uncomment

* Update ref_commit

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-11-29 17:34:10 -08:00
Vivek Aithal
3a4f19f0ee [controlsd] Refactor apply_deadzone in Lateral Torque Control (#26626)
rename apply_slack to apply_center_deadzone, remove unused prius offline values
2022-11-29 12:46:08 -08:00
Vivek Aithal
0706b03e8c [controlsd] Toyota Prius 2017 (#26455)
* increase lag on prius

* better offline values computation

* split prius ecu more, set deadzone to 0

* add deadzone back

* replace deadzone with slack

* reduce deadzone to 0.2

* update refs
2022-11-29 10:47:13 -08:00
Shane Smiskol
3253b85900 Toyota: alert when in standstill (#26585)
* add resume required alert

* possibly need this (pressing resume with brake held does nothing)

* better text (has both meanings)

* try this

* Revert "try this"

This reverts commit 5b2991929b62f5bcd9bfa0767d709b5fe83b094b.

* no alert with interceptor

* check long
2022-11-25 16:00:58 -08:00
Shane Smiskol
a19b5b91d2 longcontrol: ignore cruise standstill if interceptor (#26597)
* ignore standstill

* cmt

* standstill

* rm cmt

* flip
2022-11-24 18:17:36 -08:00
Adeeb Shihadeh
65fa87a969 cleanup panda types everywhere (#26574)
* cleanup panda types everywhere

* one more
2022-11-21 23:43:24 -08:00
Shane Smiskol
23a7a987f6 controlsd: add test around cruise speed gas pressed behavior (#26486)
* test

* test

* debug

* test

* test

* test

* clean up

* clean up

* add test

* stash

* clean up

* clean up

* clean up

* assert equal
2022-11-21 17:05:13 -08:00
YassineYousfi
ded66e6307 long_mpc: fix e2e source condition (#26546)
* fix long_mpc source param

* rm print

* add back space for formatting
2022-11-21 15:25:23 -08:00
Shane Smiskol
f15d169289 controlsd cruise speed: fix missing initial value 2022-11-14 11:01:01 -08:00
Shane Smiskol
e46063086f controlsd: no speed increment if enabled on button rising edge (#26490)
* don't increment speed if we enabled on rising edge

* more realistic test
2022-11-13 16:34:26 -08:00
Shane Smiskol
870b798185 controlsd: clean up v_cruise updating (#26479)
* clean up

* clean up

* clean up
2022-11-11 23:56:35 -08:00
Shane Smiskol
d3f971b365 controlsd v_cruise: fix unknown buttons (#26474)
Fix button being None
2022-11-11 20:10:12 -08:00
Shane Smiskol
76ac3d4c99 controlsd: resume does not increment speed while cruise standstill (#25470)
* fix runaway set speed for GM

* fix runaway set speed for GM

* Handle resuming to exit standstill generically

* clean that up

* ugh i want to fix all the formatting

* class that manages v_cruise

* better name

* move around

* add depressed_state

* fine to update on pressed change, better name

* cmt

* we need to check CS. button_change_state only works if we exit standstill on rising edge not falling edge

* no defaultdict
2022-11-11 19:43:30 -08:00
Shane Smiskol
811c096e64 controlsd: add cruise speed helper class (#26472)
* fix runaway set speed for GM

* fix runaway set speed for GM

* Handle resuming to exit standstill generically

* clean that up

* ugh i want to fix all the formatting

* class that manages v_cruise

* better name

* move around

* add depressed_state

* fine to update on pressed change, better name

* revert gm stuff

* revert standstill stuff

* remove

* revert that

* we can put this in here now!

* below update

* actually only used here

* one line
2022-11-11 18:53:48 -08:00
Shane Smiskol
89b88fc7a2 Hyundai: fix button enable controls mismatch (#26471)
* bump panda

* buttonCancel needs to be a noEntry

* bompo

* Update ref_commit
2022-11-11 14:49:38 -08:00
Shane Smiskol
9f80a97eee longitudinal tests: add disabled maneuver (#26470)
* undeclared variable

* run first second disabled

* only test

* test disabled as a new maneuver

* bottom
2022-11-11 14:02:09 -08:00
Shane Smiskol
98206fb92e planner: fix undeclared variable (#26468)
* undeclared variable

* run first second disabled

* revert test

* rev
2022-11-11 13:22:56 -08:00
Harald Schäfer
f23296bc87 Add force decel to e2e long (#26448)
* add force decel to e2e

* Update longitudinal_planner.py
2022-11-11 10:46:03 -05:00
YassineYousfi
7374080668 min lane change speed 20mph (#26434) 2022-11-09 22:04:57 -08:00
Adeeb Shihadeh
9a3f468051 experimental mode (#26416)
* experimental mode

* rename param

* red lights
2022-11-08 14:45:01 -08:00
Harald Schäfer
f63f0de80a E2e long model: calibrate model speed to wheel speed (#26395)
* calibrate!

* Fix test

* Fix proc replay

* check len

* get v_ego from model 8501d20-bb59-4193-aa82-82b2737dedd6/449 609d90f3-65e6-4617-a60c-d6d99eead408/700

* bump cereal

* initialize v_model_error

* typo

* better names

* cleanup

* bump cereal

* update model replay ref commit

* bump to cereal master

Co-authored-by: Yassine Yousfi <yyousfi1@binghamton.edu>
2022-11-07 17:49:36 -08:00
Vivek Aithal
e9eb5d99ff [torqued] Fix high speed oscillations (#26338)
* modify low speed factor during high speeds and rescale friction

* update refs
2022-11-07 17:01:24 -08:00
Harald Schäfer
253e5d7f9d FCW: less false positives (#26366)
* Less FP for FCW

* enable fcw for e2e long
2022-11-06 12:17:07 -08:00
Harald Schäfer
a7ced7c54b Longcontrol: faster transition from starting to stopping (#26361)
* Never command accel when stopping

* Update ref_commit
2022-11-04 13:21:34 -07:00
HaraldSchafer
f76a390daf Eliminate toyota close radar glitches causing no resume (#26272)
Eliminate toyota close radar glitches
2022-10-27 17:31:15 -07:00
HaraldSchafer
b80f2efdf2 No fcw when standstill (#26252) 2022-10-26 14:53:01 -07:00
HaraldSchafer
dcde942d9f Long control: add a_change cost in e2e mode (#26237)
Add e2e cost
2022-10-25 16:53:24 -07:00
HaraldSchafer
4f84b29985 Use same minimum speed for lateral planning and controls (#26177)
* Use same speed for lag adjustmenet

* One is a nicer number

* Update ref
2022-10-20 14:34:36 -07:00
Shane Smiskol
b1efdab788 Rename gmAccFaultedTemp -> accFaultedTemp 2022-10-19 01:31:12 -07:00
HaraldSchafer
1548db8962 Partial revert, lax torque control (#26146)
* Closer to original

* Update ref
2022-10-18 21:25:06 -07:00
Shane Smiskol
4e82f68de2 GM camera ACC: prevent fault when engaging at a stop (#26079)
* prevent bolt fault

* comment

* only for camera ACC

* fixup alert

* bump cereal to master

* use new name

* Update selfdrive/car/gm/interface.py

* Update selfdrive/car/gm/interface.py

* Update selfdrive/car/gm/interface.py

* only care about prevent engagement when we look at PCM
2022-10-14 22:21:53 -07:00
HaraldSchafer
2c9b150761 Low speed lateral like before (#26022)
* Add explicit cost on steering wheel movement

* Laxer low speed control

* Laxer low speed control

* Lower min speed now there is a cost

* 3m/s

* Similar to old master

* Add cost

* Crazy high

* Update ref

* comment
2022-10-11 14:53:43 -07:00
HaraldSchafer
fb07437819 Increase low speed jerk cost (#26008)
* Increase low speed jerk cost

* Update planner weight

* Update ref_commit

* Update lateral_planner.py

* cleanup and refactor

* Update ref_commit
2022-10-07 19:15:04 -07:00
HaraldSchafer
1ecf6f351c Divide by 0 bug fix lateral planner (#25995)
* Divide by speed correctly

* Update

* Update lateral_planner.py

* Update ref_commit
2022-10-07 00:16:18 -07:00
HaraldSchafer
cb0b7375b7 Rocket Launcher Model (#25963)
* 1456d261-d232-4654-8885-4d9fde883894/440 6b7d7cec-ead8-40f3-86cc-86d52c9b03fe/300

* compute only 9 tokens: 1456d261-d232-4654-8885-4d9fde883894/440 6b7d7cec-ead8-40f3-86cc-86d52c9b03fe/300

* tinygrad: cleanup gather

* 1456d261-d232-4654-8885-4d9fde883894/440 6b7d7cec-ead8-40f3-86cc-86d52c9b03fe/700

* empty commit for tests

* bump tinygrad

* dont use tinygrad matmul for now

* bump tinygrad

* 1456d261-d232-4654-8885-4d9fde883894/440 e63ab895-2222-4abd-a9a5-af86bb70e260/700

* float16 1456d261-d232-4654-8885-4d9fde883894/440 e63ab895-2222-4abd-a9a5-af86bb70e260/700

* increase steer rate cost

* Revert "increase steer rate cost"

This reverts commit 74ce9ab9be7ef17ecfec931f96851b12f37f2336.

* fork tinygrad

* empty commit for tests

* basics

* Kinda works

* new lat

* new tuning

* Move LATMPCN so scons compiles

* Update long weights

* Add tinygrad optim

* Update model ref

* update weights

* Update ref

* Try

* Error message for field ignore

* update model regf

* ref commit

* Fix onnx test

Co-authored-by: Yassine Yousfi <yyousfi1@binghamton.edu>
2022-10-05 21:43:38 -07:00
HaraldSchafer
e5d2c3ce7a Planner cleanup (#25969) 2022-10-04 21:19:04 -07:00
Shane Smiskol
84adb8d925 GM: raise max brake (#25810)
* -4 didn't make any sense?

* comments

* comments

* update to 400

* bump panda

* remove unused iso limit vars

* update comments

* bump panda

* Update selfdrive/car/gm/values.py

* Update ref_commit
2022-10-04 00:39:19 -07:00
Shane Smiskol
4bd146ee7a Longitudinal planner: clip a_desired to cruise limits (#25928)
* Clip a_desired to cruise limits

* Update selfdrive/controls/lib/longitudinal_planner.py

* fix

* update refs

* explicit
2022-09-30 15:43:04 -07:00
Lee Jong Mun
7df0e3efcf remove blank whitespace (#25921) 2022-09-29 13:52:41 -07:00