Commit Graph

849 Commits

Author SHA1 Message Date
Adeeb Shihadeh
1421551297 Cython KF1D to Python (#30773)
* Cython KF1D to Python

* cleanup

* set x

* less nesting

* fix release

* Revert "fix release"

This reverts commit 97e5d0f80405660efb861c7b9df7fbfd5dda5dd9.
2023-12-16 23:45:28 -08:00
Dean Lee
3c4c4d1f7f common/params: support nonblocking write (#29808)
* Safe and efficient asynchronous writing parameters

* call putNonBlocking in locationd

* remove space

* ->AsyncWriter

* remove semicolon

* use member function

* asyc write multiple times

* add test case for AsyncWriter

* merge master

* add missing include

* public

* cleanup

* create once

* cleanup

* update that

* explicit waiting

* improve test case

* pass prefix to asywriter

* move to params

* assert(queue.empty())

* add comment

* add todo

* test_power_monitoring: remove patch

* rm laikad.py

* fix import

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-12-13 20:36:01 -08:00
Adeeb Shihadeh
fe24bdc689 read params in a thread 2023-12-13 19:00:22 -08:00
Kacper Rączy
e62756596b controlsd: require joystick mode param for the body (#30680)
* Update joystick mode in step

* Stop putting the body in joystick mode by default

* Toggle JoystickDebugMode by default for notCars in process_replay

* Remove subsection about web joystick

* Update param only in non-cars

* Make joystickDebug non-static event, and add it in a loop

* Add comment
2023-12-12 14:14:51 -08:00
Kacper Rączy
7f07f47302 locationd: disable locationd temporary error alert on the body (#30608)
* Disable locationd temporary error alert on the body

* Disable locationd/paramsd/planner alerts on body with joystick mode

* joystick_enabled param not joystick_mode
2023-12-07 10:53:33 -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
Shane Smiskol
09a9ba6de1 joystick: bump max angle (#30602) 2023-12-04 21:16:33 -08:00
Adeeb Shihadeh
ce4bac8218 remove unused last_actuators arg from lateral controllers (#30595) 2023-12-03 15:54:18 -08:00
Adeeb Shihadeh
bd0ab957b1 add carParams.passive (#30594) 2023-12-03 14:09:37 -08:00
Adeeb Shihadeh
a1d36961cf new msgs default to invalid (#30587)
* new msgs default to invalid

* fix lm

* set more valid

* update rest

* update refs

* fix logMessage

* more valids

* cleanup

* fix llk test

* pigeond is also valid

* more valids
2023-12-03 10:50:17 -08:00
Adeeb Shihadeh
8971e2c177 longitudinal tests: cleanup old hacks (#30585) 2023-12-02 10:01:28 -08:00
Adeeb Shihadeh
531e62fc03 clear non-release params on startup (#30583) 2023-12-01 23:57:54 -08:00
Adeeb Shihadeh
b97e5b0e03 rename carEvents -> onroadEvents (#30577)
* rename carEvents -> onroadEvents

* bump cereal

* bump cereal
2023-12-01 22:48:29 -08:00
Adeeb Shihadeh
8e00ce672d controlsd: remove old process replay sentinel (#30581) 2023-12-01 22:42:43 -08:00
Justin Newberry
ba3067a560 Revert "Pytest: run tests in random order" (#30469)
Revert "Pytest: run tests in random order (#30134)"

This reverts commit a5d99e0ebb.
2023-11-15 10:41:11 -08:00
Justin Newberry
a5d99e0ebb Pytest: run tests in random order (#30134)
* enable random order

* logprint info

* revert that

* better logging

* go to dfu

* try to flash every panda if not up to date

* revert panda debugging
2023-11-15 10:16:51 -08:00
Vivek Aithal
2eb487c9a5 params: Remove separate CarParams from each daemon (#30405)
* remove separate previous route carparams from each daemon and add centrally to controlsd

* extract out sigint handler

* make process replay work for torqued

* don't write param if None
2023-11-08 15:25:41 -08:00
Kacper Rączy
c419376bbd controlsd: reset axes in joystick mode if message is old (#30409)
Reset joystick if it wasnt received after 0.2 sec
2023-11-07 15:48:13 -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
b68cfbb332 cleanup old sm pm args (#30241)
* cleanup sm pm

* fix controlsd

* fix
2023-10-13 23:27:04 -07:00
Justin Newberry
2dd13c60cc Revert "run unit tests in a random order (#29799)" (#30116)
This reverts commit b483efe764.
2023-09-30 17:23:38 -07:00
Adeeb Shihadeh
b483efe764 run unit tests in a random order (#29799)
* run unit tests in a random order by default

* bump panda

* fix startup

* re-add random order plugin

---------

Co-authored-by: Justin Newberry <justin@comma.ai>
2023-09-30 15:56:23 -07:00
Adeeb Shihadeh
a4aa801fbe simplify sensor alert (#29824)
* simplify

* update proc replay
2023-09-26 16:47:21 -07:00
coffee-cake-isaac
c43325fa17 joystick mode: add curvature control (#30010)
* Added curvature controls to joystick mode

* same line

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-09-22 21:53:31 -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
Lee Jong Mun
238f9d65db cleanup remnants of LQR and INDI tuning (#29860)
* not use 'indi' cleanup

* bump cereal

* rm more

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-09-10 16:30:13 -07:00
Justin Newberry
110cfef1c2 Ruff: disallow non-openpilot imports (#29841) 2023-09-08 10:43:02 -07:00
Justin Newberry
dde225221e CI: run unittests in parallel with xdist (#29756)
* parallel tests

* review suggesions

* add to pyproject

* add a bit more buffer on that

* fix rare athena issue

* remove from pypoetry
2023-09-07 16:29:36 -07:00
Kacper Rączy
0267e0500c radard: expose radarTrackId for radar leads (#29809)
* Add radarState track identifier for debugging purposes

* update process replay ref
2023-09-07 11:24:54 -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
Adeeb Shihadeh
ec479322d3 Revert "params: safe and efficient async writing parameters (#25912)"
This reverts commit 0d797f4e8b.
2023-09-06 13:44:20 -07:00
Dean Lee
0d797f4e8b params: safe and efficient async writing parameters (#25912)
* Safe and efficient asynchronous writing parameters

* call putNonBlocking in locationd

* remove space

* ->AsyncWriter

* remove semicolon

* use member function

* asyc write multiple times

* add test case for AsyncWriter

* merge master

* add missing include

* public

* cleanup

* create once

* cleanup

* update that

* explicit waiting

* improve test case

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-09-06 08:50:28 -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
Justin Newberry
4aff2621d3 Tests: parameterize following distance test (#29734)
* split

* parameterize it
2023-08-31 13:41:02 -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
97865d751f radard: radar fault test (#29673)
* Radar fault test

* Remove i

* Add radar fault case for car interfaces

* Removed empty whitespace

* Fix typo
2023-08-28 22:34:47 -07: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
Justin Newberry
1ee6ed4b16 Linter: remove pylint (#29611)
remove pylint
2023-08-24 16:30:54 -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
Adeeb Shihadeh
a9626f95b6 add openpilot prefix to imports (#29498)
* add openpilot prefix to imports

* more

* more

* fix docs

* fix linter

* bump submodules

* fix patched tests

* update dynamic imports

* debug

* Revert "debug"

This reverts commit db5e13b9911cc74438bee123bc3430da6c31b24b.

* fix pm test
2023-08-20 20:49:55 -07:00
Adeeb Shihadeh
d61f86d339 replace custom clock helpers with time module (#29499)
* replace custom clock stuff wtih time module

* fix double

* fix release

* bump cereal

* update type

* fix one more
2023-08-20 18:50:58 -07:00
Shane Smiskol
1a08c2986e Revert "radard: tie radard frequency to modelV2 vol. 2 (#29240)" (#29474)
* Revert "static analysis fixes"

This reverts commit a1e85f3661.

* Revert "radard: tie radard frequency to modelV2 vol. 2 (#29240)"

This reverts commit 460f5c8e0b.

* update refs
2023-08-18 22:56:43 -07:00
Eric Brown
111b6438c6 Swap belowSteerSpeed and resumeRequired alert priorities (#28795)
* GM: Don't send belowSteerSpeed when resumeRequired

* Set belowSteerSpeed alert to LOW priority, resumeRequired to MID

* Add script to output all events and their priorities by type

* Set CP, CS, sm

* Subscribe to same messages as controlsd

* Create callable alerts

* Remove event print script

* Remove sng check
2023-08-17 16:03:35 -07:00
Kacper Rączy
62a88e504d Unpin numpy (#29421)
* Unpin numpy

* Update lock file

* leave acados comment

* Fix warnings

* Fix more paramsd warnings
2023-08-17 15:36:14 -07:00