Commit Graph

678 Commits

Author SHA1 Message Date
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
HaraldSchafer
bc679f735d Misc torque control fixes (#24801)
* Fiction compensation should be based on error

* Update refs

* Add deadzone

* update ref
old-commit-hash: 843e59f6f0
2022-06-10 22:52:48 -07:00
ClockeNessMnstr
52a28d8938 update DH names + notes for MPC output curvatures (#24701)
* update names + notes for MPC outputs

"current_curvature" is not the correct description of what the MPC is outputting in it's curvature_ego state.
The MPC is integrating it's free variable, curvature_rate, such that curvature[0] is actually the desired_curvature before any delay.
inversely: the curvature_rate_desired is the desired rate of change to the setpoint and not the actual curvature rate. 

If we were to set the initial curvature = measured curvature in the MPC initiation these names would be correct. 
This was possibly how it was initially set up but the nomenclature here is now confusing.

* more notes

* match

* Clarify #1
old-commit-hash: b215d611b1
2022-06-07 09:41:03 -07:00
Shane Smiskol
1a2bf8412c Car documentation: set steering torque star using car interface (#24709)
* Set good torque using torque controller tuning

* should be equal to

* save lateral accel to car params

* use maxLateralAccel

* always

* same convention

* nan will always evaluate to false

* The great good torque purge

* adjust default friction

* Add data for more cars

* adjust name

* Welcome back, guys. Only adjust good torque if maxLatAccel is set

* Update refs (1.7 is 1.7000001...)
old-commit-hash: c6bc03311c
2022-06-03 17:41:20 -07:00
HaraldSchafer
08ad733229 Remove laneless toggle (#24738)
* Remove laneless toggle

* Update refs
old-commit-hash: 7f16e19f79
2022-06-03 14:04:14 -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
Gijs Koning
6a53db981b Simulator: Speed up process by removing second camera (#24679)
* simulator: support running wide camera only

* proper frame id

* use param name that makes more sense

* do some cleanup

* Update tools/sim/bridge.py

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: b5aed2bf67
2022-05-30 15:25:07 +02:00
HaraldSchafer
f5a6a6dc77 Tssp prius torque control (#24669)
* use llk

* use steering sensor at low speed stil

* Try more simple

* rm prius tune

* updated ref
old-commit-hash: d708a134bd
2022-05-27 10:21:02 -07: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
HaraldSchafer
55085a12db New model: better laneless (#24605)
* Fix ping pong

* Fix hugging: e6fd3a62-aa86-46d1-a414-19137ed1babc/800

* Remove lateral toggle

* a6da6265-1952-48dd-986b-2b5996dd2642/950

* Model replay commit

* Revert "Remove lateral toggle"

This reverts commit 69e57eb7e1a72e4bad5e12bcfded6ff431a21a0e.
old-commit-hash: 7da48ebdba
2022-05-24 09:11:31 -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
HaraldSchafer
51165e5df5 Latcontrol torque: integrator need not be reset (#24606)
slow integrators need not be reset
old-commit-hash: 2181bbca71
2022-05-20 13:50:47 -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
a6bcd14abd show which cameras are malfunctioning (#24558)
old-commit-hash: 0b1f6e3620
2022-05-16 22:01:04 -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
19aebce4f2 Round system overheated temperature (#24544)
* Update events.py

* Apply suggestions from code review

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 961a121fde
2022-05-16 18:08:02 +02:00
ntegan1
b9a07b8f05 Round model lagging frame drop percentage (#24549)
alerts: round model frame drop percentage
old-commit-hash: 076f0acd5f
2022-05-16 16:26:18 +02:00
Willem Melching
0a2c2a6b28 Add unittest for alert callbacks (#24551)
add alert callback test
old-commit-hash: 31af13101b
2022-05-16 16:25:52 +02:00
ClockeNessMnstr
a7dceb30ae LatControlTorque: clean up class variable (#24526)
* move to super

* no class variable

* there's CP

* whitespace

* drop CI from latcontrol super

* Revert "drop CI from latcontrol super"

This reverts commit 9218273060ade6431c4fc4c310b27e7e210158b9.

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: a693b3a26b
2022-05-13 16:52:20 -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
Dylan Herman
2dfba97175 add mypy check for return-any (#24379)
* add mypy check for return-any

* remove unused import

* typing

* remove unnecessary variable typing

* cleanup

* cleanup

* bump submodules

* small fixes

* only a problem on mac

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: d2eef1955c
2022-05-12 14:59:00 +02:00
grekiki
7cd23af9b1 Mypy fixes for --check-untyped-defs (#24372)
more type fixes
old-commit-hash: 17e33978cd
2022-05-12 14:08:11 +02:00
HaraldSchafer
3427eb411b Latcontrol torque: fix integrator induced ping pong (#24458)
* Latcontrol torque: fix integrator induced ping pong

* Reset on disengage since unwind resets anywayh

* Might be overkill

* rm whitespace

* update ref
old-commit-hash: 29afd53d88
2022-05-06 22:17:21 -07:00
Adeeb Shihadeh
a6f314bc56 increase cruiseMismatch threshold (#24428)
old-commit-hash: 1bc6f2fa7d
2022-05-04 15:58:08 -07:00
ntegan1
af82274bac LatControlTorque: log desired/actual lateral accel (#24406)
* log torque lateral accel

* bump cereal

* update refs

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 9a44d4c4e0
2022-05-03 14:18:46 -07:00
Adeeb Shihadeh
247c153a35 controlsd: better alert precedence for system malfunctions (#24366)
* controlsd: better alert precedence for system malfunctions

* down to 20

* move that

* check can flags

* update refs

* update refs
old-commit-hash: be748c0d6a
2022-04-29 13:36:25 -07:00
Adeeb Shihadeh
fdf13d565b controlsd: add lagging alert (#24360)
* controlsd: add lagging alert

* move those

* just this for now

* no camera malfunction
old-commit-hash: 3abbe827de
2022-04-28 19:51:42 -07:00
Jason Young
d82f65a1b7 Accept resumeCruise for resuming prior speed setpoint (#24348)
* accept two button types for resume

* retry CI

* Update selfdrive/controls/lib/drive_helpers.py

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 45f131e0e7
2022-04-28 17:46:58 -07:00
Shane Smiskol
12d0a18a05 Clean up controllers (#24340)
* clean up lat controllers

* pass CP once

* sort
old-commit-hash: c9be2f02c3
2022-04-28 00:42:52 -07:00
Shane Smiskol
3e9694d3f3 LatControlTorque: fix deadzone and missing steer saturated warning (#24294)
* fix steer saturated alert and deadzone

* fix and formatting

* update refs

* update refs

* not needed

* remove
old-commit-hash: e834b4d9be
2022-04-27 01:18:05 -07:00
Vivek Aithal
8823b9e4a5 longitudinal_mpc: Compute forward distance from velocity (#24328)
* add vel integ as x in e2e long mpc

* add comment
old-commit-hash: 1a9f5d29d4
2022-04-25 20:15:04 -07:00
Shane Smiskol
82e5b382f1 longActive: consider longitudinal control (#24295)
* consider longitudinal control

* update refs
old-commit-hash: f4d1703b42
2022-04-22 20:32:36 -07:00
Adeeb Shihadeh
75174c93d7 more verbose debug alerts (#24126)
old-commit-hash: 70987fd9d9
2022-04-22 16:12:54 -07:00
HaraldSchafer
2174005f05 Lateral torque-based control with roll on TSS2 corolla and TSSP rav4 (#24260)
* Initial commit

* Fix bugs

* Need more torque rate

* Cleanup cray cray control

* Write nicely

* Chiiil

* Not relevant for cray cray control

* Do some logging

* Seems like it has more torque than I thought

* Bit more feedforward

* Tune change

* Retune

* Retune

* Little more chill

* Add coroll

* Add corolla

* Give craycray a good name

* Update to proper logging

* D to the PI

* Should be in radians

* Add d

* Start oscillations

* Add D term

* Only change torque rate limits for new tune

* Add d logging

* Should be enough

* Wrong sign in D

* Downtune a little

* Needed to prevent faults

* Add lqr rav4 to tune

* Try derivative again

* Data based retune

* Data based retune

* add friction compensation

* Doesnt need too much P with friction comp

* remove lqr

* Remove kd

* Fix tests

* fix tests

* Too much error

* Get roll induced error under 1cm/deg

* Too much jitter

* Do roll comp

* Add ki

* Final update

* Update refs

* Cleanup latcontrol_torque a little more
old-commit-hash: fe0bcdaef6
2022-04-19 19:34:31 -07:00
Adeeb Shihadeh
5a9644261f remove comma two support (#24248)
* remove comma two support

* cleanup release files

* little more

* more libs

* no more gralloc

* add snpe back
old-commit-hash: 5c48e7bc86
2022-04-18 17:55:23 -07:00
Adeeb Shihadeh
e8ad31f32b controlsd: handle controls mismatch race (#24245)
* controlsd: handle controls mismatch race

* update refs
old-commit-hash: 233a167cc9
2022-04-18 17:08:25 -07:00
Adeeb Shihadeh
636c902c65 controlsd: check if process should be running (#24250)
old-commit-hash: 067273b8e7
2022-04-18 14:57:04 -07:00
George Hotz
ebeadd9b41 fix csid map
old-commit-hash: b9e5ad8a64
2022-04-14 13:17:32 -07:00
Gijs Koning
598ba913ae Fix camera error description (#24202)
* Fix camera error message

* Shorter
old-commit-hash: e0845752e3
2022-04-13 09:56:37 -07:00
Adeeb Shihadeh
3789587df1 add alert for CAN bus timeout (#24162)
* add alert for CAN bus timeout

* add alert

* set in interface

* cleanup

* cleanup

* add event

* fix mock

* bump

* bump opendbc

* update refs

* return reader
old-commit-hash: 49c2164814
2022-04-12 22:58:34 -07:00
Adeeb Shihadeh
5ff61e95ad controlsd: fix soft disable while overriding (#24178)
old-commit-hash: 37fc027e98
2022-04-11 10:50:00 -07:00
HaraldSchafer
b0444b39d2 Body cleanup + 100Hz locationd (#24168)
* use PID

* 100hz on the branch

* Better defaults

* fix int clip

* More cleanup

* Fix pid comments

* only notcar gets 100hz

* cleanup

* fix tests

* ignore

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: f54e724b5d
2022-04-09 15:22:29 -07:00
HaraldSchafer
305a7a6bc9 Make PI into a PID (#24151)
* Make PI into a PID

* Cast like before
old-commit-hash: 634f7cebef
2022-04-07 11:34:45 -07:00
Adeeb Shihadeh
e04e6fea87 bump cereal
old-commit-hash: 162e47456c
2022-04-06 22:25:59 -07:00
Adeeb Shihadeh
3683360f86 controlsd: fix long press set speed increment (#24161)
old-commit-hash: 1ea66ee244
2022-04-06 22:03:40 -07:00
Willem Melching
83c103e46a update camera CRC alert text (#24156)
old-commit-hash: fb344021aa
2022-04-06 17:46:56 -07:00
Willem Melching
a47666d1fd add cameraFrameRate alert (#24152)
* add cameraFrameRate alert

* bump cereal
old-commit-hash: 1848050fd9
2022-04-06 17:11:39 -07:00
Willem Melching
871ecc451b commIssueAvgFreq: separate alert for avg freq check (#24150)
* commIssueAvgFreq: separate alert for avg freq check

* bump cereal

* bump cereal

* bump cereal

* freq_ok separate from alive

* bump cereal to master

* update_ref

* fix profiler
old-commit-hash: eaa5819211
2022-04-06 16:43:32 -07:00