Commit Graph

475 Commits

Author SHA1 Message Date
Sammohana
8eebce75ac Getting rid of openpilot.common.numpy_fast (#34368)
* Got rid openpilot.common.numpy_fast

* fixed some data type erros

* importing numpy instead of importing specific functions

* fixing some numpy importing mistakes

* Update selfdrive/car/cruise.py

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-01-14 14:52:56 -08:00
Maxime Desroches
4170534c02 ci: faster process_replay (#33989)
* try

* fix

* try

* try

* try

* monitor

* no

* how fast

* more

* timeout

* remove

* ruff

* try

* less

* cons

* less

* cons

* revert

* more and less

* more?

* more?

* cons

* cons

* cons

* cons

* cons
2024-11-12 14:26:21 -08:00
Shane Smiskol
9cbd34158f GM: signed wheel speeds (#33697)
* signed wheel speeds

* clean up

* bump to master

* bump to master again

* did a sanity check for negative vego

* bump
2024-10-01 21:17:24 -07:00
Adeeb Shihadeh
b168c6f9af controlsd is driven by selfdriveState (#33541)
* controlsd is driven by selfdriveState

* update refs
2024-09-11 15:02:38 -07:00
Adeeb Shihadeh
e04455cbaa selfdrived: controlsd only does controls (#33485)
* selfdrived

* process replay

* lil more

* set the valids

* rename that
2024-09-06 17:16:32 -07:00
Adeeb Shihadeh
e459cee1e7 Setup driverAssistance service (#33495)
* Move LDW and FCW to driverAssitance service

* move ldw

* cleanup
2024-09-06 15:30:14 -07:00
Shane Smiskol
922348f33d card parses radar points (#33443)
* interfaces returns radarinterface

old-commit-hash: 9ad1f096bfca3712320f19b1b49aa9e6ac9b68e4

* bump

old-commit-hash: 20334a8b257c6037e11d02f2ba7b1f02c59f3240

* get RI from opendbc

old-commit-hash: b5f6d0c48c90927926e9dd557130075aeec5edee

* stash so far

old-commit-hash: 5aa2c842eb152316434c17a661df05bb8af61f47

* new liveTracks message (radard expects and needs RadarData)

* this should just work?

* whoops

* fix that

* rm liveTracks from radard pm

* fix proceess replay

* lol fcw diff, something's not right

* actually there's fcw in original route. it's pretty close

* no tracks!

* fix test_leads

* CPU moved across procs

* fix not engageable from onroadEvents

* bump

* fixes

* bump to master

* radard publishes w/ modelV2 now, so it will always be sent. check valid which radard sets using liveTracks avg freq

* fix that (it works!)

* combine

join

* bump

* bump

* deprecate

* why

* fix incorrect args

* remove cumLagMs from process_replay

* update refs
2024-09-05 22:40:17 -07:00
Adeeb Shihadeh
aef650013e controlsd: split up publishing and logic (#33483)
* split up the pubs

* move all event adds

* split out alerts

* lil more

* clenaup

* update test

* cleanup
2024-09-05 16:28:57 -07:00
Adeeb Shihadeh
73d31d50c4 controlsd: pull out LDW (#33479)
* controlsd: pull out LDW

* cleanup

* good ol mypy
2024-09-04 17:45:09 -07:00
Adeeb Shihadeh
77f4f57e73 controlsd: pull out selfdrive state machine (#33477)
* controlsd: pull out selfdrive state machine

* cleanup test

* cleanup
2024-09-04 16:44:28 -07:00
Shane Smiskol
54a2626e44 Joystick: improve angle control (#33475)
* calculate max angle/curvature with speed

* don't inflate to inf

* screw radians

* up limit a bit
2024-09-04 16:29:04 -07:00
Adeeb Shihadeh
72d7ada7e4 controlsd: deprecate startMonoTime (#33445)
* controlsd: deprecate startMonoTime

* update refs
old-commit-hash: 04eb73e4a1374178274e04c2fb92b82bb713772c
2024-09-03 17:48:04 -07:00
Adeeb Shihadeh
bd2b09c7b6 Deprecate controlsState state fields (#33437)
* Deprecate controlsState state fields

* sim works

* update refs

* one more

* these too

* update sim
old-commit-hash: 3924ac587b735d1e735af4cb77faf6ccf053f656
2024-09-03 14:40:23 -07:00
Adeeb Shihadeh
53288d4dbf Move vCruise to card (#33439)
* Move vCruise to card

* cleanup drive_helpers

* works in sim

* update refs

* update that

* too slow :(
old-commit-hash: 2f3256ed8baa3d7a5c4d1befe9148dbfecb37246
2024-09-02 17:18:43 -07:00
Adeeb Shihadeh
7575c707f1 carEvent -> onroadEvent (#33432)
old-commit-hash: c481f11833d748a0d12d2ba14003e931d2849135
2024-09-01 11:31:39 -07:00
royjr
dbe0866a6f ui: show personality updates (#33406)
* personality-alerts

* Update events.py

* Update car.capnp

* no AudibleAlert

* shorter

* no VisualAlert

* one liner

* smaller

* normal

* what am I doing wrong?

* it works, but is it messy?

* arg all

* lil more

* update that

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 35da93fa95
2024-08-31 20:38:34 -07:00
Adeeb Shihadeh
1b2bc44227 controlsd: split out state/alerts into selfdriveState (#33421)
* setup selfdriveState

* little more

* update refs

* migration

* all too slow
old-commit-hash: 87051803ab
2024-08-31 18:48:17 -07:00
Adeeb Shihadeh
60549c9557 controlsd: deprecate alertBlinkingRate (#33422)
* controlsd: deprecate alertBlinkingRate

* simplify

* update refs
old-commit-hash: f4e101c67d
2024-08-31 17:58:02 -07:00
Kacper Rączy
e154f03a12 timed: use gps location packet for time (#33306)
* GPS helpers

* Use GPS socket in timed

* Use helper in controlsd

* Use updated and logMonoTime

* Helper type annot

* Not updated

* Increase time threashold
old-commit-hash: cf355ecf20
2024-08-22 23:30:29 -07:00
Shane Smiskol
4f019b5f60 move selfdrive/car to opendbc (#32630)
* move most of /car

* move some car tests

move some car tests

* fix selfdrive/car/tests

* fix selfdrive/controls tests

* fix the rest of the selfdrive tests

* bump opendbc

* fix all tests

* few more non-test references

* remove opcar and move docs to car

fix these debugging scripts

fix docs

* bump opendbc and panda

forgot panda
old-commit-hash: e735a7f379
2024-08-17 00:54:51 -07:00
Kacper Rączy
e66855c54d ui: remove GPS status from the sidebar (#33304)
* Remove usage of llk in ui

* Remove GPS from sidebar

* Remove it from test
old-commit-hash: c61d504516
2024-08-14 15:52:47 -07:00
Kacper Rączy
80bc61dc6c controlsd: use livePose (#33283)
* Pose calibrator

* Fix static analysis

* Fix static

* Fix test_latcontrol

* Fix test_latcontrol

* Update services in process replay

* Fix static

* Matmul not mul

* Add assertion

* Move pose calibration to data_sample

* Update ref commit

* Remove llk from cycle alerts

* Deprecated nogps event

* Switch power_draw to lp

* Bring back noGps alert

* Add handling code back

* get_bool

* Bring inputsok back
old-commit-hash: 9734015bbb
2024-08-13 21:11:16 -07:00
Shane Smiskol
c45e72dd2f remove more car import exceptions (#33193)
* remove another exception (remove mention of events from car stack)

* guess this should've been here all along

* reorganize exceptions

* fix
old-commit-hash: 06216d43bb
2024-08-05 17:27:28 -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: 35a4a773f1
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: 83d4623590
2024-07-15 11:12:24 -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: 12d729a0a0
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: c95b58401a
2024-07-02 13:27:45 -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: bc303df6a0
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: 7dbf60b4bc
2024-06-12 17:16:30 -07:00
Adeeb Shihadeh
ba34590567 controlsd: remove last mention of CAN (#32646)
old-commit-hash: a7ed190df4
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: e71ec4e8d7
2024-06-06 14:31:56 -07:00
Adeeb Shihadeh
2c6829ed67 boardd is pandad (#32628)
* boardd is pandad

* rename tests
old-commit-hash: 34e329649d
2024-06-04 19:16:55 -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: fa2d5bca57
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: 9fa92c2225
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: 71f5c441fe
2024-05-21 01:18:10 -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: 220fcc1675
2024-05-19 01:07:12 -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: 407791113d
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: 8f46028bd4
2024-05-14 15:20:03 -07:00
Shane Smiskol
c3630f813a controlsd: use already initialized params (#32429)
old-commit-hash: 6f3cd143ef
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: d0d44a51a0
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: 9287a69624
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: d18da895d3
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: 3dfb6d7931
2024-05-13 12:50:42 -07:00
Shane Smiskol
c4e445e6c5 card: more final structure
old-commit-hash: d28624fe5b
2024-05-10 23:18:48 -07:00
Shane Smiskol
753dbe8f6e controlsd: use latest actuatorsOutput (#32390)
use current actuatorsOutput
old-commit-hash: ef1693433f
2024-05-10 21:00:01 -07:00
Shane Smiskol
8708fb2a32 card: preparation (#32382)
* card prep

* also format
old-commit-hash: 2e6b2ef3c9
2024-05-08 23:54:20 -07:00
Adeeb Shihadeh
a6faeb03ce adjust gps alert
old-commit-hash: 6ef95f7a91
2024-05-01 11:35:20 -07:00
Armand du Parc Locmaria
938759ebd1 commabody: ignore fcw alerts (#32301)
* ignore modelV2 and longitudinalPlan on the body to avoid fcw alerts

* move joystick_mode up because ignore depends on it

* revert and ignore fcw itself instead
old-commit-hash: adabd108e2
2024-04-26 20:04:10 -07:00
Justin Newberry
76dc74787b controlsd: fix steer saturation premature warning (#31909)
fix last actuators
old-commit-hash: 4ecbaa41fa
2024-03-21 18:31:22 -07:00
Justin Newberry
a5bc36ea9d move git commands to common/git.py (#31921)
move git into common/git.py
old-commit-hash: 4fbc8a3896
2024-03-19 12:39:09 -07:00