Commit Graph

612 Commits

Author SHA1 Message Date
Harald Schäfer
965415135a Long control: Double delay is super complicated (#32694)
* Double delay is super complicated

* No more upper bound

* DEAD

* Update ref
2024-06-10 22:29:17 -07:00
Harald Schäfer
1b2bd205b8 MSGQ refactor: cleanup outstanding issues (#32685)
* Rm sim dockerfile from bad merge

* Add watch back

* Fix watch3 compilation
2024-06-10 13:18:47 -07:00
Harald Schäfer
e70dc90a45 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>
2024-06-09 17:44:34 -07:00
Dean Lee
983063c3e6 events.py: rename event counters (#32596)
* improve prev event counters

* just rename

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2024-06-06 00:13:57 -07:00
Dean Lee
23fcd68707 LongControl: storing T_IDXS[:CONTROL_N] in a variable for reuse (#32599)
Improve Control Trajectory Interpolation Efficiency
2024-06-04 17:04:50 -07:00
Adeeb Shihadeh
c59887c810 test_*.py files are no longer executable (#32610)
* test_*.py files are no longer executable

* cleanup empty lines

* update precommit

* fixme

* enable

* build
2024-06-03 15:48:56 -07:00
Dean Lee
1e70b23855 LongitudinalPlanner: replace hardcoded length with ModelConstants.IDX_N (#32597)
replace hardcoded length
2024-06-02 22:52:45 -07:00
Shane Smiskol
6ecb710305 LongitudinalMpc: use DT_MDL (#32532)
bad magic number
2024-05-25 03:29:54 -07:00
Adeeb Shihadeh
b2e4c64cf8 ruff: enable UP 2024-05-20 17:43:54 -07:00
Adeeb Shihadeh
075176f869 define alert for actuatorsApiUnavailable 2024-05-18 17:55:52 -07:00
cl0cks4fe
dd9d5d4528 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>
2024-05-17 11:01:44 -07:00
Shane Smiskol
42861f6683 events: reduce priority of resumeRequired (#32450)
CC
2024-05-16 21:17:37 -07:00
Shane Smiskol
e9bf36232b Events: remove dependency (#32430)
* Revert "Events: use sorted container (#32395)"

This reverts commit d98ab4ddb1.

* remove implicit dependency
2024-05-14 15:19:02 -07:00
Shane Smiskol
d98ab4ddb1 Events: use sorted container (#32395)
* use SortedList

* Update ref_commit
2024-05-13 12:16:53 -07:00
Adeeb Shihadeh
cdf2e75cc3 reduce severity of offroad temperature alert 2024-05-07 15:58:59 -07:00
Adeeb Shihadeh
1fc3d9224e remove Offroad_InvalidTime alert 2024-05-07 15:58:29 -07:00
Adeeb Shihadeh
6ef95f7a91 adjust gps alert 2024-05-01 11:35:20 -07:00
ZwX1616
1d05704d27 Toggle to always enable DM (#32205)
* permanent

* param

* correct behavior

* toggle

* need trans

* ref_commit

* translate for chs/t

* disable on P and R

* read
2024-04-17 12:56:37 -07:00
Justin Newberry
b0eb3ba4f4 cars: platform enums -> prepend brand name (#31927)
* with brand name

* migrate

* Fix

* fixes

* more

* passes

* fix

* fix the doc

* collects

* these too

* more stuff

* body exception :/

* more

* hardcode i guess

* update ref

* toyota

* more toyota

* and here

* final!

* fix notebooks and ccs

* move this here
2024-03-19 17:29:50 -07:00
Justin Newberry
4fbc8a3896 move git commands to common/git.py (#31921)
move git into common/git.py
2024-03-19 12:39:09 -07:00
Adeeb Shihadeh
fa12a67228 remove pedal (#31903)
* remove pedal

* bump panda

* fix

* update refs
2024-03-17 22:42:49 -07:00
Shane Smiskol
29e55f99a5 Move personality to controlsState (#31855)
* start at param

* start by sending personality

* change to personality

* POC: button changes personality

* what's wrong with this?

* fix

* not really possible but fuzzy test catches this

* there's always a typo

* dang, we're dropping messages

* clean up

* no comment

* bump

* rename

* not all cars yet

* works but at what cost

* clean up

* inside settings

* write param so we save the distance button changes

* setChecked activates buttonToggled and already writes param!

* don't need this, we update from longitudinalPlan on changes

* some clean up

* more

* ui

* allow some time for ui to receive and write param

* plannerd: only track changes in case no ui

* Revert "plannerd: only track changes in case no ui"

This reverts commit 2b081aa6ceb92c67a621b74592b2292756d29871.

* write in plannerd as well, I assume this is atomic?

* don't write when setting checked (only user clicks)

* better nane

* more

* Update selfdrive/controls/lib/longitudinal_planner.py

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>

* doesn't write param now

* ParamWatcher is nice

* no debug

* Update translations

* fix

* odd drain sock proc replay behavior

* vanish

* Revert "odd drain sock proc replay behavior"

This reverts commit 29b70b39413e1852bb512155af6b6a94a5bd9454.

* add GM

* only if OP long

* move personality to controlsState, since eventually it won't be exclusive to long planner

more

bump

* diff without translations

* fix

* put nonblocking

* CS should start at up to date personality always (no ui flicker)

* update toggle on cereal message change

* fix

* fix that

* ubmp

* mypy doesn't know this is an int :(

* update translations

* fix the tests

* revert ui

* not here

* migrate controlsState

* Revert "migrate controlsState" - i see no reason we need to test with
any specific personality

This reverts commit 6063508f2df1a5623f113cda34dcd59a1f4b2ac9.

* Update ref_commit

---------

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
2024-03-13 00:57:57 -07:00
Shane Smiskol
fdab60cad7 longitudinal planner: start at personality param (#31788)
start at param
2024-03-07 19:56:22 -08:00
Justin Newberry
7cf2b28b78 scons: fix race condition with opendbc (#31621)
* fix race condition

* add to release

* fix for now

* bump
2024-02-28 11:41:42 -08:00
Cameron Clough
80da3aee14 mypy: use implicit-optional (#31590)
* mypy: set implicit-optional = true

* find and replace '| None = None' -> '= None' in function args
2024-02-25 13:29:18 -08:00
Cameron Clough
995250ae49 use pyupgrade to update to new typing syntax (#31580)
* add pyupgrade hook

* run pyupgrade (pre-commit run -a)

* ruff --fix

* Revert "add pyupgrade hook"

This reverts commit 56ec18bb6b8602a0b612f3803d96cdad14b52066.

* revert changes to third_party/

* manual type fixes

* explicit Optional wrapping capnp objects
2024-02-24 16:41:23 -08:00
goodchoom
8b5c9e84d2 Alerts: fix inconsistent capitalization (#31514)
fix capitalization
2024-02-19 18:18:20 -08:00
Greg Hogan
7affba06d8 simplify git remote is comma check (#31284)
* simplify git remote is comma check

* cast to str

* eliminate default and always return string

* add type annotation for cache decorator

* fix up default handling
2024-02-02 21:23:32 -08:00
Vivek Aithal
056b330e8b LatControlTorque: Add more inputs (#31252)
* add history and state to the ff inputs

* add history

* resolve comments

* remove history, simplify

* don't compute lateral accel, roll comp always
2024-02-01 04:12:48 -08:00
Justin Newberry
086c509fde Create message mocking tools (#31249)
* add mocking tools

* fix map renderer

* use for power draw

* fix those

* whitespace

* rename to services

* fix the rate

* remove
2024-01-31 18:47:49 -08:00
Harald Schäfer
0067cf3eb1 Los Angeles Model (#31037)
* 1c888f5b-c213-4c1c-9eba-c587afd047fc/700

* Move to action

* Updates

* Add steer delay

* Update curvature grep

* clip speed

* No car params for now

* Add delay back

* Update

* fix lint

* fix lint

* update model regf
2024-01-22 00:58:06 -08:00
Harald Schäfer
e6c97c3846 Delete lat planner (#31089)
* Initial commit

* Fixup

* typo

* ignore lateral plan

* Update cereal

* Remove lateralPlan

* Fix release build

* Fix release build

* give car params

* Add carParams to include_all_types

* Write car param in powerdraw test

* add demo mode

* Update model regf

* proc replay ref commit

* Try

* Move enum definition

* Update cereal

* typo

* Write car param for modeld test

* Update ref

* Update model ref again

---------

Co-authored-by: Kacper Rączy <gfw.kra@gmail.com>
2024-01-21 12:09:48 -08:00
Harald Schäfer
d36103791c No curv rate for lateral control (#31042)
* No more Curvature rate for lat control

* Update cereal

* Update

* Fix lat control test
2024-01-17 16:00:50 -08:00
YassineYousfi
d6cece756c longplanner: expose dt (#30941) 2024-01-08 19:46:13 -08:00
Adeeb Shihadeh
35f819c823 swaglog.py goes in common/ (#30631)
* swaglog.py goes in common/

* all of these go in release

* we'll even include the pyx
2023-12-06 17:27:51 -08:00
Adeeb Shihadeh
ce4bac8218 remove unused last_actuators arg from lateral controllers (#30595) 2023-12-03 15:54:18 -08:00
YassineYousfi
4c2bd853e4 (New) Lemon Pie Model 🍋 (#30209)
* 6f6e3749-1b7c-42e8-a33b-03929b7fc476/700

* oops deleted too much

* 1b4308b7-a659-4ebd-b4c6-c81c1c3890f8/700

* 1be192f3-f407-4217-9757-78b9ad92750a/700

* remove some todos

* more cleanup in lat planner

* vego > min_speed

* regen and update process replay refs

* update model replay ref

* update model replay ref commit again

* Revert "update model replay ref commit again"

This reverts commit 922cb796b8dfe264b0cce7a18206bb898b18bcb3.

* update again

* bump cereal
2023-11-02 14:01:00 -07:00
YassineYousfi
cad17b1255 modeld: parsing and publishing in python (#30273)
* WIP try modeld all in python

* fix plan

* add lane lines stds

* fix lane lines prob

* add lead prob

* add meta

* simplify plan parsing

* add hard brake pred

* add confidence

* fix desire state and desire pred

* check this file for now

* rm prints

* rm debug

* add todos

* add plan_t_idxs

* same as cpp

* removed cython

* add wfd width - rm cpp code

* add new files rm old files

* get metadata at compile time

* forgot this file

* now uses more CPU

* not used

* update readme

* lint

* copy this too

* simplify disengage probs

* update model replay ref commit

* update again

* confidence: remove if statemens

* use publish_state.enqueue

* Revert "use publish_state.enqueue"

This reverts commit d8807c8348338a1f773a8de00fd796abb8181404.

* confidence: better shape defs

* use ModelConstants class

* fix confidence

* Parser

* slightly more power too

* no inline ifs :(

* confidence: just use if statements
2023-10-19 14:23:51 -07:00
Shane Smiskol
ffeb99db54 events: fixup printing script (#30268)
* fix typing, no need for ordereddict, show priority name again

* just repr
2023-10-17 01:52:20 -07:00
Adeeb Shihadeh
a4aa801fbe simplify sensor alert (#29824)
* simplify

* update proc replay
2023-09-26 16:47:21 -07:00
Shane Smiskol
7f073483bb services: capitalize constant service list (#30005)
* rename

* bump

* Apply suggestions from code review
2023-09-21 18:25:15 -07:00
Vivek Aithal
00d1c682b0 Alerts: More understandable locationd, paramsd alerts (#29831)
* add locationd paramsd alerts

* remove more additions, just renames

* update refs

* Update selfdrive/controls/lib/events.py

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

* Update selfdrive/controls/lib/events.py

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

* resolve comemnts

* update cereal

* update refs

* remove nosensor in new alerts

* bump cereal

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-09-11 16:28:42 -07:00
Vivek Aithal
dbada885ac locationd: Add camera-IMU cross-checks (#29727)
* camera-gyro cross checks, but one way

* increase factor to account for gyro noise (potholes, bad roads etc

* increase factor to reduce FP with device taps, bad roads, etc

* factor to 30

* add inputsok to sensoir data invalid alert

* bugfix

* move the sensors check

* add localizer catchall alert

* update refcommit

* remove permanent alert

* revert sensorDataInvalid alert change, split into new PR
2023-09-06 21:01:01 -07:00
Justin Newberry
4e69937d0d Precommit: ensure executable bit is set (#29784)
* precommit ensure executable

* exclude tinygrad

* bump submodules

* exclude tinygrad globally
2023-09-05 16:33:26 -07:00
Adeeb Shihadeh
9719b22761 Update Python packages and pre-commit hooks (#29739)
* Update Python packages and pre-commit hooks

* fix linter

---------

Co-authored-by: adeebshihadeh <adeebshihadeh@users.noreply.github.com>
2023-08-31 15:00:13 -07:00
Kacper Rączy
d138a358eb scons: fix multithreaded builds (#29716)
* common_python export

* Single scons call

* transformations_python
2023-08-31 00:01:03 +02:00
Kacper Rączy
517499294a mpc_lib: fix dependencies (#29621)
* Remove common dependency of lateral mpc

* Replace cereal dir dependency with cereal lib in long mpc

* Add missing files to generated sources

* Typo fix

* messaging_python dep
2023-08-25 16:51:57 -07:00
Cameron Clough
74b9a6af9e add missing openpilot prefix to imports 2023-08-24 15:46:56 +01:00
Dean Lee
55cca6ed26 scons: remove missing MPC headers (#29485)
* remove invalid files

* Update selfdrive/controls/lib/lateral_mpc_lib/SConscript

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

* Apply suggestions from code review

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-08-23 15:43:27 -07:00
Justin Newberry
979c96167d CI: enable missing tests (#29538) 2023-08-22 16:48:02 -07:00