Commit Graph

337 Commits

Author SHA1 Message Date
Shane Smiskol
3d161c4d42 controls: remove noTarget event (#26632)
remove noTarget alert
old-commit-hash: 41610fe8ae
2022-11-29 23:12:58 -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
Shane Smiskol
76e7a45284 controls: preEnabled doesn't consider noEntry (#26627)
preEnabled doesn't consider noEntry
old-commit-hash: 8ad8d4e1c2
2022-11-29 13:11:03 -08:00
Adeeb Shihadeh
4f7bfc430a process replay: support old routes with no peripheralState
old-commit-hash: 7361d1a11b
2022-11-22 11:46:28 -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
Adeeb Shihadeh
4cb61240b3 enable experimental longitudinal control on devel (#26544)
old-commit-hash: 94aa39bdd4
2022-11-21 16:18:51 -08:00
Adeeb Shihadeh
aec5f32f3c publish experimental mode state (#26512)
* publish experimental mode state

* remove that
old-commit-hash: 9c96b21367
2022-11-15 17:18:13 -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
1ea7e49e8d controls: disengage on regen paddle independently (#26453)
* add regen braking field that's just used to add a pedalPressed

* bump

* bump

* Update ref_commit

* we want the standstill check

we want the standstill check

* see what diff is now

* Update ref_commit
old-commit-hash: 74b6e22a7d
2022-11-10 19:06:31 -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
Adeeb Shihadeh
8ec2fa1307 controlsd: steer in old preEnable state (#26269)
* controlsd: steer in old preEnable state

* bump panda

* bump panda

* Update ref_commit

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 6698cd4829
2022-10-27 20:53:15 -07:00
Greg Hogan
92014b7dbe controlsd: update is_metric live (#26228)
* fix speed increment if units changed while driving

* don't recreate params

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 9091e737c8
2022-10-25 15:51:39 -07:00
Shane Smiskol
6695cbf258 CAN-FD HKG: query FW versions from camera (#26063)
* add adas essential ecus

* add adas ecu and query

* add queries

* add name

* after

* presence of adas ecu

* Revert "presence of adas ecu" (POC)

This reverts commit ab88a7e7df32e1c02a175b81848bd4112b2e5c69.

* no whitelist for debugging

* Apply suggestions from code review

* add adas response

* remove adas version

* temp

* read pandaStates

* works in debug script

* only fwdCamera on tucson

* fix pandaStates reading

* fix test_startup

* fix

* simpler

* use existing socket

* pass in number of pandas

* need to create sm using outcome of fingerprinting, which uses sm

fix

* move default argument

* use sock

* always ignore

always ignore

* add canfd fingerprint test

* Update selfdrive/car/hyundai/tests/test_hyundai.py

* set
old-commit-hash: 7bf70bf7d8
2022-10-17 23:04:06 -07:00
Shane Smiskol
4df9e825ae Use longActive for car-specific override signals (#26030)
* add override field to cruiseControl

* need to check if long *can* be active

* bump cereal to master

* revert

* better

* fix

* update refs

* rename variable
old-commit-hash: 7418678132
2022-10-11 16:27:46 -07:00
Adeeb Shihadeh
2a25b0ab83 fixup toggle cleanup
old-commit-hash: 300577f38f
2022-10-05 13:00:22 -07:00
Adeeb Shihadeh
6bf9717b04 cleanup stale longitudinal params (#25967)
old-commit-hash: 0231c4ba85
2022-10-04 17:23:41 -07:00
Adeeb Shihadeh
e631966207 add fault for invalid safety RX checks (#25949)
* add fault for invalid safety RX checks

* just a bool

* bump panda
old-commit-hash: 3068c48224
2022-10-03 16:06:29 -07:00
Lee Jong Mun
f6700cb7ba remove blank whitespace (#25921)
old-commit-hash: 7df0e3efcf
2022-09-29 13:52:41 -07:00
Adeeb Shihadeh
d53804cc85 controlsd: ignore irrelevant alerts in dashcam mode (#25875)
old-commit-hash: dcdf9a6eb4
2022-09-22 13:43:27 -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
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
Adeeb Shihadeh
0a9e230016 controlsd: fix regen init for multi-panda setups
old-commit-hash: 3f34a7082a
2022-09-13 20:35:16 -07:00
Adeeb Shihadeh
e4f9781c17 single longitudinal toggle for e2e and disable radar (#25688)
* single longitudinal toggle for e2e and disable radar

* write disable radar param

* rename

* better param name

* clean that up

* update refs

* update translations

* not live for experimental

* write it out

* vanish
old-commit-hash: 655a64b603
2022-09-07 17:12:49 -07:00
Shane Smiskol
775d1beb66 LDW: fix deprecated ll prob reference (#25681)
* fix crash when ldw is turned on

* in lane change

* Revert "in lane change"

This reverts commit 98e7224f81d2036689339779e582e2085c9c4d3e.
old-commit-hash: d222461a3e
2022-09-06 13:05:47 -07:00
HaraldSchafer
b8a6a961fe Remove lane planning code (#25651)
* Remove all lane planning logic

* Revert "Update ref"

This reverts commit 8dcb08ebccbb5641443459ac40601a95cf605682.

* bump cereal

* Update ref
old-commit-hash: 2eff6d0ebd
2022-09-04 13:07:51 -07:00
Adeeb Shihadeh
3b747049ad controlsd: disambiguate can error and can socket lag (#25559)
old-commit-hash: 94f353a5e3
2022-08-25 20:30:43 -07:00
Shane Smiskol
2bd8ee0974 controls: block resume if cruise not previously engaged (#25402)
* see if this works at all

* can revert this

* think adding a no entry conditionally is nicer

* then we can revert this

* 0 makes more sense

* Revert "0 makes more sense"

This reverts commit efc89e8a2389ef58fbc0cec0a2872d24db524867.

* gm CC uses > 70

* bump cereal

* comment

* test on Honda

* whoops

* works

* add exception with todo

* moved button enable events to controlsd

* get rid of that

get rid of that

* different values for now

* car interfaces add enable event, controlsd can block it

* Regen and update refs

* delete if not set

* One place

one place

* regen routes are uninitialized first few frames

* Trim start of segment so it's like original segment

* stash

* regen

* not working

* clean up

* more cleanup

* revert

* bump ceral

* actually check resume button

* whoops

* pcmCruise cars don't use setSpeed, so we're good

* engage correctly in sim

* Update ref_commit

* Update refs
old-commit-hash: 5ed587ebef
2022-08-17 18:03:33 -07:00
Shane Smiskol
28a60fb42e process replay: initialize controlsState with original route (#25461)
* push

* do process replay

* commit

* update refs

* clean up

* clean up controlsd

* clean up controlsd

* Add assert

* debubuggier param name

* can be peristent

* Revert "can be peristent"

This reverts commit 6e6d3f6423c26a202623cef728e038259e9e46cd.

* Update selfdrive/test/process_replay/process_replay.py
old-commit-hash: 87ca42e993
2022-08-16 22:02:03 -07:00
Robbe Derks
a353cc8627 Use steeringAngleDeg for angle control saturation warnings (#25404)
* use steeringAngleDeg for angle control cars

* update refs
old-commit-hash: 24645c92da
2022-08-12 11:30:19 +02:00
Vivek Aithal
e23f58937f Lateral Acceleration Error alert (Sensor Invalid) (#25291)
* sensor flag in paramsd

* increase lateral acc err alert threshold

* add invalid sensor alert from paramsd

* update ref, bool before adding to msg

* account for sign difference in locationd and paramsd

* revert ref
old-commit-hash: e77dc1ab44
2022-07-28 13:10:01 -07:00
Adeeb Shihadeh
5263356958 remove CS.steeringRateLimited (#25251)
* remove CS.steeringRateLimited

* bump cereal

* update refs
old-commit-hash: d462a08056
2022-07-24 14:56:55 -07:00
Willem Melching
862e3a8300 use v_cruise_cluster_kph for hudControl.setSpeed (#25245)
old-commit-hash: f300a8df2b
2022-07-22 13:21:53 +02:00
Willem Melching
95fb15aa5f prereq for matching speeds shown on cars dash (#25222)
* prereq for matching speeds shown on cars dash

* also handle fallback in the ui for replay

* update translations

* update ref
old-commit-hash: c3e95d5e19
2022-07-21 14:48:08 +02:00
Adeeb Shihadeh
b73f02bf45 controlsd: handle radar missing + cleanup system error handling (#25179)
* controlsd: handle radar missing + cleanup system erorr handling

* fix carla

* update refs
old-commit-hash: 505bbce29d
2022-07-14 19:55:18 -07:00
Adeeb Shihadeh
f3ddb32649 process replay: ensure enabled for significant amount of time (#25121)
* process replay: ensure enabled for significant amount of time

* update refs

* 10s is reasonable
old-commit-hash: 2ae52e9b22
2022-07-11 17:20:56 -07:00
Shane Smiskol
493d6ef693 Fix new steer saturated warning with joystick mode (#25113)
Fix steer sat warning with joystick mode
old-commit-hash: be7f704168
2022-07-11 12:52:03 -07:00
Shane Smiskol
9bc945c428 Stock longitudinal: spam resume button when lead starts moving (#24873)
* always log leads, we hide them in ui

* only spam resume when future is > vEgoStarting

* do rest but vw

* vw

* remove comments

* rename to resume

* maintain original button msg rate

* mazda: ensure no resume if cancelling

* same for non-HDA2

* Always run planner if not opLong

* try 0.2

* 0.1 should be pretty safe

* add test for resuming

* fix test

* stricter test, speeds[-1] is 0.14 when starting here

* no walrus

* fixup mazda cc

* remove extra import
old-commit-hash: fd2de54172
2022-07-07 00:24:03 -07:00
Willem Melching
297a0bd65b controlsd: avoid lag on first iteration due to get_short_branch (#25031)
* controlsd: avoid lag on first iteration due to get_short_branch

* always cache
old-commit-hash: d4cc13c88a
2022-07-04 17:13:30 +02:00
HaraldSchafer
316de57010 Torque control: max torque warning (#25018)
* New steer torque warning

* typo
old-commit-hash: 0c95493dc0
2022-07-01 19:14:21 -07:00
Willem Melching
0c2afda822 enable laikad (#25013)
* enable laikad

* increase logprint for onroad test
old-commit-hash: cdc7a6dbea
2022-07-01 08:26:41 -07:00
Adeeb Shihadeh
8cd45d02c0 add param to override carParams.dashcamOnly (#24857)
* add param to override carParams.dashcamOnly

* little cleaner
old-commit-hash: 7c826b4fa1
2022-06-17 11:56:04 +02:00
Adeeb Shihadeh
3c48bc47b7 Move a bunch of stuff to system/ part 3 (#24829)
* move swaglog.py

* timezoned

* logmessaged

* version.py

* fix linter
old-commit-hash: 0fce5d9045
2022-06-11 23:19:27 -07:00
Adeeb Shihadeh
9a45a3b99b Move selfdrive/hardware/ to system/ (#24725)
* move hardware to system/

* fix mypy
old-commit-hash: 1139fe507b
2022-06-11 16:38:24 -07:00
Willem Melching
753045c73d less TICI when not needed (#24698)
* less TICI when not needed

* fix process replay

* move reading voltages into hw abstraction layer

* Update selfdrive/hardware/tici/hardware.h

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

* Update selfdrive/hardware/hw.h

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

* Update selfdrive/hardware/base.h

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

* rename init function

* Update selfdrive/athena/athenad.py

Co-authored-by: Robbe Derks <robbe.derks@gmail.com>

* Update selfdrive/boardd/boardd.cc

* Apply suggestions from code review

* Update selfdrive/thermald/thermald.py

* update ref

* fix alert width if all cameras are bad

* add ecam to test_loggerd

* bump cereal

* bump cereal

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Robbe Derks <robbe.derks@gmail.com>
old-commit-hash: f49a9c9fd2
2022-06-02 15:20:51 +02:00
HaraldSchafer
39886246c9 Rerevert torque control (#24649)
* Revert "Revert torque control (#24565)"

This reverts commit 93f434d047a92366c4ccefeece86fe101ed98d02.

* Move tune out of car specific stuff

* Update ref commit
old-commit-hash: d928972150
2022-05-24 17:52:33 -07:00
Adeeb Shihadeh
29e2b3f757 controlsd: ensure all system malfunction events have the right types (#24635)
old-commit-hash: 71901c94db
2022-05-23 17:46:46 -07:00
Shane Smiskol
56a44d41f8 controls: pressing set while gas pressed resets to vEgo (#24100)
* set while gas pressed to resume

* better order

* what was I thinking?

* Update selfdrive/controls/lib/drive_helpers.py

Co-authored-by: Gijs Koning <gijs-koning@live.nl>

* Update selfdrive/controls/lib/drive_helpers.py

Co-authored-by: Gijs Koning <gijs-koning@live.nl>

* only if under set speed

* some clean up and ciel the v_cruise_kph

* clean up

* actually floor

* Should be cruise min

* On phone, will clean up

* Think no floor is fine

* clean up and catch setCruise

* update comment and just always do rounding and clipping

update comment

* flip order

Co-authored-by: Gijs Koning <gijs-koning@live.nl>
old-commit-hash: d3d210c183
2022-05-19 03:28:50 -07:00
HaraldSchafer
efa559f9be Revert torque control (#24565)
* torque reversal start

* Fix carmodel tests

* Update ref

* update ref

* Elif is better than if
old-commit-hash: 9f8b03753d
2022-05-17 19:00:57 -07:00
Adeeb Shihadeh
cfc16a88c5 improved alert verbosity (#24434)
* improved alert verbosity

* better testing script

* better description

* speed diff

* touch ups

* fix that
old-commit-hash: b1858df00e
2022-05-16 21:19:38 -07:00
Shane Smiskol
f1f447d092 Add desired curvature to controlsState (#24510)
* Add desired_curvature to controlsState

* clean up

* bump

* bump

* update refs from GitHub!

Co-authored-by: Jason Shuler <jshuler@gmail.com>
old-commit-hash: 6518ecca8f
2022-05-12 16:59:52 -07:00