Commit Graph

575 Commits

Author SHA1 Message Date
Shane Smiskol
634a6c9802 Deprecate noTarget event (#26638)
deprecate notarget
old-commit-hash: 5409895ab2
2022-11-30 02:32:47 -08:00
Shane Smiskol
d1dee4625a 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>
old-commit-hash: dbe512d167
2022-11-29 17:34:10 -08:00
Vivek Aithal
238e63bc2a [controlsd] Refactor apply_deadzone in Lateral Torque Control (#26626)
rename apply_slack to apply_center_deadzone, remove unused prius offline values
old-commit-hash: 3a4f19f0ee
2022-11-29 12:46:08 -08:00
Vivek Aithal
5bc529bf20 [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
old-commit-hash: 0706b03e8c
2022-11-29 10:47:13 -08:00
Shane Smiskol
bcdbd8edb9 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
old-commit-hash: 3253b85900
2022-11-25 16:00:58 -08:00
Shane Smiskol
db8028fa63 longcontrol: ignore cruise standstill if interceptor (#26597)
* ignore standstill

* cmt

* standstill

* rm cmt

* flip
old-commit-hash: a19b5b91d2
2022-11-24 18:17:36 -08:00
Adeeb Shihadeh
7c96e7876a cleanup panda types everywhere (#26574)
* cleanup panda types everywhere

* one more
old-commit-hash: 65fa87a969
2022-11-21 23:43:24 -08:00
Shane Smiskol
b94dfd81c6 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
old-commit-hash: 23a7a987f6
2022-11-21 17:05:13 -08:00
YassineYousfi
7d5a2309a7 long_mpc: fix e2e source condition (#26546)
* fix long_mpc source param

* rm print

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

* more realistic test
old-commit-hash: e46063086f
2022-11-13 16:34:26 -08:00
Shane Smiskol
0f3aeb531c controlsd: clean up v_cruise updating (#26479)
* clean up

* clean up

* clean up
old-commit-hash: 870b798185
2022-11-11 23:56:35 -08:00
Shane Smiskol
dd6f16fcfd controlsd v_cruise: fix unknown buttons (#26474)
Fix button being None
old-commit-hash: d3f971b365
2022-11-11 20:10:12 -08:00
Shane Smiskol
0371e47fac 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
old-commit-hash: 76ac3d4c99
2022-11-11 19:43:30 -08:00
Shane Smiskol
a7828e1ae3 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
old-commit-hash: 811c096e64
2022-11-11 18:53:48 -08:00
Shane Smiskol
054cb1f8c1 Hyundai: fix button enable controls mismatch (#26471)
* bump panda

* buttonCancel needs to be a noEntry

* bompo

* Update ref_commit
old-commit-hash: 89b88fc7a2
2022-11-11 14:49:38 -08:00
Shane Smiskol
400b36a57f longitudinal tests: add disabled maneuver (#26470)
* undeclared variable

* run first second disabled

* only test

* test disabled as a new maneuver

* bottom
old-commit-hash: 9f80a97eee
2022-11-11 14:02:09 -08:00
Shane Smiskol
3fb09283a6 planner: fix undeclared variable (#26468)
* undeclared variable

* run first second disabled

* revert test

* rev
old-commit-hash: 98206fb92e
2022-11-11 13:22:56 -08:00
Harald Schäfer
dfd47a5f4d Add force decel to e2e long (#26448)
* add force decel to e2e

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

* rename param

* red lights
old-commit-hash: 9a3f468051
2022-11-08 14:45:01 -08:00
Harald Schäfer
f86b44d516 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>
old-commit-hash: f63f0de80a
2022-11-07 17:49:36 -08:00
Vivek Aithal
3029919422 [torqued] Fix high speed oscillations (#26338)
* modify low speed factor during high speeds and rescale friction

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

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

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

* One is a nicer number

* Update ref
old-commit-hash: 4f84b29985
2022-10-20 14:34:36 -07:00
Shane Smiskol
70249fae14 Rename gmAccFaultedTemp -> accFaultedTemp
old-commit-hash: b1efdab788
2022-10-19 01:31:12 -07:00
HaraldSchafer
9c26b70a43 Partial revert, lax torque control (#26146)
* Closer to original

* Update ref
old-commit-hash: 1548db8962
2022-10-18 21:25:06 -07:00
Shane Smiskol
961c613005 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
old-commit-hash: 4e82f68de2
2022-10-14 22:21:53 -07:00
HaraldSchafer
f9b65f9189 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
old-commit-hash: 2c9b150761
2022-10-11 14:53:43 -07:00
HaraldSchafer
a13f2deeeb 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
old-commit-hash: fb07437819
2022-10-07 19:15:04 -07:00
HaraldSchafer
3488569ac3 Divide by 0 bug fix lateral planner (#25995)
* Divide by speed correctly

* Update

* Update lateral_planner.py

* Update ref_commit
old-commit-hash: 1ecf6f351c
2022-10-07 00:16:18 -07:00
HaraldSchafer
a8ec6f4cfd 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>
old-commit-hash: cb0b7375b7
2022-10-05 21:43:38 -07:00
HaraldSchafer
f25d434a01 Planner cleanup (#25969)
old-commit-hash: e5d2c3ce7a
2022-10-04 21:19:04 -07:00
Shane Smiskol
8e1e6132c8 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
old-commit-hash: 84adb8d925
2022-10-04 00:39:19 -07:00
Shane Smiskol
ae2f2add1d 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
old-commit-hash: 4bd146ee7a
2022-09-30 15:43:04 -07:00
Lee Jong Mun
f6700cb7ba remove blank whitespace (#25921)
old-commit-hash: 7df0e3efcf
2022-09-29 13:52:41 -07:00
HaraldSchafer
10bc36ae58 Minor ACC fixes (#25911)
* Change cruise accel limits

* Long tuning script looks good

* Cap cruise slowdown aggression in e2e mode

* Revert atau change

* Cleanup

* Update ref

* fix ref
old-commit-hash: 1007df874f
2022-09-28 13:27:07 -07:00
Vivek Aithal
51d25b2011 Live torque (#25456)
* wip torqued

* add basic logic

* setup in manager

* check sanity and publish msg

* add first order filter to outputs

* wire up controlsd, and update gains

* rename intercept to offset

* add cloudlog, live values are not updated

* fix bugs, do not reset points for now

* fix crashes

* rename to main

* fix bugs, works offline

* fix float in cereal bug

* add latacc filter

* randomly choose points, approx for iid

* add variable decay

* local param to capnp instead of dict

* verify works in replay

* use torqued output in controlsd

* use in controlsd; use points from past routes

* controlsd bugfix

* filter before updating gains, needs to be replaced

* save all points to ensure smooth transition across routes, revert friction factor to 1.5

* add filters to prevent noisy low-speed data points; improve fit sanity

* add engaged buffer

* revert lat_acc thresh

* use paramsd realtime process config

* make latacc-to-torque generic, and overrideable

* move freq to 4Hz, avoid storing in np.array, don't publish points in the message

* float instead of np

* remove constant while storing pts

* rename slope, offset to lat_accet_factor, offset

* resolve issues

* use camelcase in all capnp params

* use camelcase everywhere

* reduce latacc threshold or sanity, add car_sane todo, save points properly

* add and check tag

* write param to disk at end of route

* remove args

* rebase op, cereal

* save on exit

* restore default handler

* cpu usage check

* add to process replay

* handle reset better, reduce unnecessary computation

* always publish raw values - useful for debug

* regen routes

* update refs

* checks on cache restore

* check tuning vals too

* clean that up

* reduce cpu usage

* reduce cpu usage by 75%

* cleanup

* optimize further

* handle reset condition better, don't put points in init, use only in corolla

* bump cereal after rebasing

* update refs

* Update common/params.cc

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

* remove unnecessary checks

* Update RELEASES.md

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 4fa62f1464
2022-09-19 15:19:26 -07:00
Vivek Aithal
3326487104 Torque Refactor (#25822)
* add torque gains refactor

* update refs

* avoid dict, use cereal struct

* bugfix

* no as_builder

* address final comments
old-commit-hash: 85ed5c4cb5
2022-09-17 00:07:54 -07:00
Shane Smiskol
c1b9a202aa controls: enter overriding state for steering override (#25617)
* lateral overriding is overriding

* Update test

* remove

* also could do something like this and only have one OVERRIDE ET

* Revert "also could do something like this and only have one OVERRIDE ET"

This reverts commit 5c381641c08961676a56a9718fbdaa84989ac249.

* full names

* bump cereal

* test every event type

* update refs
old-commit-hash: 992707c172
2022-09-13 23:20:45 -07:00
Shane Smiskol
30ba3096a3 Longcontrol: fix possible reference before assignment (#25715)
fix possible reference before assignment
old-commit-hash: 056b2ec2ed
2022-09-08 21:43:04 -07:00
Adeeb Shihadeh
c6e4fb646d split out experimental long toggle (#25698)
* split out experimental long toggle

* clean up

* update translations
old-commit-hash: 3ef37fe2e8
2022-09-07 20:38:04 -07:00
Adeeb Shihadeh
96be4599e7 reduce min lane change speed to 15mph (#25689)
old-commit-hash: 445492a6d8
2022-09-07 16:50:25 -07:00
HaraldSchafer
38f7880951 Live e2e long toggling (#25685)
Live toggling
old-commit-hash: 8857e02dd4
2022-09-07 11:29:19 -07:00
HaraldSchafer
0b87a4ddb1 More conservative lead policy in e2e long mode (#25684)
* Add params for lead and danger

* fix long params

* E2e passes simple maneuver tests

* Make tests run with e2e long mode

* Slightly more error allowed in e2e mode

* FCW back and populate long source field

* Fix planner name

* FCW still doesnt work

* Slightly less aggressive

* Doesn't need to simulate from stop
old-commit-hash: 7899fb79c1
2022-09-06 21:52:34 -07:00
HaraldSchafer
1c2c840a8a Let planner decide stopping state (#25643)
* Let planner decide stopping

* Refactor stop/start state machine

* Stay stoppe condition

* 1sec from target

* Add starting state

* Add starting state logic

* Undo some changes

* Update ref
old-commit-hash: 210a6163ac
2022-09-06 21:30:10 -07:00