Commit Graph

362 Commits

Author SHA1 Message Date
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
Adeeb Shihadeh
6c5b0685da body: set fault state (#24125)
* body: set fault state

* fix that

* update refs
2022-04-04 23:05:40 -07:00
Shane Smiskol
f1f40c117a Add Disengage on Accelerator Toggle (#23977)
* Squashed commit of the following:

commit 953bcf0ecf8d03f0fec9ce0d5442cc660ae2347d
Merge: b4198608d 333257bad
Author: Shane Smiskol <shane@smiskol.com>
Date:   Fri Apr 1 19:58:06 2022 -0700

    Merge remote-tracking branch 'upstream/master' into disengage-on-gas

commit b4198608dac9595bfeb9443f95cd6c5d385cd62d
Merge: 24f90b2c8 0b9790dd2
Author: Shane Smiskol <shane@smiskol.com>
Date:   Fri Apr 1 14:32:54 2022 -0700

    Merge remote-tracking branch 'upstream/master' into disengage-on-gas

commit 24f90b2c8d6ae509c0776b6e33b743467aa08dee
Author: Shane Smiskol <shane@smiskol.com>
Date:   Thu Mar 31 14:07:52 2022 -0700

    revert changes and get ready for override

commit aa514df6b5e8431f0faa07f6b25eb5cb6c9f2749
Author: Shane Smiskol <shane@smiskol.com>
Date:   Wed Mar 30 20:52:24 2022 -0700

    temporary

commit c874e10c2555968c683f629c4582ab22e51d431f
Author: Shane Smiskol <shane@smiskol.com>
Date:   Wed Mar 30 00:30:13 2022 -0700

    move gasPressed to controlsd

commit fe670439dff5bc6dfc5963d79ca2febe0c5920c7
Merge: 49d3b6d11 81862fce7
Author: Shane Smiskol <shane@smiskol.com>
Date:   Wed Mar 30 00:15:48 2022 -0700

    Merge remote-tracking branch 'upstream/master' into disengage-on-gas

commit 49d3b6d1162893fa94b2294152f0718eeb4698ed
Merge: 475b27e74 d60c44e03
Author: Shane Smiskol <shane@smiskol.com>
Date:   Mon Mar 28 13:06:08 2022 -0700

    Merge remote-tracking branch 'upstream/master' into disengage-on-gas

commit 475b27e74fd6479f1d148e9ded1eca6ee476865c
Author: Shane Smiskol <shane@smiskol.com>
Date:   Thu Mar 24 20:24:59 2022 -0700

    update SAFETY.md

commit 0798eadb82749e12ecbaa86f4e57b21bd3dbc7e8
Author: Shane Smiskol <shane@smiskol.com>
Date:   Thu Mar 24 17:52:06 2022 -0700

     ➡️ 🔋

    bump

commit d2b64b89cf8d7265bc90848b4e3a2276c9a4cb78
Author: Shane Smiskol <shane@smiskol.com>
Date:   Thu Mar 24 16:19:34 2022 -0700

    these changes will be in border PR

    these changes will be border PR

commit bed31e63de2244c161729773978fef8a9246ddb5
Merge: 491417640 e91613bc6
Author: Shane Smiskol <shane@smiskol.com>
Date:   Thu Mar 24 16:17:31 2022 -0700

    Merge remote-tracking branch 'upstream/master' into disengage-on-gas

commit 49141764098e3a701ff123ead52de4656b31db4d
Merge: 9291e9f00 c88ced1f1
Author: Shane Smiskol <shane@smiskol.com>
Date:   Wed Mar 23 19:00:26 2022 -0700

    Merge remote-tracking branch 'upstream/master' into disengage-on-gas

commit 9291e9f0045780669b2ffa7f08fb10373c03b070
Merge: 2aed64157 99c02bdd2
Author: Shane Smiskol <shane@smiskol.com>
Date:   Fri Mar 18 19:03:13 2022 -0700

    Merge remote-tracking branch 'upstream/master' into disengage-on-gas

commit 2aed64157d6e9dc993d103a2c6abf7e643410562
Author: Shane Smiskol <shane@smiskol.com>
Date:   Fri Mar 18 19:03:03 2022 -0700

    Revert "send pre-enable state when gas is pressed"

    This reverts commit 8d82e697dc2efade307413e767d14b56b4d2d079.

commit a219defe5342efa731a957b2ff4fd86292c1f239
Author: Shane Smiskol <shane@smiskol.com>
Date:   Thu Mar 17 12:50:46 2022 -0700

    bump cereal

commit 8d82e697dc2efade307413e767d14b56b4d2d079
Author: Shane Smiskol <shane@smiskol.com>
Date:   Wed Mar 16 22:40:13 2022 -0700

    send pre-enable state when gas is pressed

    formatting and it's out

    forgot one

    allow gas press

    show toggle

    revert changes

    revert changes

commit 5eb4d1ab1b77ac65bdd901f692ebfb848d5187ca
Merge: bad1bdc74 db7b49c71
Author: Shane Smiskol <shane@smiskol.com>
Date:   Wed Mar 16 22:29:43 2022 -0700

    Merge remote-tracking branch 'upstream/master' into disengage-on-gas

commit bad1bdc7428c5d8a4a765b259da504f0ade84424
Author: Shane Smiskol <shane@smiskol.com>
Date:   Tue Mar 15 23:03:56 2022 -0700

    clean up a bit

commit 7516ed9b786536a07f00a92b9c1742ca252a01d1
Author: Shane Smiskol <shane@smiskol.com>
Date:   Tue Mar 15 22:55:09 2022 -0700

    these are null checks right now

commit 408f5f1d633521b29b08d966c9b387fa79dff0d6
Author: Shane Smiskol <shane@smiskol.com>
Date:   Tue Mar 15 22:51:14 2022 -0700

    should work

commit be1978e29c03d8843cf073cc9ddf84020fd2b378
Author: Shane Smiskol <shane@smiskol.com>
Date:   Tue Mar 15 22:36:16 2022 -0700

    stash

commit f0bd4c47e9d27061c6cd3b88765a7c10995f42db
Author: Shane Smiskol <shane@smiskol.com>
Date:   Tue Mar 15 22:26:24 2022 -0700

    this was flipped

commit d5b6e30389a727e8559331acd706422e1b246f60
Merge: 820b19894 5fe00fb77
Author: Shane Smiskol <shane@smiskol.com>
Date:   Tue Mar 15 22:25:49 2022 -0700

    Merge remote-tracking branch 'upstream/master' into disengage-on-gas

commit 820b1989496225df1f66f39b477f1e9402db1b19
Merge: 91763f9ff d7c758d4b
Author: Shane Smiskol <shane@smiskol.com>
Date:   Mon Mar 14 23:39:34 2022 -0700

    Merge remote-tracking branch 'upstream/master' into disengage-on-gas

commit 91763f9ff4321986babce1a7b1272fcf64c8f753
Author: Shane Smiskol <shane@smiskol.com>
Date:   Thu Feb 24 20:15:26 2022 -0800

    add icon from jozef 🔥

commit 1885c9e2bacd9351c7e421b1436dcbfbde238436
Merge: 1f591736a 9c70e8bca
Author: Shane Smiskol <shane@smiskol.com>
Date:   Thu Feb 24 20:08:07 2022 -0800

    Merge remote-tracking branch 'upstream/master' into disengage-on-gas

commit 1f591736a2767b1ed892c29ec5000cc7348f01c7
Merge: 465811f0b 7410160d0
Author: Jason Wen <47793918+sunnyhaibin@users.noreply.github.com>
Date:   Sat Feb 12 10:24:29 2022 -0500

    Merge branch 'master' into disengage-on-gas

commit 465811f0b4776e43a289398e4d4369362b7da58c
Author: Jason Wen <haibin.wen3@gmail.com>
Date:   Fri Feb 11 11:20:32 2022 -0500

    Add param to process replay

commit 0344363a533505435cff87eb33356b2364a4156f
Merge: 700efcb3f 3e915cf62
Author: Jason Wen <47793918+sunnyhaibin@users.noreply.github.com>
Date:   Fri Feb 11 11:07:31 2022 -0500

    Merge branch 'master' into disengage-on-gas

commit 700efcb3f444092f99ef10e9908f83402429d742
Author: Jason Wen <haibin.wen3@gmail.com>
Date:   Fri Feb 11 11:04:39 2022 -0500

    Add param to unsafeMode

commit 220ce272fee1f7f5ace2a04052605a6e4f95712b
Author: Jason Wen <haibin.wen3@gmail.com>
Date:   Fri Feb 11 10:54:16 2022 -0500

    Add param to unsafeMode

commit d273bb78acbc23ee5255e461fa71b2f0400a5e03
Author: Jason Wen <haibin.wen3@gmail.com>
Date:   Fri Feb 11 10:52:22 2022 -0500

    Resolve conflicts

commit 1a85afd60c2f0d3140dfa8e7cd574d6b88abd5e3
Author: Jason Wen <haibin.wen3@gmail.com>
Date:   Fri Feb 11 10:51:50 2022 -0500

    Resolve conflicts

commit e3be32afc2bb2423d29e2b4f85b3cff3fe72aab9
Author: Jason Wen <haibin.wen3@gmail.com>
Date:   Fri Feb 11 10:51:08 2022 -0500

    Resolve conflicts

commit f27203af3afe612173bf9a63e15c57118598b5b8
Author: Jason Wen <haibin.wen3@gmail.com>
Date:   Wed Jan 19 00:30:09 2022 -0500

    Add param to process replay

commit 04c0ad1a54f4fea5efe74b3203d9bdbd693b64a6
Author: Jason Wen <47793918+sunnyhaibin@users.noreply.github.com>
Date:   Wed Jan 19 00:28:49 2022 -0500

    Update interfaces.py

    Co-authored-by: Willem Melching <willem.melching@gmail.com>

commit 99cf13caeb4d9f2c95c25e1e78b6e353ea508cb6
Author: Jason Wen <haibin.wen3@gmail.com>
Date:   Sat Jan 15 00:03:38 2022 -0500

    Fix missing params lib

commit 2230254ca709625d591b0c73d1a6022c450f6ef6
Author: Jason Wen <haibin.wen3@gmail.com>
Date:   Fri Jan 14 23:38:46 2022 -0500

    Disengage on gas toggle

commit 87475e02cb63cc39c9b16edc67f303e02d17e6ef
Author: Jason Wen <haibin.wen3@gmail.com>
Date:   Fri Jan 14 23:24:00 2022 -0500

    Disengage on gas toggle

* bump

* use ALTERNATIVE_EXPERIENCE

* or it

* de-bump

* update refs

* update refs!

* you can just ctrl+click ALTERNATIVE_EXPERIENCE!

* already have a params

* update text
2022-04-04 21:59:52 -07:00
Adeeb Shihadeh
00ebd10b87 body: only control while engaged (#24114)
* body: only control while engaged

* bump panda

* remove that

* bump panda

* update refs

* update refs
2022-04-04 19:37:21 -07:00
Igor Biletskyy
7df1c025ae body: add crc and counter (#24120)
* add crc and counter for body

* add msg

* move counter

* whitespace

* ..

* bump opendbc

* update_refs
2022-04-04 19:19:30 -07:00
Adeeb Shihadeh
7dffd0ac0b calibrationd: support for not cars (#24115)
* calibrationd: support for not cars

* update refs
2022-04-04 17:04:15 -07:00
HaraldSchafer
b2b6205e25 Body leash tune (#24105)
* Cleanup variables

* Add clips

* Add good standstill for localizer

* Need abs

* Only on startup

* Cleanup more

* remove violence

* Unused variable

* Update ref

* Not good idea for now

* Update refs again
2022-04-04 14:41:18 -07:00
Shane Smiskol
18e7f85f70 Hyundai: always update set speed (#24104)
* don't reset set speed

* update refs
2022-04-04 10:51:58 -07:00
Shane Smiskol
a4353303d4 update refs 2022-04-01 22:39:08 -07:00
Adeeb Shihadeh
e40c36f22b better support non-car robots (#24106)
* better support non-car robots

* bump cereal

* update refs
2022-04-01 20:03:20 -07:00
Adeeb Shihadeh
0b9790dd24 locationd: body support (#24098)
* body: locationd support

* fewer hacks

* my body is never still

* body on localizer

* minor change

* move wait back to 5 secs

* update refs

* try again

Co-authored-by: nuwandavek <vivekaithal44@gmail.com>
Co-authored-by: Comma Device <device@comma.ai>
2022-03-31 23:02:47 -07:00
Igor Biletskyy
031f79ba88 car port: comma body (#24019)
* body FPv2

* ..

* ..

* ..

* Temp, REVERT!

* more cleanup

* typo

* ..

* del eyes

* should work?

* fix

* new dbc

* ..

* fixes

* static analysis

* cln balancing code

* no test route

* excluded_interfaces

* THE DOCS!

* comments on steer/speed mixin

* switch to bus 0

* less UDS

* FAKE bus 0 vin and fingerprint

* FAKE locationd

* Keep steady and remove handcoded offset

* Improve startup sequence, get closer to stock openpilot

* Forgot to define angle

* lowercase

* revert that

* little cleanup

* change safety model

* update refs

* body is gold

* handle no llk

* oops

* litte more

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-03-31 17:16:15 -07:00
Adeeb Shihadeh
49498aa7b5 controlsd: no cruise speed while main off (#24052)
* controlsd: no cruise speed while main off

* probably more accurate

* update refs
2022-03-27 18:06:28 -07:00
HaraldSchafer
adf34c3414 CarParams: remove max steer (#24044)
* Remove max steer

* Update ref
2022-03-25 17:33:11 -07:00
Shane Smiskol
c88ced1f10 Honda Nidec: don't actuate while longitudinal is inactive (#24028)
* don't command any pcm_speed when long is not active

* update refs
2022-03-23 18:30:05 -07:00
HaraldSchafer
4a8fffd0f4 Apply EU guideline lateral limits (#23974)
* Apply EU limits

* Lower bound v_ego

* Add curvature limit comment

* Remove comment

* Update ref
2022-03-22 19:46:04 -07:00
HaraldSchafer
dcece099ff Add angular rates carcontroller packet (#23980)
* Controlsd: give carcontroller angular rates

* Update cereal

* Needs to be list

* Update refs
2022-03-16 21:12:11 -07:00
Shane Smiskol
5fe00fb773 Move gas/brake pedal event logic to controlsd (#23850)
* move some state machine logic to controlsd

move some state machine logic to controlsd

* same order

same order

* move unsafeMode up

* disable at standstill

* save last CS

save last CS

* do we need to copy at all?

* don't copy

* rename

* Update selfdrive/controls/controlsd.py

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

* Revert "Update selfdrive/controls/controlsd.py"

This reverts commit 10bb51a0f0ee0d8e2a27c746a0638280a5eaea8a.

* Update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-03-15 20:51:07 -07:00
ZwX1616
de4031c98e DM: more precision running on DSP + e2e outputs (#23900)
* update cereal

* run but not use

* log distraction type

* regression scaling

* clean up naming

* add calib buf

* add to header

* fake model

* no calib model

* adjust threshs

* 018a305f

* fix bn

* tweak1

* tweak2

* 0ff2/666

* tweak3

* t4

* t5

* fix out of bound

* skip when replaying old segments

* update ref

* fix onnxmodel

* get calib

* update model replay refs

* up ref
2022-03-15 19:02:21 -07:00
Vivek Aithal
dfc1292614 locationd: Commissue fix (#23951)
* check allAliveAndValid only at filter init

* revert cereal and bugfix test

* rename filterValid to filterInitialized

* bump cereal

* correct err

* update refs
2022-03-15 14:40:29 -07:00
Adeeb Shihadeh
f1aab78d08 longitudinal MPC: add MAX_T in T_IDXS_LST (#23960)
* longitudinal MPC: add MAX_T in T_IDXS_LST

* update refs

Co-authored-by: KexianShen <shenkexian@gmail.com>
2022-03-13 21:45:23 -07:00
Shane Smiskol
629399a449 carControl: add long and lat active fields (#23859)
* proof of concept

* actuators packet describes which actuators are active

* bump cereal

* fixes

* not needed for this PR

* Do Toyota

* add back controlsState.active

* bump cereal

* rest of cars

* in actuators

* add active back

* which

* use controlsState.active for now

* will make an issue

* Update selfdrive/controls/controlsd.py

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

* move local lat_active checks into CC.latActive

* remove redundant checks

* move comment

move comment

* fix joystick mode

* get enabled from carcontrol

* do standstill check in controlsd

* make sure we consider the gas press case for GM

* use CC.actuators

* fix

* capitalization

* Bump cereal

Bump cereal

* make intermediate actuators

* similar convention to before

* clean that up

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-03-13 20:58:44 -07:00
Shane Smiskol
274885fc4d controlsd: fix vCruise jumping on pcmCruise cars (#23388)
* clean up v_cruise_kph

fix

fix

* Revert "clean up v_cruise_kph"

This reverts commit 211b5c3dbe073414ef5c39b19d6d2c6e8de2cf0b.

* always update vCruise and don't init if pcmCruise

* revert change

* update refs
2022-03-03 05:23:14 -08:00
Jonathan Frey
ab371f888a Longitudinal MPC set qp tolerance to 1e-3 (#23899)
* initialize solverExecutionTime longitudinal_planner

* test_onroad: improve timing evaluation

* longitudinal MPC: set qp_tol to 1e-3

* update ref

Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
2022-03-02 21:38:40 -08:00
Jonathan Frey
1801baba68 remove trivial terminal constraint and associated CasADi generated functions (#23898)
* remove trivial terminal constraint and associated CasADi generated functions

* Update refs

Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
2022-03-02 20:53:21 -08:00
Vivek Aithal
7e6903b58f locationd, paramsd: Check conditions before updating kalman filters (#23789)
* update filters only when all messages are alivbe and valid

* update message valid and fix unit test

* update refs

* move check outside loop

* modify fake message fn in test

* deprecate inputsOK and resolve PR comments

* avoid double looped list comprehension

* follow import conventions

* modify paramsd valid to only be invalid in case of commIssue

* update refs
2022-03-02 01:01:29 -08:00
Jonathan Frey
d09dffb7cd Cython acados and minor (#23835)
* acados_ocp_solver_pyx.pyx: implement get_stats for timings and ints

* long_mpc: use acados timers

* acados_ocp_solver_pyx.pyx: fix dynamics_get

* acados_ocp_solver_pyx.pyx: get statistics

* use acados_ocp_solver_pyx.pyx from commaai/cython2 branch

* acados_ocp_solver_pyx.pyx: implement store_iterate

* acados_ocp_solver_pyx.pyx: implement get_residuals

* acados_ocp_solver_pyx.pyx: fix set() for empty fields

* acados_ocp_solver_pyx.pyx: load_iterate

* cython acados: add print_statistics

* test_following_distance: fix typo

* test_longitudinal: unique names for test maneuvers

* longitudinal MPC: comments for evaluation

* longitudinal MPC: add comments to eval acados residuals

* long_mpc: use qp_solver_cond_N = 1

* long MPC: comments, simplify set_cur_state

* update acados version in build script

* longitudinal mpc: weigh a_change in 1 place only

* update ref

* Update ref

Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
2022-02-25 14:16:44 -08:00
Adeeb Shihadeh
04b2545ec0 Subaru: remove Impreza CAN fingerprints (#23841)
* Subaru: remove Impreza CAN fingerprints

* fix process replay

* update refs
2022-02-23 15:44:17 -08:00
Willem Melching
428d412c1f longitudinal planner: disable change cost when stopped. not engaged or gas pressed (#23639)
* disable change cost completely on standstill and gas press

* cleanup

* set accel to zero

* clean up logic around standstill

* update ref
2022-02-21 16:14:41 +01:00
Shane Smiskol
2c7845fce0 Longitudinal control: interpolate longitudinal plan (#23787)
* interpolate longitudinal actuator delay

rename

* formatting

* interpolate v_target most importantly!

* fix interpolation and rename

* nicer setup

* left in from testing

* update refs
2022-02-18 00:45:00 -08:00
Willem Melching
14260c01c6 process replay: fix branch name alert (#23783)
* env is modified after start

* update ref
2022-02-17 16:47:42 +01:00
Adeeb Shihadeh
f59adbeaaa keep the new alert consistent for process replay 2022-02-16 23:47:02 -08:00
Adeeb Shihadeh
ff965c772b add branch name to startup master alert (#23782)
* add branch name to startup master alert

* still orange

* update refs
2022-02-16 20:27:07 -08:00