Commit Graph

394 Commits

Author SHA1 Message Date
Jason Shuler
9279c02258 GM: prep and cleanup for future ports (#24910)
* Interface radarOffCan set, comments

* pass pcmCruise value to common events

* add transType and networkLoc to iface

* carstate use transtype to detect EV

* ctrl: limit sends by config

* Add clarifying comments for new vals

* clean up

* comment on new line

* these have the same frequency

* remove 25hz

* add to upper comment

* update refs

* update refs

* move into same block

move into same block

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2022-06-30 15:47:26 -07:00
Shane Smiskol
f0062f6242 Toyota: fix BSM detection (#24964)
* revert to 1 second

* Revert "revert to 1 second"

This reverts commit 6ab3f75cb73fdfe254431c479b6d337030b0d538.

* Revert "remove toyota can fingerprinting exceptions (#22803)"

This reverts commit d8f5e8b7a4.

fix static analysis

* Revert "Revert "remove toyota can fingerprinting exceptions (#22803)""

This reverts commit fc359fc9b2db146d77b6533be9e7434f08a665df.

* 1 second for all brands

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-06-30 15:01:52 -07:00
Gijs Koning
c49f997be5 Add laikadOffline subtest to process replay. (#24995)
* Add subtests to process replay.
Adds laikadOffline subtest

* Update cpp.

* Update ref

* Update ref again

* Update ref again

* update ref

* Fix disabling fetching orbits

* Add proc name to event exception

* update ref

* Update setup_env

* Fix offline test and update refs
2022-06-30 08:39:12 -07:00
Shane Smiskol
75f5282e83 Chrysler: fix steering angle signals (#24926)
* Chrysler_Update

* only steering

* revert other changes for now

only steering

* bump

* Update ref_commit

* bump opendbc

* update refs

Co-authored-by: Jonathan <jraycec@gmail.com>
2022-06-28 14:19:17 -07:00
Willem Melching
3823f55476 add laikad to process replay (#24889)
* merge

* Fix closing process executor after fetching orbits

* cleanup

* Add ref commit and revert test_processes hack

* Fix

* Fix ref

* Fix test

* Temp

* Temp

* Trying

* Trying

* Cleanup and change test

* add ref commit

* remove print

* fix test getting stuck

* cleanup fetch_orbits

Co-authored-by: Gijs Koning <gijs-koning@live.nl>
2022-06-28 13:43:15 +02:00
HaraldSchafer
b3226d505b Torque control: higher low speed gains and better steering angle deadzone logic (#24980)
* Try no friction and no deadzone

* Learn fromd ata

* update refs
2022-06-27 15:25:47 -07:00
Willem Melching
de0c12e5af calibrationd: start faster by not waiting for carParams (#24976)
* calibrationd: start faster by not waiting for carParams

* fix process replay

* update ref
2022-06-27 15:34:36 +02:00
HaraldSchafer
2deaf69789 Refactor torque stuff (#24921)
* Refactor torque stuff

* Add to release

* Add substitute and override

* Maxlataccel is required

* Add to asserts

* add ideal car

* Need china too

* yamls already linted

* Fixed some bugs

* Fixup

* Unreliable data

* Add cehck

* Better comment

* ref commit update
2022-06-22 15:58:06 -07:00
Shane Smiskol
789f2d195c compatibility docs: fixup steering torque star (#24940)
* Ascent has good torque, hard code Toyota, print all unexpected torque star cars

* update docs

* Use subtests

* hardcode CHR for now

generate

* Hard code Impreza

* update refs
2022-06-22 01:03:29 -07:00
Shane Smiskol
dd67853526 update refs 2022-06-21 22:40:16 -07:00
HaraldSchafer
9283040d84 Rocket league model (#24869)
* dd9a502d-c8e2-4831-b365-804b0ae0739d/600 80041070-d276-4fed-bdb9-0075e5442908/420

* no elementwise op

* 9dabf0fe-2e60-44bf-8d3a-d20a74aca072/600 ae746590-0bb5-4a16-80db-15f02d314f03/300 c4663a12-b499-4c9b-90dd-b169e3948cb1/60

* explicit slice

* some copies are useful

* 1456d261-d232-4654-8885-4d9fde883894/440 c06eba55-1931-4e00-9d63-acad00161be0/700 af2eb6ba-1935-4318-aaf8-868db81a4932/425

* 154f663e-d3e9-4020-ad49-0e640588ebbe/399 badb5e69-504f-4544-a99e-ba75ed204b74/800 08330327-7663-4874-af7a-dcbd2c994ba7/800

* set steer rate cost to 1.0

* smaller temporal size

* Update model reg

* update model ref again

* This did upload somehow

* Update steer rate cost

Co-authored-by: Yassine Yousfi <yyousfi1@binghamton.edu>
2022-06-15 15:29:42 -07:00
HaraldSchafer
a6652a539d Torque control: low speed boost (#24859)
* Make very low speed more aggressive

* Less extreme low speed boost

* Update ref
2022-06-14 22:29:08 -07:00
HaraldSchafer
dbfe923ecc Move couple toyotas to torque table values (#24849)
* Move couple toyotas to torque table values

* Dont set for all cars yet

* Dont regress docs

* update ref
2022-06-13 19:08:09 -07:00
HaraldSchafer
843e59f6f0 Misc torque control fixes (#24801)
* Fiction compensation should be based on error

* Update refs

* Add deadzone

* update ref
2022-06-10 22:52:48 -07:00
HaraldSchafer
3066ad81a8 Car interface: set max lateral torque from table (#24789)
* json

* better naem

* Read from table

* formatting and default to nan

* Generate docs

* Read from table

* this should be the same

* Prius v is full

* test we always set the tunes correctly

add to release files

* Set for all cars

Set for all cars

* Revert tuning changes

Revert tuning changes

* remove that

* fixes

* update ref commit for new maxLateralAccels

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2022-06-10 17:57:23 -07:00
Shane Smiskol
1b402687e4 docs: adjust steering torque thresholds (#24798)
* Prius has good steering control now

* 1.5 is the threshold for good torque

* get back down there, hondas

* half stars for 1.0-1.5

* show number of cars

* try bigger

* emphasize tiers

balanced

* Add half star

* Update ref_commit
2022-06-09 18:51:34 -07:00
Shane Smiskol
c6bc03311c 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...)
2022-06-03 17:41:20 -07:00
HaraldSchafer
7f16e19f79 Remove laneless toggle (#24738)
* Remove laneless toggle

* Update refs
2022-06-03 14:04:14 -07:00
Willem Melching
f49a9c9fd2 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>
2022-06-02 15:20:51 +02:00
HaraldSchafer
d708a134bd Tssp prius torque control (#24669)
* use llk

* use steering sensor at low speed stil

* Try more simple

* rm prius tune

* updated ref
2022-05-27 10:21:02 -07:00
HaraldSchafer
d928972150 Rerevert torque control (#24649)
* Revert "Revert torque control (#24565)"

This reverts commit 9f8b03753d.

* Move tune out of car specific stuff

* Update ref commit
2022-05-24 17:52:33 -07:00
HaraldSchafer
9f8b03753d Revert torque control (#24565)
* torque reversal start

* Fix carmodel tests

* Update ref

* update ref

* Elif is better than if
2022-05-17 19:00:57 -07:00
Shane Smiskol
6518ecca8f 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>
2022-05-12 16:59:52 -07:00
HaraldSchafer
29afd53d88 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
2022-05-06 22:17:21 -07:00
ntegan1
9a44d4c4e0 LatControlTorque: log desired/actual lateral accel (#24406)
* log torque lateral accel

* bump cereal

* update refs

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2022-05-03 14:18:46 -07:00
Adeeb Shihadeh
986a991a09 body: log charging status (#24409)
* body: log charging status

* update refs
2022-05-03 13:27:19 -07:00
HaraldSchafer
8cdeaf9aee Latcontrol torque: update tuning (#24357)
* Little more chill

* Update ref

* Update refs
2022-05-02 14:42:18 -07:00
Shane Smiskol
4190d2608a Change safetyParam to uint16_t (#24376)
* bump panda & cereal

* bump panda

* rest of references

* regen TOYOTA with safety param 578, TOYOTA2 with 329

* regen rest of routes

* update ref

* bump cereal
2022-05-02 13:34:31 -07:00
Keyvan Fatehi
0bbfc63c9c body: add fuelGauge to body carState (#24386) 2022-05-01 18:41:50 -07:00
Adeeb Shihadeh
be748c0d6a 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
2022-04-29 13:36:25 -07:00
Shane Smiskol
c1caca104f Support RAV4 Hybrid 2022 with stock longitudinal (#23969)
* add panda flag for toyota stock long with camera

* clean up

* Add 2022 RAV4 Hybrid from Philly

* fix wrong fw in interface, did this ever work?

* Must be a hybrid

* no radar parsing

* fix can error

* move to own platform

* generate docs

* fix

* Add 2022 Rav4 XSE Australia fingerprint parameters (#24303)

* Update values.py

Add 2022 Rav4 XSE Australia

* add commas

Co-authored-by: Shane Smiskol <shane@smiskol.com>

* bump panda

* wait, the camera doesn't even send 0x343, right?

* use a set instead, more obvious

* don't test without a parser

* bump panda

* flip panda flag

* bump panda

* add commas

* regen and update refs

* set to none by default

* revert parenthesis

* update comment

* bump panda

* regen and update refs

* add test models and update readme

* bump to master

Co-authored-by: BrettLynch123 <34538435+BrettLynch123@users.noreply.github.com>
2022-04-28 22:37:46 -07:00
Shane Smiskol
66dd8f934c safety param: make uint16_t (#24362)
* only use half of the available bytes

* move to set_safety_model

* regen and update refs

* last two

* bump to master
2022-04-28 17:56:34 -07:00
Adeeb Shihadeh
3e098c9ba5 Toyota: add safety param flag for alt brake message (#24341)
* Toyota: add safety param flag for alt brake message

* update refs

* update refs

* bump panda
2022-04-27 12:08:11 -07:00
Shane Smiskol
e834b4d9be 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
2022-04-27 01:18:05 -07:00
Shane Smiskol
efa98d2a06 HKG: only allow engagement on user button press (#24140)
* use deque for prev_cruise_buttons

* stash

* disallow engagement if resume or decel isn't pressed

* fix buttons

* reduce chances of causing 30-frame fault

Fix clu11

drive down cancel times

* Revert "reduce chances of causing 30-frame fault"

This reverts commit 0f54c051bf5a22b1f584718ec46e78bc3a82a0dd.

* consider pause/resume button

* stash

* Revert "stash"

This reverts commit 551ca7be6c45729f0747abc81cd81894cd621c32.

* sadly some cars need 8 op frames (identical to 4 updates from CLU11)

* add main button

* 6 should be safe

* use max

* clean up

* change to 4 samples and process all messages received, like panda

* bump panda

* test: replay segments with known re-engagements on-device

* Revert "test: replay segments with known re-engagements on-device"

This reverts commit 9730c3c14f942b82b6ed5ef2e81b8ae0126f3006.

* need prev_cruise_buttons as we don't run every CAN message through carstate

* more generic

* extend

* Update selfdrive/car/interfaces.py

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

* 3% faster at 1000000 loops

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-04-26 13:27:28 -07:00
Shane Smiskol
f4d1703b42 longActive: consider longitudinal control (#24295)
* consider longitudinal control

* update refs
2022-04-22 20:32:36 -07:00
Shane Smiskol
6e62df65d7 Make safetyParam unsigned (#24160)
* bump panda & cereal

* make unsigned in boardd

* update health packet version

bump panda

* fix definition

* bump

* regen TOYOTA2 route

* upload route

* oh, ndog param wasn't being set

* regenerate routes with non-zero safety params

* update refs

* regen routes and update refs

* bump panda

* update refs

* update refs

* bump submodules to master
2022-04-21 00:01:05 -07:00
Shane Smiskol
17cb65c4b7 Toyota: resolve controls mismatch due to interceptor thresholds (#23710)
* remove gas interceptor exception

* panda

* bump submodules

* bump panda

* forgot carstate change

* revert

* add test route

* bump

* update refs for CS.gas

* bump submodules to master
2022-04-20 22:28:56 -07:00
Adeeb Shihadeh
b42b3a8f9f update refs after VW signal removal 2022-04-20 13:38:59 -07:00
Shane Smiskol
6de434f2ec Honda: do same standstill check as panda (#24262)
* check standstill against panda

* use XMISSION_SPEED for all, and compare to 0

* fix

* only check for Honda for now

* update comment

* update refs

* update refs and update check

* phantom commit
2022-04-19 23:18:01 -07:00
HaraldSchafer
fe0bcdaef6 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
2022-04-19 19:34:31 -07:00
Adeeb Shihadeh
233a167cc9 controlsd: handle controls mismatch race (#24245)
* controlsd: handle controls mismatch race

* update refs
2022-04-18 17:08:25 -07:00
Adeeb Shihadeh
49c2164814 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
2022-04-12 22:58:34 -07:00
HaraldSchafer
f54e724b5d 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>
2022-04-09 15:22:29 -07:00
Shane Smiskol
0f61a388c3 GM: resolve cruise faults (#24167)
* these should be enabled

* bump panda

* bump

* allow in pre-enabled state

* bump panda

* add comment

* bump and update refs

* bump panda

* bump panda
2022-04-07 20:44:09 -07:00
Willem Melching
eaa5819211 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
2022-04-06 16:43:32 -07:00
George Hotz
7dd71cc63d body: control with joystick (#24143)
* control with joystick

* slow it down

* always joystick for not car

* clean ups

* not stateful

* move submaster

* only if we aren't in test mode

* update refs

* double ki speed, update ref

* this ref

Co-authored-by: Comma Device <device@comma.ai>
2022-04-06 11:31:31 -07:00
George Hotz
596417da37 update ref commit for body tune change 2022-04-05 21:40:13 -07:00
Lukas Petersson
65fca83abe Latency logging 2 (#24058)
* msg_order and gantt

* frameId in long/lat planner

* track frame id

* controls frame id

* graph tracked events

* graph json

* cloudlog timestamp

* c++ cloudlog

* add frame id

* bug fixes

* bug fixes

* frame id visionicp

* bug fixes and debug level

* timestamp log placement

* print timestamps in table

* translate events

* more logging

* bug fixes

* daemon boardd

* print logs with boardd

* more timestamp logs

* cleanup

* remove publish logs

* bug fix

* timestamp received

* timestamp received

* bug fixes

* use json lib

* ignore driver camera

* prep for new timestamp pipeline

* bug fix

* read new pipeline unfinnished

* read new pipeline

* bug fix

* add frame to controlsstate

* remove controlsstate

* print

* cleanup

* more cleanup + bug fix

* clock build issue

* remove unused imports

* format durations

* increase speed

* pr comments fixes

* conflicts

* set MANAGER_DAEMON for boardd

* clean script code

* bug fix + argparse

* remove rcv time

* bug fixes

* print without tabulate

* fix pre-commits

* plot gnatt

* color bug fix

* read without timestampextra

* bump panda

* mono time instead of frame id

* finnish script

* clean unused

* clean unused logging

* monotonic + json fixes

* del test

* remove whilelines

* bump laika

* cleanup

* remove deps

* logs nicer strings

* remove plotting from scirpt

* reset pipfile

* reset pipfile

* nicer strings

* bug fix

* bug fix

* pr comments cleaning

* remove plotting

* bug fix

* new demo route

* bump opendbc and panda

* cereal master

* cereal master

* script less komplex

* assertions

* matplotlib

* readme

* Update README.md

* graph html

* design fixes

* more code design

* Update common/logging_extra.py

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

* whitespace

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

* Update tools/latency_logger/latency_logger.py

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

* pr comments

* bug fix

* readme + env once

* clean swaglog

* bug fix

* Update tools/latencylogger/README.md

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

* revert

* revert

* clean swaglog with error

* remove typo file

* revert graph

* cereal

* submodules

* whitespaces

* update refs

Co-authored-by: Bruce Wayne <batman@workstation-openpilot2.internal>
Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-04-05 21:05:45 -07:00
Igor Biletskyy
7908fb8829 body: add debug ECU for git hash logging + fw version (#24128)
* non-essential ECU for logging

* bump cereal

* debug ECU

* match_fw_to_car_exact

* comment

* version instead of board date

* add old compatible value

* update_refs
2022-04-05 18:24:06 -07:00