Dean Lee
35ec6ac1cb
use ndarray.tolist to convert numpy array to float ( #23485 )
2022-01-11 14:34:47 +01:00
Shane Smiskol
233a6e4a62
LanePlanner: offsets cleanup ( #23459 )
...
* update comments
* model y axis was flipped so flip the offsets as well
* fix
2022-01-10 13:08:45 -08:00
Robbe Derks
1a54d7f6ae
Ignore statsd for running process check ( #23483 )
2022-01-10 19:54:41 +01:00
Dean Lee
4208fe018e
LongControl: remove redundant check on active ( #23481 )
2022-01-10 18:46:02 +01:00
Dean Lee
a653461dec
check in tuple instead of list ( #23477 )
...
* check in tuple instead of list
* Update selfdrive/car/toyota/carcontroller.py
Co-authored-by: Willem Melching <willem.melching@gmail.com>
* Update selfdrive/car/mazda/interface.py
Co-authored-by: Willem Melching <willem.melching@gmail.com>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
2022-01-10 16:36:51 +01:00
Dean Lee
8eec818ae6
events: cleanup function any ( #23479 )
2022-01-10 14:32:07 +01:00
Dean Lee
67af095692
controlsd: check all_valid only if not initialized ( #23437 )
...
* check all valid in if statement
* apply review
2022-01-10 12:13:58 +01:00
Dean Lee
2d08f8b318
controlsd: save lat_plan.dPathPoints to local variable ( #23462 )
2022-01-10 11:27:31 +01:00
Dean Lee
b2beb5e6ba
controls: check contents in tuple instead of list ( #23463 )
2022-01-10 11:26:58 +01:00
Dean Lee
09a835916b
optimize alertmanager ( #23433 )
2022-01-06 22:15:32 -08:00
Dean Lee
e0338fd77b
controlsd/state_transition: remove redundant check in elif ( #23428 )
2022-01-06 15:54:19 +01:00
Dean Lee
a2e762e0b9
longcontrol: check if speeds is empty ( #23410 )
...
* check if speeds is empty
* move into existing check
Co-authored-by: Willem Melching <willem.melching@gmail.com>
2022-01-05 14:23:08 +01:00
Shane Smiskol
cf9792dc53
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>
2022-01-04 15:40:39 -08:00
Dean Lee
0357cf2af0
controlsd: remove duplicate event relayMalfunction ( #23392 )
2022-01-04 14:07:36 -08:00
HaraldSchafer
d3f064f5ca
Controlsd: fix bug in curv rate limit ( #23250 )
...
* Controlsd: fix bug in curv rate limit
* update ref
2022-01-04 13:21:56 -08:00
Shane Smiskol
9cb0ebe37d
LongitudinalMpc: Remove class accel_limit_arr ( #23295 )
...
* remove class accel_limit_arr
remove class accel_limit_arr
* make it static
* only set static parameters once
* just use existing function
style
* Update selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py
* Update selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py
Co-authored-by: Willem Melching <willem.melching@gmail.com>
2022-01-04 16:00:29 +01:00
Shane Smiskol
9f88ba188a
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>
2022-01-04 12:17:33 +01:00
Dean Lee
960e0cf6a7
controlsd/publish_logs: follow capnp best practices ( #23372 )
...
* follow follow capnp best practices
* cleanup
2022-01-04 12:04:03 +01:00
Dean Lee
5dc631fa1b
longcontrol/update: optimize capnp ( #23382 )
2022-01-04 11:32:54 +01:00
Dean Lee
7b612d47b6
radard/update: optimize capnp ( #23380 )
2022-01-03 17:26:32 -08:00
Dean Lee
f2520b6e80
lane_planner.py/parse_model: follow capnp best practices ( #23368 )
2022-01-03 15:08:24 -08:00
Adeeb Shihadeh
1e41f4723b
CAN receive error is a comm issue ( #23362 )
2022-01-03 14:13:45 -08:00
Dean Lee
2ca0925da7
lateral_planner.py/publish: follow capnp best practices ( #23359 )
2022-01-02 11:55:24 -08:00
George Hotz
dc96d4bee7
Add More Types for mypy ( #23268 )
...
* mypy passes
* a few more
* a few in manager
* more types, will lint
* more
* simple types
* events type
* Update selfdrive/thermald/thermald.py
* Apply suggestions from code review
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-12-28 18:07:00 +01:00
Shane Smiskol
5387806400
LongitudinalMpc: minor clean up ( #23296 )
...
* correct order
* formatting
* Revert "formatting"
This reverts commit 481c390f40
.
* use np.zeros
* typos and formatting
* typo
* typo
2021-12-28 12:05:52 +01:00
Ewout ter Hoeven
332f568a82
Pyupgrade 3.6: Update syntax with Python 3.6+ features ( #23305 )
...
Updated Python code with Python 3.6+ features:
- utf-8 encoding is now the default (PEP 3120)
- Replace list comprehensions by Generator Expressions (PEP 289)
- Replace yield loop by yield from (PEP 380)
- Remove the (object) subclass when defining a class
- Replace the IOError alias by OSError (PEP 3151)
- Define sets with curly braces {} instead of set()
- Remove "r" parameter from open function, which is default
Co-Authored-By: Adeeb Shihadeh <8762862+adeebshihadeh@users.noreply.github.com>
Co-Authored-By: GregorKikelj <96022003+GregorKikelj@users.noreply.github.com>
Co-authored-by: Adeeb Shihadeh <8762862+adeebshihadeh@users.noreply.github.com>
Co-authored-by: GregorKikelj <96022003+GregorKikelj@users.noreply.github.com>
2021-12-24 11:18:39 -08:00
Adeeb Shihadeh
256c51e16a
bump cereal
2021-12-20 23:04:27 -08:00
Adeeb Shihadeh
c92199ab1a
Revert "Mazda: alert when LKAS is disabled ( #23273 )"
...
This reverts commit f25121b736
.
2021-12-20 23:02:02 -08:00
Jafar Al-Gharaibeh
f25121b736
Mazda: alert when LKAS is disabled ( #23273 )
...
* Mazda: alert when LKAS is disabled
Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
* Update selfdrive/controls/lib/events.py
* Update selfdrive/car/mazda/interface.py
* bump cereal
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-12-20 14:58:46 -08:00
George Hotz
16dd7ce1fe
build for mac ( #23048 )
2021-12-18 22:00:09 -08:00
HaraldSchafer
cf466222f6
Road Roll Compensation Rebased ( #23251 )
...
* first commit
* update refs
2021-12-16 17:34:12 -08:00
Ewout ter Hoeven
55390d273f
Convert format strings strings to f-strings ( #23241 )
...
* Convert all text strings to f-strings
Reformats all the text from the old "%-formatted" and .format(...) format to the newer f-string format, as defined in PEP 498. This requires Python 3.6+.
Flynt 0.69 was used to reformat the strings. 120 f-strings were created in 51 files.
F-strings are in general more readable, concise and performant. See also: https://www.python.org/dev/peps/pep-0498/#rationale
* revert pyextra changes
* revert ublox.py
Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-12-16 14:58:17 +01:00
Willem Melching
4f1eb4278a
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
2021-12-16 13:08:20 +01:00
Shane Smiskol
2799ef5292
Remove minSpeedCan ( #22991 )
...
* Remove minCanSpeed
Remove minCanSpeed
* it actually only goes out to 2.5 seconds, this is okay to remove
* test to see if this preserves behavior
add minSpeedCan
* Revert "test to see if this preserves behavior"
This reverts commit 31b11f017f7e9da7654fc8064b5983d4a6cc22e5.
* preserve behavior (don't enter stopping as early)
* vEgoStopping needs to be less than or equal to vEgoStarting to avoid state oscillation
2021-12-14 12:09:32 -08:00
Adeeb Shihadeh
7f618b16bf
increase cruise mismatch threshold
2021-12-12 13:35:12 -08:00
Adeeb Shihadeh
8068df0b2a
alerts: escalate soft disable alert near disengagement ( #23198 )
...
* alerts: escalate soft disable alert if resulted in disengagement
* show 0.5s before disengagement
2021-12-11 17:07:37 -08:00
Adeeb Shihadeh
07b971d473
alerts: handle min duration properly ( #23191 )
...
* alerts: handle min duration properly
* add active
* tests
* cleanup test
* update refs
2021-12-10 19:20:07 -08:00
Adeeb Shihadeh
4627d201b6
alert text simplification ( #23186 )
...
* alert text simplification
* little more
* user triggered
* little more
* less annoying ldw
* Update selfdrive/controls/lib/events.py
* update refs
* revert
2021-12-10 15:21:37 -08:00
Adeeb Shihadeh
45f3662cf0
alerts: add test for creation delay
2021-12-09 14:29:50 -08:00
Harald Schafer
44adea73ce
fix max speed comments
2021-12-08 17:13:43 -08:00
HaraldSchafer
c41a0cae4b
XVA long policy: prev_a becomes numpy anyway ( #23175 )
2021-12-08 16:06:09 -08:00
Harald Schafer
7e20fe7ca2
Long mpc: fix xva policy for sim
2021-12-08 15:42:30 -08:00
HaraldSchafer
d1b003c5d2
Cruise speed: up to 90mph max ( #23161 )
...
* Cruise speed: up to 90mph max
* update ref
2021-12-07 15:47:57 -08:00
HaraldSchafer
77a99e7d6d
long planner: no reset when starting ( #23149 )
...
* long planner: no reset when starting
* let go to 2m/s
* update ref
2021-12-06 23:10:16 -08:00
Harald Schafer
9afc95474d
add a change cost
2021-12-06 16:17:11 -08:00
HaraldSchafer
0dcdf9c30f
Long policy: strictly squared stopped equivalence function ( #23118 )
...
* new ref
* never let lead stopped equivalence go down
* no overbraking
* stricter again
* cleanup
* updated refs
2021-12-03 16:12:30 -08:00
Willem Melching
bbd0f94d9d
add desired angle to log ( #23115 )
...
* add desired angle to log
* update ref
* bump cereal
2021-12-03 21:35:34 +01:00
HaraldSchafer
5b0e10ea33
Reaction buffer on follow distance ( #23112 )
...
* Reaction time buffer
* new ref
2021-12-02 23:56:02 -08:00
HaraldSchafer
46fd5892bf
Human inspired follow distance ( #22937 )
...
* Add cost for creep
* more reasonable cost
* seems better than before
* science tune
* more chill
* closer follow
* stopping takes some leeway
* better cruise
* needed to be cumsum all along
* jerk not even needed
* matches better
* 6 is too much
* add back
* a little extra buffer is good for badly tuned cars
* new refs
* refs again
2021-12-02 14:42:13 -08:00
Adeeb Shihadeh
3b367e6872
Newer sounds ( #23091 )
...
* new prompt sound
* padding
* prompt distracted
* debug
* fix spelling
* lower min volume
* better volume at low speeds
* revert debug
* revert that
* fix tests
* update refs
Co-authored-by: Comma Device <device@comma.ai>
2021-12-02 00:28:25 -08:00
HaraldSchafer
68015f75ed
Set accel trajectory to a_ego when not engaged ( #23100 )
...
* Set accel trajectory to a_ego when not engaged
* update ref
2021-12-01 23:12:11 -08:00
HaraldSchafer
8f3bc4872f
Less sensitive torque saturated warning ( #23003 )
...
* Less sensetive torque saturated warning
* better comment
2021-12-01 13:53:42 -08:00
Adeeb Shihadeh
e679d05d9e
New sounds ( #22652 )
...
* new engage/disengage + amp config
* first family
* cleanup audible alerts
* tici isn't special
* fix up debug cycle alerts
* these were better
* extend range
* use distracted sound
* log scaling
* getting closer
* slightly louder
* prompt
* update tests
* update refs
* fix c2 test
* resolve todo
* adjust tolerance
* revert for now
* should work
Co-authored-by: Comma Device <device@comma.ai>
2021-11-30 19:47:33 -08:00
HaraldSchafer
048cc3ac9f
Longcontrol : pid error should be 0 when plan is followed ( #23066 )
...
* v_pid error should be 0 when plan is followed
* update ref
2021-11-29 15:22:02 -08:00
Shane Smiskol
113988ae31
longitudinal: only apply overshoot prevention when braking ( #22986 )
...
* only if braking is desired
* use v_target to determine stopping
* more clear?
2021-11-29 11:29:32 +01:00
Shane Smiskol
93fd662adf
Clean up planner files ( #23031 )
...
* clean up planner files
clean up planner files
* fix plant instance
2021-11-26 14:57:39 +01:00
Robbe Derks
4960578bdf
Tesla longitudinal control ( #22561 )
...
* tesla long squashed changes
* fix no resume from stop
* try setting accel limits to 0 to remove jerk with fast switchover
* expand radard lookup tables
* bump merged panda submodule
2021-11-18 13:57:12 +01:00
Adeeb Shihadeh
2a72e2a514
add offroad alerts for car unrecognized ( #22934 )
...
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Chris McCammon <chrismccammon123@gmail.com>
2021-11-17 20:29:00 -08:00
HaraldSchafer
24aadaf1f3
Lateral planner: lower max cost ( #22960 )
...
* prevent ping pong when tuning is not so great
* update refs
2021-11-17 20:24:10 -08:00
Adeeb Shihadeh
5296ca8d73
improve crc camera error ( #22943 )
2021-11-16 22:57:22 -08:00
Adeeb Shihadeh
8d917b6702
more alert checks
2021-11-16 22:56:29 -08:00
HaraldSchafer
b3b45c8d29
Add cost to long plan change for smoother lag comp ( #22923 )
...
* add plan changing cost
* fix compile
* set weights
* try this cost
* horizon problem
* looks pretty good
* update refs
* update refs
* smoother plan changes
2021-11-16 17:57:55 -08:00
Adeeb Shihadeh
d8a5c415cd
Revert "add offroad alerts for car unrecognized"
...
This reverts commit fb1e8ce086
.
2021-11-16 13:31:10 -08:00
Adeeb Shihadeh
fb1e8ce086
add offroad alerts for car unrecognized
2021-11-16 13:30:33 -08:00
Adeeb Shihadeh
833399e941
alerts: make soft disables an orange alert ( #22925 )
2021-11-16 13:11:32 -08:00
Adeeb Shihadeh
3302239013
put cruiseMismatch event in logging only mode
2021-11-15 21:16:54 -08:00
Adeeb Shihadeh
5265c36de7
alert cleanup ( #22919 )
2021-11-15 16:14:31 -08:00
Adeeb Shihadeh
db92006dc0
CI: skip cruise mismatch check for can replays
2021-11-12 18:22:39 -08:00
HaraldSchafer
a04114f68c
Give car interface roll and pitch ( #22891 )
...
* Give car interface roll and pitch
* fixup
* whitespace
2021-11-12 12:21:22 -08:00
Joost Wooning
89d0a52d16
cython wrapper for acados ( #22784 )
...
* cython wrapper for acados
* fix building
* sconscript cleanup
* no cython numpy
* cleanup
* upgrade build script
* try without slices
* new acados commit
* c3 update acados libs
* c2 libs
* make faster
* undo profiling
* fix build
* somewhat faster
* tryout cost_set_slice
* Revert "tryout cost_set_slice"
This reverts commit d358d93a13
.
* cleanup
* undo t_renderer change
Co-authored-by: Comma Device <device@comma.ai>
2021-11-12 17:09:08 +01:00
Adeeb Shihadeh
e528e2e3e2
allow update snoozing ( #22876 )
...
* allow update snoozing
* not immediately visible
* dismiss and close
* grey button
2021-11-11 15:32:25 -08:00
Adeeb Shihadeh
308219c5b1
alerts: use repeating warning2 sound for steerSaturated ( #22874 )
2021-11-11 11:55:34 -08:00
sshane
bdaea086f8
Longcontrol: do not clip vEgo to minSpeedCan ( #22832 )
...
* fix tss2 slow reacceleration in sng
(should) preserve stopping behavior
add comments since it's confusing
fix
* Revert "fix tss2 slow reacceleration in sng"
This reverts commit 42abde0eb945d8bc5ad9b502d1d89b3e3dc16f8a.
* don't max(vEgo)
* update ref
Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-11-11 13:24:38 +01:00
Adeeb Shihadeh
327464fb84
increase engagement alerts duration
2021-11-10 22:11:14 -08:00
Adeeb Shihadeh
035bc0c20f
controlsd: alert on cruise mismatch for >1s ( #22841 )
...
* controlsd: alert on cruise mismatch for >1s
* bump cereal
* update refs
* bump allowed soundd cpu
* bump cereal
2021-11-10 13:01:42 -08:00
Adeeb Shihadeh
c5d6b85c90
alerts: use a single duration for sound, text, and HUD ( #22856 )
...
* alerts: use a single duration for sound, text, and HUD
* little cleanup
* update refs
2021-11-10 11:54:12 -08:00
Adeeb Shihadeh
93ba52c76c
controlsd: optimize alert management ( #22846 )
...
* controlsd: optimize alert management
* little cleanup
* dataclass is nice
* fix tests
* update refs
* sort by start frame
* update refs
Co-authored-by: Comma Device <device@comma.ai>
2021-11-10 10:54:18 -08:00
Jason Young
2006fff2b6
Fix momentary false blind spot alerts when changing lanes ( #22819 )
...
* reset LaneChangeDirection after finishing
* update ref
Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-11-10 17:21:36 +01:00
HaraldSchafer
35d6ed1014
ACADOS: partial condensing ( #22830 )
...
* partial condense
* new refs
* new ref
* newerest refs
2021-11-09 19:29:55 -08:00
Adeeb Shihadeh
445a5aaca4
soundd: don't loop controls unresponsive sound infinitely ( #22839 )
...
* soundd: don't loop controls unresponsive sound infinitely
* update tests
* actually fix
2021-11-09 16:58:21 -08:00
Mayfield
8c501f0265
alerts: show min enable speed in "speed too low" alert ( #22755 )
...
* alerts: show min enable speed in "speed too low" alert
* commonize display speed construction
2021-11-02 14:10:07 +01:00
Adeeb Shihadeh
385f3c5387
controls: don't wind up while EPS is faulted or below min steer speed ( #22739 )
...
* controlsd: don't wind up while EPS is faulted
* also check if above min steer speed
* car params
2021-10-29 14:13:41 -07:00
Adeeb Shihadeh
3312bf6d15
lower profile below steer speed alert ( #22740 )
2021-10-29 13:39:12 -07:00
Robbe Derks
585c16cd2a
Multipanda support ( #22402 )
...
* squash all PR commits for easy rebase
* merged all panda rx can into one message
* fix buffers in can_send
* more cleanup and minor fixes
* fix even more stuff
* fix non-allocated send buffer
* make connecting more robust
* fix bus offset
* fix controls_mismatch?
* simplify mismatch check
* C++ style struct
* fix connect loop
* update ref
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-10-29 13:04:26 +02:00
Robbe Derks
efb5abec41
Make longitudinal planning triggered on model ( #22641 )
...
* Make long planning triggered on model
* fix process replay
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-10-28 12:27:09 +02:00
Adeeb Shihadeh
f4c2398db4
add sdcard support ( #22703 )
...
* generalize
* factory reset
2021-10-26 19:34:08 -07:00
Vivek Aithal
2ea4feffb9
plannerd: add useLaneLines to lateralPlan ( #22699 )
...
* add laneless toggle in lateral plan message
* update cereal
* add refs
2021-10-26 14:32:41 -07:00
Adeeb Shihadeh
f2b48a1803
always show lane lines on HUD ( #22693 )
...
* always show lane lines on HUD
* update refs
2021-10-25 23:47:12 -07:00
Adeeb Shihadeh
7394956a90
temporarily disable per-core cpu usage check
2021-10-25 15:03:28 -07:00
HaraldSchafer
7868baeac9
e2e long planner: use position, speed and accel ( #22688 )
...
* a little bit more moderate
* cleaner
2021-10-25 14:03:41 -07:00
Adeeb Shihadeh
897492d27c
more specific no fw startup alert
2021-10-21 16:24:01 -07:00
qadmus
778374d3dd
[Lateral PID] Function for steer feedforward ( #22638 )
...
* store a function for steer feedforward
* use classmethod
Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-10-21 11:38:03 +02:00
Mitchell Goff
38f775edfc
Only trigger model FCW on stock long when not already braking ( #22620 )
...
* Only trigger model FCW on stock long when not already braking
* Split model_fcw checks for better readability
2021-10-20 16:16:40 +02:00
Harald Schafer
791de68689
plannerd: position std size check bug
2021-10-17 19:52:11 -07:00
Adeeb Shihadeh
74a3c92704
only check low battery on EON
2021-10-15 15:04:19 -07:00
HaraldSchafer
c4510024da
Remove accel cost in long MPC ( #22527 )
...
* ACCEL not useful
* new ref
2021-10-11 17:20:40 -07:00
HaraldSchafer
04cf12cb00
ACADOS fix non-convergence when long_plan changes ( #22495 )
...
* debug commit
* cleanup
* some indexing bugs
* need more its
* BALANCE is way better it seems
* fix test
* this converges in 2000segs
* new ref
* less cpu
2021-10-10 00:05:29 -07:00
Robbe Derks
91987f38d4
Make pandaState and safetyMode a list ( #22454 )
...
* wip: move to pandaStates
* bump cereal
* wip: SafetyMode struct
* move to safetyMode
* fix typo
* this can be None
* fix potential empty pandaStates list
* fix thermald
* fix controlsd
* rename safetyModes to safetyConfigs
* update process_replay
* fix test_models
* bump cereal
2021-10-08 17:54:34 +02:00
Willem Melching
5587964d58
Fix cruise button mph increment ( #22487 )
2021-10-08 11:10:29 +02:00
HaraldSchafer
a4bc1bbb74
Long MPC cleanup ( #22462 )
...
* cleaner extrapolation
* some comments
* new ref
* more comments
* new ref
2021-10-06 17:51:23 -07:00