Commit Graph

1034 Commits

Author SHA1 Message Date
Maxime Desroches
a78c63cf7b Remove control usage (#33103)
* manual matrix exp

* remove control
old-commit-hash: 01c07569741a84fae9a7fe9c8ef1830d59822f63
2024-07-29 11:52:33 -07:00
Harald Schäfer
543e691203 Longcontrol: engage into stopped state when needed (#33042)
test stay stopped
old-commit-hash: 3bc1b173d2390a93b0c31090861bbc597eff4d2c
2024-07-23 13:55:30 -07:00
Jason Wen
0a667d79d0 espActive: IMMEDIATE_DISABLE -> SOFT_DISABLE (#33003)
* espActive: `IMMEDIATE_DISABLE` -> `SOFT_DISABLE`

* only stock long

* just soft disable for now

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: a654e5bd05811a896005ebb41bc2f15dcf443b5d
2024-07-22 13:09:00 -07:00
Greg Hogan
a3aa8c5eaf use rounded constant instead of hard-coded value for incrementing set speed (#32992)
* use rounded constant instead of hard-coded value for incrementing set speed

* better comment
old-commit-hash: 4b794773b0486a15732ce5551771584af7c41e43
2024-07-16 18:24:01 -07:00
Shane Smiskol
a878118b00 Revert "selfdrive/car: ban imports from external modules" (#32993)
Revert "selfdrive/car: ban imports from external modules (#32973)"

This reverts commit c1e8ff2dbc47ccb07fb41a4e88bfb66af2669254.
old-commit-hash: 35a4a773f1ff6c7b171b7acdb2fd4a65279edebd
2024-07-15 11:14:04 -07:00
Dean Lee
58df39a2ba selfdrive/car: ban imports from external modules (#32973)
* lint import

* Update selfdrive/car/__init__.py

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 83d4623590f87dcb7df2b458a8814d5ad6ea711b
2024-07-15 11:12:24 -07:00
Shane Smiskol
68fc530eca long planner: formatting
old-commit-hash: 71dd1e2ff6768c649d3d885d30280d9ca46841a4
2024-07-11 14:06:51 -07:00
Dean Lee
45c3992e43 CarParams: set no traversal limit (#32929)
* Increase traversal_limit_in_words to Fix Traversal Limit Errors

* just use log_from_bytes

* come on pycharm

* no free lunch

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 12d729a0a0c3c1d9bbf988c09ea3a5b68433e83f
2024-07-08 13:50:31 -07:00
Shane Smiskol
3953eba4ac controlsd: no mutable carParams (#32381)
* no as builder

* fix car int test

* more
old-commit-hash: c95b58401afe475b07634041e71ede63b9f3875f
2024-07-02 13:27:45 -07:00
Dean Lee
7718d6f7ec radard: readable KalmanParams initialization (#32848)
fix kalmanparams initialization bug
old-commit-hash: 649e7a6d558b33d05d63012a43b2e4af88262b4c
2024-06-27 14:43:21 -07:00
James
7606bf60ad Cleanup "longitudinalPlan" fields (#32845)
old-commit-hash: 046ed7e9f8c69423c25e15f97bfd5783734dc551
2024-06-26 14:51:27 -07:00
Jason Wen
ecb9dfecff Hyundai CAN: Log ABS/ESP Activation to espActive (#32743)
* Hyundai CAN: Log active ABS to accFaulted

* Add comments

* `espActive` to CarState and CarEvent.EventName

* re-order

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 36eafc0dc6ea73bcc59df216a3231ae54960a282
2024-06-24 20:14:57 -07:00
Harald Schäfer
b4a0c211f0 Long planner: small cleanup (#32804)
old-commit-hash: 442e9f4ae492901a5698b3188741c97c053026c4
2024-06-20 16:33:06 -07:00
Harald Schäfer
47d5601d8a long control: new API (#32706)
* Simplify long control

* Seperate

* Rename

* Try new api for toyota

* rm v_pid everywhere

* No speed in reset

* 0 is better default

* unassigned variable

* Update other cars

* Update gm

* SIMPLIFY

* simplify more

* fix API boundry

* Fix stopping bug

* Small fixes

* Update ref
old-commit-hash: bc303df6a0a4a9d52a2e92e5976b6c7aa5138b95
2024-06-14 00:08:58 -07:00
Shane Smiskol
0837d2512b controlsd: exit on any exception (#32730)
* exit on any exception

* finally so we don't catch
old-commit-hash: 7dbf60b4bce04a071eafcbc3eb0815e968e401be
2024-06-12 17:16:30 -07:00
Shane Smiskol
272216b2a8 remove uiPlan (#32721)
* remove uiPlan from ui

* remove publishing

* Update log.capnp

* Update services.py

* no uiPlan here

* Update ref_commit
old-commit-hash: 684209e077d77da0c3a12e8fda528649c5fe9edc
2024-06-11 21:31:10 -07:00
Harald Schäfer
d9fb61da16 Long control: Double delay is super complicated (#32694)
* Double delay is super complicated

* No more upper bound

* DEAD

* Update ref
old-commit-hash: 965415135ac7db4c67ea248ac52535eac537f3bf
2024-06-10 22:29:17 -07:00
Harald Schäfer
7e4edcc8d5 MSGQ refactor: cleanup outstanding issues (#32685)
* Rm sim dockerfile from bad merge

* Add watch back

* Fix watch3 compilation
old-commit-hash: 1b2bd205b81bb473bbe176b58250fe038963d1f6
2024-06-10 13:18:47 -07:00
Harald Schäfer
05ed3d8c15 Restructure msgq (#32652)
* Update ref

* Compiles

* compiles

* Refactor rest of libs

* import all

* small fiex

* cleanup import

* Need msgq simlink too

* Add to openpilot docker too

* try repo

* Updates

* Fix lint

* fix docs

* Try blank slate

* Revert "Try blank slate"

This reverts commit f078ce04acacfe115c19e23e86038b01e2b84a6d.

* Maybe scons needs this to clear cache

* fix tests

* Disable test for now

* Update SConstruct

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

* Fix whitespace

* Write skip normal

* small fixes

* add test path

* Revert repo

* linting

* whitespace

* Bump msgq

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: e70dc90a452e7c045d9a207f3680d846406ef789
2024-06-09 17:44:34 -07:00
Adeeb Shihadeh
ba34590567 controlsd: remove last mention of CAN (#32646)
old-commit-hash: a7ed190df4665a7f972862c992455bfd7daa6eab
2024-06-06 16:46:27 -07:00
Harald Schäfer
f870a968e9 Split cereal into cereal/msgq (#32631)
* squash

* fix doc

* compile device

* compile device

* Update ref

* add msgq to precommit exclusions

* No service ports

* fix compile

* address comments

* More comments

* Delete logger

* Update opendbc

* Linting

* bump msgq
old-commit-hash: e71ec4e8d7e39a56235f590227e7cb361cd8b79d
2024-06-06 14:31:56 -07:00
Dean Lee
eb6e134869 events.py: rename event counters (#32596)
* improve prev event counters

* just rename

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 983063c3e6ce344b8569814fcdc2eafc2830c4e9
2024-06-06 00:13:57 -07:00
Adeeb Shihadeh
2c6829ed67 boardd is pandad (#32628)
* boardd is pandad

* rename tests
old-commit-hash: 34e329649d7a388d4cd1f25dac9dda9d5409bf4a
2024-06-04 19:16:55 -07:00
Dean Lee
4acd5f4293 LongControl: storing T_IDXS[:CONTROL_N] in a variable for reuse (#32599)
Improve Control Trajectory Interpolation Efficiency
old-commit-hash: 23fcd687071c7825a7d518aec898fcdd536b2855
2024-06-04 17:04:50 -07:00
Adeeb Shihadeh
86b6103657 test_*.py files are no longer executable (#32610)
* test_*.py files are no longer executable

* cleanup empty lines

* update precommit

* fixme

* enable

* build
old-commit-hash: c59887c8109dd8d33ea2e7169995184fbe38cc3a
2024-06-03 15:48:56 -07:00
Dean Lee
375f2a243f LongitudinalPlanner: replace hardcoded length with ModelConstants.IDX_N (#32597)
replace hardcoded length
old-commit-hash: 1e70b23855a50e645325edf6f9548b0de73abe8d
2024-06-02 22:52:45 -07:00
Adeeb Shihadeh
cc4f53e6c6 manager: move to system/ (#32538)
* manager: move to system/

* one more
old-commit-hash: accdade4cfe73cdca41f5afa73cf4ad085802930
2024-05-25 12:41:17 -07:00
Shane Smiskol
efc7075f26 LongitudinalMpc: use DT_MDL (#32532)
bad magic number
old-commit-hash: 6ecb7103057073a11dfa0e93262d22f8d41228e5
2024-05-25 03:29:54 -07:00
ZwX1616
9a7fd90cb1 controlsd: explicitly ignore camera states in process replay (#32515)
* explicitly ignore

* Update selfdrive/controls/controlsd.py

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

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: fa2d5bca57a10bc54667d7e5e3e2ef5fbe80992f
2024-05-22 15:18:06 -07:00
Shane Smiskol
912ae13307 card: only exit ELM once done with ECU knock outs (#32505)
* only exit elm once done with knock outs

* comments!
old-commit-hash: 9fa92c222513731a19009781ce463bb9e69158db
2024-05-21 21:23:14 -07:00
Shane Smiskol
ee03d13529 card: process that abstracts car interface and CAN (#32380)
* format card

* standalone process

* no class member CS, there's no point

also can be confusing; what else could be using this?

* rename CoS

* Update selfdrive/controls/controlsd.py

* never works first time :D

* canRcvTimeout is bool

* hack

* add cpu

* see what testing closet comes up with

* first

* some clean up

* support passable CI, fix test models

* fix startup alert

* process replay changes

* test_fuzzy

* gate carOutput valid on carControl valid

* we should publish after we update carOutput

* controlsd was using actuatorsOutput from 2 frames ago for torque, not the most up to date

* check all checks for carControl in case controlsd dies

* log more timestamps

* more generic latency logger; needs some clean up

latency_logger.py was difficult to understand and modify

* card polls on can and carControl to get latest carControl possible

* temp try to send earlier

* add log

* remove latencylogger

* no mpld3!

* old loop

* detect first event

* normal send

* revert "card polls on can and carControl to get latest carControl possible"

how it was is best

* sheesh! update should be first

* first timestamp

* temp comment ( timestamp is slow :( )

* more final ordering, and make polling on/off test repeatable

* Received can

* new plot timestamps

* clean up

* no poll

* add controllers (draft)

* Revert "add controllers (draft)"

This reverts commit e2c3f01b2fadcff74347bac90c8a5cc1ef4e27b3.

* fix that

* conventions

* just use CS

* consider controlsd state machine in card: not fully done

* hmm it's just becoming controlsd

* rm debugging

* Revert "hmm it's just becoming controlsd"

This reverts commit 534a357ee95bec4ed070667186af55d59421bbc7.

* Revert "just use CS"

This reverts commit 9fa7406f30c86200f20457f7b9ff95e731201bf9.

* add vCruise

* migrate car state

* Revert "migrate car state"

This reverts commit 4ae86ca163c6920070f410f608f7644ab632850b.

* Revert "add vCruise"

This reverts commit af247a8da41c3626ada4231b98042da1a1ae4633.

* simple state machine in card (doesn't work as is)

* Revert "simple state machine in card (doesn't work as is)"

This reverts commit b4af8a9b0a2e17fdfc89d344c64678ef51305c24.

* poll carState without conflate

* bump

* remove state transition

* fix

* update refs

* ignore cumLagMs and don't ignore valid

* fix controls mismatch; controlsd used to set alt exp

* controlsd_config_callback not needed for card

* revert ref temp

* update refs

* no poll

* not builder!

* test fix

* need to migrate initialized

* CC will be a reader

* more as_reader!

* fix None

* init after publish like before - no real difference

* controlsd clean up

* remove redundant check and check passive for init

* stash

* flip

* migrate missing carOutput for controlsd

* Update ref_commit

* bump cereal

* comment

* no class params

* no class

* Revert "no class"

This reverts commit 5499b83c2dcb5462070626f8523e3aec6f4c209d.

* add todo

* regen and update refs

* fix

* update refs

* and fix that

* should be controlsstate

* remove controlsState migration

CoS.initialized isn't needed yet

* fix

* flip!

* bump

* fix that

* update refs

* fix

* if canValid goes false, controlsd would still send

* bump

* rm diff

* need to be very careful with initializing

* update refs
old-commit-hash: 71f5c441fe32184d94a9f26565a36c661e2ccf28
2024-05-21 01:18:10 -07:00
Adeeb Shihadeh
3358745103 ruff: enable UP
old-commit-hash: b2e4c64cf8fe3256d1e411e8715c29e2eb6f4f00
2024-05-20 17:43:54 -07:00
Shane Smiskol
b3fc3f25ce process replay: regen routes (#32464)
* regen

* regen

* update

* undo

* update refs

* fix

* real fix

* test

* test2

* test3

* stash

* Revert "stash"

This reverts commit bf6765f526b48426f49a4b29c4042097f57fc4b0.

* rk.lagging can not be trusted. BODY segment has radarFault while modelV2 is not valid, causing radarState to not be valid

* order

* update refs again

* we never logged carOutput!

* bump

* add back checks
old-commit-hash: 220fcc16753ce87c8997275733f62bc385342a7e
2024-05-19 01:07:12 -07:00
Adeeb Shihadeh
d0f0ee8435 define alert for actuatorsApiUnavailable
old-commit-hash: 075176f869088f9e2021aadc9e236edd8cac7d3e
2024-05-18 17:55:52 -07:00
cl0cks4fe
639a634f7c Unittest to pytest (#32366)
* add pytest-asyncio

* switch common

* switch selfdrive

* switch system

* switch tools

* small fixes

* fix setUp and valgrind pytest

* switch to setup

* fix random

* switch mock

* switch test_lateral_limits

* revert test_ui

* fix poetry.lock

* add unittest to banned-api

* add inline ignores to remaining unittest imports

* revert test_models

* revert check_can_parser_performance

* one more skip

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: dd9d5d4528ff0a61c7699abc1b63ba8fd282632f
2024-05-17 11:01:44 -07:00
Shane Smiskol
693c53cafc events: reduce priority of resumeRequired (#32450)
CC
old-commit-hash: 42861f6683cf80b7ec0a1f05fc821e4cc5327962
2024-05-16 21:17:37 -07:00
Shane Smiskol
785d92c474 Revert "card: move all car events (#32427)" (#32439)
* Revert "card: move all car events (#32427)"

This reverts commit e1918a6270257e96d68df3ac03e884603253c8e2.

* keep the event here

* oops

* Revert "oops"

This reverts commit ea99a2768fbeb7a6123dd755585157b530e7a2a1.

* Revert "keep the event here"

This reverts commit ec089b4e1afdf09b2e6b184de8f23584ef931601.
old-commit-hash: 407791113d10d2f9fea9b68c8313271fefa1e36e
2024-05-15 14:32:52 -07:00
Shane Smiskol
cd782c06d1 card: move all car events (#32427)
* move last event over

* fix
old-commit-hash: 8f46028bd4b71c619bac654d6f2a4f8006b7508d
2024-05-14 15:20:03 -07:00
Shane Smiskol
f9dc18f418 Events: remove dependency (#32430)
* Revert "Events: use sorted container (#32395)"

This reverts commit 3c9c039ca3202649d7212ee259b1b82a65a92c4f.

* remove implicit dependency
old-commit-hash: e9bf36232bf587cacc1282837afbe82600c0977f
2024-05-14 15:19:02 -07:00
Shane Smiskol
c3630f813a controlsd: use already initialized params (#32429)
old-commit-hash: 6f3cd143efdec89524e603a181f2a7cbf02e8588
2024-05-14 14:01:38 -07:00
Shane Smiskol
97dc134a42 card: create pedal pressed event (#32417)
* card: create pedal pressed event (#32393)

* move pedalPressed to card

* rm

* needs to be a builder

* move these

* clean up

* reader later

* Update ref_commit

* moved to card
old-commit-hash: d0d44a51a0ff66c1b2da56b3d9864e10ecc2174d
2024-05-13 16:18:55 -07:00
Shane Smiskol
4c7c4272d0 Revert "card: create pedal pressed event" (#32414)
Revert "card: create pedal pressed event (#32393)"

This reverts commit 05be56def1f1fdddb761291e1a40cce459fc7d36.
old-commit-hash: 9287a6962479b63f1628086a73459b4e7e933d59
2024-05-13 14:25:22 -07:00
Shane Smiskol
48bb3caaac card: create pedal pressed event (#32393)
* move pedalPressed to card

* rm

* needs to be a builder

* move these

* clean up

* reader later

* Update ref_commit
old-commit-hash: d18da895d3b70dc62ee3cd8ebeb75de6cf48e7a9
2024-05-13 14:15:26 -07:00
Shane Smiskol
4a0b3c8b64 CarInterface: move stateless, common car events to car interface (#32394)
* move stateless, common car events to car interface

* try to reduce process replay diff a bit

* Revert "try to reduce process replay diff a bit"

This reverts commit b12798deabea67c5a636d6e70e80a3c21c7225ff.

* update refs
old-commit-hash: 3dfb6d7931711c51ecfe0d8c32f0ff928b17a5c9
2024-05-13 12:50:42 -07:00
Shane Smiskol
4b0149cb14 Events: use sorted container (#32395)
* use SortedList

* Update ref_commit
old-commit-hash: d98ab4ddb1beebdf7079d403a837aabbf7d86918
2024-05-13 12:16:53 -07:00
Shane Smiskol
c4e445e6c5 card: more final structure
old-commit-hash: d28624fe5b4145b48add862f1f29a3bcf7568b8c
2024-05-10 23:18:48 -07:00
Shane Smiskol
753dbe8f6e controlsd: use latest actuatorsOutput (#32390)
use current actuatorsOutput
old-commit-hash: ef1693433f0e89818bbc8dabf83f16841e28ec6e
2024-05-10 21:00:01 -07:00
Shane Smiskol
8708fb2a32 card: preparation (#32382)
* card prep

* also format
old-commit-hash: 2e6b2ef3c973549c5375684ba36f1b12372167a4
2024-05-08 23:54:20 -07:00
Adeeb Shihadeh
4b93347a4c reduce severity of offroad temperature alert
old-commit-hash: cdf2e75cc314af694514077b659e5ba1d3782e8a
2024-05-07 15:58:59 -07:00
Adeeb Shihadeh
35215df6c0 remove Offroad_InvalidTime alert
old-commit-hash: 1fc3d9224e820e150dc382de1adcfd49fa972b42
2024-05-07 15:58:29 -07:00