Commit Graph

563 Commits

Author SHA1 Message Date
JaSpa99 dc73e6e2aa
Make SimulatorBridge picklable (MacOS support) (#34023)
* remove unused

* make Params (un)serializable

* move initialization after spawn

_thread.lock objects can't be pickled
2024-11-14 10:25:50 -08:00
Shane Smiskol 44c889fa41
longcontrol: prevent integral windup when feedforward rises gradually (#33970)
* try

* messy

* simplify that

* clip instead

* clean up

* clean up

* update refs

* this is better for latcontrol

* Revert "update refs"

This reverts commit 1d2508237f.

* ref commit
2024-11-08 18:15:36 -08:00
Jason Young 17edc5f660
support for SecOC cars (#33689)
* bump opendbc

* support for SecOC cars

* missed this

* bump opendbc

* un-nest SecOC params

* gate saved key retrieval on IsReleaseBranch false

* bump opendbc

* bump opendbc

* bump opendbc to point of SecOC merge

* bump opendbc
2024-10-01 20:22:46 -04:00
Adeeb Shihadeh df9b8f0222
camerad: final debayer prep (#33598)
* prep part 4?

* cleanup

* little less magic

* reorg

* final touches

---------

Co-authored-by: Comma Device <device@comma.ai>
2024-09-19 16:14:29 -07:00
Shane Smiskol 82f8db87f4
add longitudinal maneuvers (#33527)
* add longitudinal profiles

* stash

* unfortunately even longitudinalPlan causes circle

* add to process config

* reach target speed smoothly

* stash

* works

* clean up

* debug alert

* rename

* fix

* better text

* toggle via exp button

* try coming to a stop better, smoother target reaching

* closer to target

* revert controlsd migration

* add description to alert

* generate report from local logs

* hide bad maneuvers

* pdflike

* Revert "pdflike"

This reverts commit 6d4af1bf9b.

* try this

* use alert manager

* fix that check

* wat

* Revert "wat"

This reverts commit 93d0d27ab8.

* some clean up

* rm

* cleanup

* move

* fix test

* more fix

* clean up

* fix that
2024-09-12 14:10:18 -07:00
Dean Lee b286a2f0e5
transformations: standardize parameter passing by reference (#33469)
pass parameters by reference
2024-09-07 17:06:57 -07:00
Kacper Rączy 236dffe400
locationd no GPS (#33029)
* Pose kf draft

old-commit-hash: 17dd4d576e597792f0e18826498c00076739f92b

* Fix it

old-commit-hash: 13ac120affe58fd22e871586ea5f4d335b3e9d2b

* Add translation noise

old-commit-hash: 166529cb612858c4ce80649367ac35b2b6007e1d

* Add gravity to acc

old-commit-hash: 8fcfed544b8e090ccc86b189c13bc03c6c190613

* Use pyx

old-commit-hash: 8e69e0baa0a4c43b4d0c22535711f296f05420aa

* Indent

old-commit-hash: 25b19a73644cdcb571ccf1a1d8acb88a0d066c67

* Reset function

old-commit-hash: ca5d2736da15e4fd6539f7268133320735b7c9cc

* Add device_from_ned and ned_from_device transformations

old-commit-hash: a60d25da0edc311e583549dc015fa595749fd4ae

* Fix rotations

old-commit-hash: d6d582f7f6d19a2bc2308dbcb0c9f81363e325b6

* kms

old-commit-hash: 681bc4e50374795ccc61422c3ce4ffb51389fce2

* Centripetal acceleration

old-commit-hash: 6e574506d27e5b76a04b2097d94efa4ca91ead71

* Rewrite draft

old-commit-hash: 4a2aad0146267460e5d30036c8cdb2bef94d1d7c

* Remove old locationd stuff

old-commit-hash: c2be9f7dbf22fb5cd29e437cd7891a7d52266fba

* Python process now

old-commit-hash: 83fac85f28c0b546b6965aafe1dd8a089e67f5b3

* Process replay fix

old-commit-hash: c44f9de98583c49dad0b22497869b3bb0266fcd9

* Add checks for timing and validity

old-commit-hash: aed4fbe2d00ca620e01a0e0ee99a4871c939de36

* Fixes

old-commit-hash: 3f052c658c16984a34915f38afdfbfd0fb19a267

* Process replay config fixes

old-commit-hash: 1c56690ee7ceb3c23c9ec2b2713352191212716e

* static analysis fixes

old-commit-hash: 6145e2c140ea9aa97e75069c3ddd82172cadc866

* lp in latcontrol

old-commit-hash: 9abf7359d68e794c69052724f3aca14b04dd3cca

* Fix SensorEvent name for acceleration

old-commit-hash: 91a1ad6c604727c9c898ba4aefe9478022b167fd

* Ignore sensor readings from segments with multiple imus

old-commit-hash: 1f05af63d6cc605ea98d7da0d727a5bd8d7819b0

* Update shebang

old-commit-hash: e3f2f5c10df3a4ba698421335bfeffc63d1a8797

* Replace llk with lp

old-commit-hash: 99b6c7ba08de6b703708fef0b8fd2d8cb24b92c0

* Refactor locationd scenario test

old-commit-hash: 7f5f788f071b7647e36f854df927cc5b6f819a84

* Add more debugging tools

old-commit-hash: 8d4e364867e143ea35f4bfd00d8212aaf170a1d1

* Param name update

old-commit-hash: 5151e8f5520f067e7808e3f0baa628fbf8fb7337

* Fix expected observations

old-commit-hash: d6a0d4c1a96c438fb6893e8b6ff43becf6061b75

* Handle invalid measurements

old-commit-hash: 549362571e74ad1e7ec9368f6026378c54a29adf

* Fix spelling

old-commit-hash: eefd7c4c92fb486452e9b83c7121d2599811852b

* Include observations in debug info too

old-commit-hash: 625806d1110b3bffe249cd1d03416f2a3f2c1868

* Store error instead of expected observation

old-commit-hash: 1cb7a799b67e56af4eddc6608d5b0e295f2d888c

* Renames

old-commit-hash: a7eec74640fc5cc7a5e86172d2087b66cb93d17d

* Zero the yaw

old-commit-hash: 96150779590fcb8ac50e8ffe8f8df03105983179

* New state_dot for orientation

old-commit-hash: c1456bf3a0c5af2f888aa6ff0b5ffc2e5516ddf7

* Fix the state transformations

old-commit-hash: 7cb9b91e2f99caa4ac3fb748c7f23bb8bf9f65db

* Update process in test_onroad

old-commit-hash: 854afab7c39ca7dec2b42974cecbb5310b82b617

* Test polling on cameraOdometry

old-commit-hash: a78e8b7d61618177f15c9892e2fa1e51620deca8

* Keep the copy of x and P returned from predict

old-commit-hash: 3c4159a6a7d7383265a99f3f78f8805d2fcfc8cd

* Remove polling again

old-commit-hash: f7228675c5fd2de5f879c4786859f1abcec27d68

* Remove locationd.cc

old-commit-hash: d7005599b2b178e688c3bd1959d6b69357d3a663

* Optim in _finite_check

old-commit-hash: 58ad6a06b9380960e9f69eb98663ddb97461e8d5

* Access .t once

old-commit-hash: d03252e75ed4cbdb49291a60c904568e6a3d3399

* Move the timing check to cam odo code path

old-commit-hash: 6a1c26f8c201e1feb601753f0cb7299cf981b47e

* Call all_checks only once

old-commit-hash: 373809cebf8d9db89d1ab00f4c8c933f33038e78

* Do not sort

old-commit-hash: 2984cd02c0ab76827b8c7e32f7e637b261425025

* Check sm.updated

old-commit-hash: 11c48de3f0802eb4783899f6a37737078dbf2da4

* Remove test_params_gps

old-commit-hash: 82db4fd1a876cc2402702edc74eba0a8ac5da858

* Increase tolerance

old-commit-hash: 927d6f05249d2c8ec40b32e2a0dcde8e1a469fb3

* Fix static

old-commit-hash: 2d86d62c74d5ac0ad56ec3855a126e00a26cd490

* Try separate sockets for sensors

old-commit-hash: 5dade63947ab237f0b4555f45d941a8851449ab1

* sensor_all_checks

old-commit-hash: e25f40dd6b37ee76cd9cc2b19be552baf1355ec3

* Fix static

old-commit-hash: 328cf1ad86079746b4f3fde55539e4acb92d285e

* Set the cpu limit to 25

old-commit-hash: 7ba696ff54c5d3bfa42e42624d124f2a1914a96d

* Make it prettier

old-commit-hash: cd6270dec80d8b9dac784ddd4767a1a46bcff4b7

* Prettier

old-commit-hash: 1b17931d23d37f299dad54139eaf283a89592bf5

* Increase the cpu budget to 260

old-commit-hash: 20173afb937a2609c8a9905aee0b2b093cb8bba4

* Change trans std mult. 2 works better

* Update ref commit

* Update ref commit
2024-09-04 11:54:57 +02: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: 2f3256ed8b
2024-09-02 17:18:43 -07:00
Adeeb Shihadeh fecf6134ef move PID controller to common/ (#33419)
old-commit-hash: f59a1bf003
2024-08-31 16:49:29 -07:00
Adeeb Shihadeh 854d03a819 manager: remove LastUpdateTime default
old-commit-hash: 39c64d44a1
2024-08-27 12:03:55 -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
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 d8f56b30b5 selfdrive/car: ban common (#33210)
* ban all of common & copy numpy_fast

* add numpy_fast

* these are okay

* and ban controls

* better name

* Conversions

* do utils, kalman

* clean up

* sorting

* don't forget
old-commit-hash: 8d961a12e5
2024-08-06 20:45:11 -07:00
Shane Smiskol 3df0a1ebbf remove CarVin parameter
old-commit-hash: 87c6afccf7
2024-08-05 22:31:04 -07:00
Adeeb Shihadeh fc469e5f80 Revert "Remove `setproctitle` (#32716)" (#33195)
* Revert "Remove `setproctitle` (#32716)"

This reverts commit 9020d1931f4cd72f8162e4402278bdf76e3746f2.

* uv lock

* old name
old-commit-hash: 29b58d4f2f
2024-08-05 16:42:22 -07:00
Shane Smiskol cfc2cda37c separate car logger forwarded to cloudlog (#33170)
* car logger

* try this

* fix double printing!

* clean up

* need to import where we actually use it (card won't be in submodule)

* NullHandler does not forward everything properly, need propagate=False to stop root logger from printing

* card is staying

* set up

* forward
old-commit-hash: 12a7b7f7fb
2024-08-05 12:31:31 -07:00
Dean Lee c92010d0ac params: wrap fsync and close in HANDLE_EINTR for robustness (#33154)
Wrap fsync and close in HANDLE_EINTR for Robustness
old-commit-hash: ea5ee29ebd
2024-08-02 12:16:24 -07:00
ZwX1616 03fa24ee82 camerad: use os binning (#33161)
* all

* right sz

* what is this

* Revert "what is this"

This reverts commit 3ff771926f.

* ok

* big

* update intrs

* fl

* more specifuc

* fish

* revert

* revert

---------

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 3ccc63deec
2024-07-31 19:10:44 -07:00
Mauricio Alvarez Leon 8d8c2a29c9 remove `timezone` from `timed.py` (#32665)
* use timezone from tilequery mapbox api

* add timezone into cereal

* better clean

* more

* one line

* poetry lock
old-commit-hash: 7013eed50c
2024-06-19 20:34:57 -07:00
Adeeb Shihadeh 3b8ed67aa3 remove navigation (#32773)
* remove navigation

* lil more

* fix cabana

* revert for now

* fix docs

* move that over

* lock

* rm assets
old-commit-hash: e491c9d964
2024-06-19 19:14:13 -07:00
Adeeb Shihadeh 9cfdd6200d Remove `setproctitle` (#32716)
* Custom setproctitle (#32667)

* add custom setproctitle

* add test

* Update poetry.lock

* fix lint

* support only Linux

* test only Linux

* final lint

* Update test_setproctitle.py

* Update setproctitle.py

* convert to threadnames

* delete proctitles

* Check str len and use PR_GET_NAME

* fix poetry.lock

* lint fix

* Update common/threadname.py

---------

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

* revert that for now

* use last 15

* fix

* use name

* update those

* and modeld

* rm

---------

Co-authored-by: schlimeszn <138847413+schlimeszn@users.noreply.github.com>
Co-authored-by: reddyn12 <nikhilr.ssm@gmail.com>
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 83ac80c6c8
2024-06-11 21:57:32 -07:00
Mauricio Alvarez Leon 008008b03a Update to Python 3.12 (#32548)
* 3.12

* pprofile is broken

* use modified metadrivepy3-12

* 0.3.0 metadrive

* add metadrive/commaai git dependency

* metadrive git set

* pin sounddevice 0.4.6

* datetime.utcnow() deprecation

* poetry lock

* make datetime not aware

* poetry lock

* pin pytools

* google_crc32c wheel

* unpin sounddevice

* clean metadrive

* use python crc

* mypy

* 3.12.4

* allow python3.11

* test

* no pip

* poetry

* better

* better

* merge

* remove

* try

* test

* try  this

* snok

* python

* simpler

* setuptools

* lower

* try

* try

* work?

* ubuntu deps

* ubuntu

* try

* remove

* move

* remove this

* names

* Update .github/workflows/tools_tests.yaml

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

* python<4

* <3.13

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
old-commit-hash: 148eaf8fa6
2024-06-11 20:45:15 +00:00
Adeeb Shihadeh e920e57530 Revert "Custom setproctitle (#32667)"
This reverts commit 1f45e163559baa2a6127d5a5e8deb7067e32f813.

old-commit-hash: 5b51f03967
2024-06-10 19:55:41 -07:00
schlimeszn afea57ae2a Custom setproctitle (#32667)
* add custom setproctitle

* add test

* Update poetry.lock

* fix lint

* support only Linux

* test only Linux

* final lint

* Update test_setproctitle.py

* Update setproctitle.py

* convert to threadnames

* delete proctitles

* Check str len and use PR_GET_NAME

* fix poetry.lock

* lint fix

* Update common/threadname.py

---------

Co-authored-by: reddyn12 <nikhilr.ssm@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 3365ed5eff
2024-06-10 18:59:01 -07:00
Dean Lee 061deaa80f common/ratekeeper: change frame() return type from double to uint64_t (#32679)
old-commit-hash: a4f0f6ca36
2024-06-10 13:37:50 -07:00
Adeeb Shihadeh 8c82ecbe3d bump version to 0.9.8
old-commit-hash: 2cfb4df82c
2024-06-09 11:18:47 -07:00
Adeeb Shihadeh 92ad30cbd6 Replace markdown-it-py with small function in common/ (#32664)
* Replace markdown-it-py with small function in common/

* simple test

* unused

* lock

* linting fixes
old-commit-hash: 5265d13fe0
2024-06-08 15:39:26 -07:00
Shane Smiskol 2d4f0e2af8 remove old cache wrapper (#32653)
* remove wrapper that is functools.cache

* format
old-commit-hash: 451e171ad9
2024-06-07 21:24:32 -07:00
Adeeb Shihadeh 30c41788dc thermald is hardwared (#32637)
* thermald is deviced

* hardwared

* rename
old-commit-hash: 51fdf23304
2024-06-05 15:58:00 -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
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: c59887c810
2024-06-03 15:48:56 -07:00
Dean Lee ab660be49f common/prefix.h: Fix incomplete path cleanup on exit (#32559)
old-commit-hash: 5f778c0d3a
2024-05-29 19:04:03 -07:00
Adeeb Shihadeh 3358745103 ruff: enable UP
old-commit-hash: b2e4c64cf8
2024-05-20 17:43:54 -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: dd9d5d4528
2024-05-17 11:01:44 -07:00
Dean Lee a896ef9680 util: remove unused functions (#32372)
cleanup
old-commit-hash: c063395312
2024-05-08 10:18:43 -07:00
Adeeb Shihadeh 35215df6c0 remove Offroad_InvalidTime alert
old-commit-hash: 1fc3d9224e
2024-05-07 15:58:29 -07:00
ZwX1616 f466145f34 image processing refactor and test (#32249)
* it's something

* backup

* 16:10

* cleanup

* this is fine

* close

* remove some junk

* no heck

* disos

* real 10

* for some reason this is flipped

* 20hz

* no return

* ae

* tear

* need curve laster

* correct real gains

* fix time

* cleanup

* why the scam

* disable for now

* 0.7

* hdr

* that doesnt work

* what

* hugeoof

* clean up

* cleanup

* fix regs

* welp cant

* is this corrent

* it is sq

* remove

* back

* stg10bit

* back2ten

* Revert "remove"

This reverts commit 18712ab7e1.

* 20hz and swb

* correct height

* 10bit

* ui hack for now

* slight

* perfect

* blk64

* ccm

* fix page faults

* template

* set 4x

* is this fine

* try

* this seems to work

* Revert "this seems to work"

This reverts commit d3c9023d3f.

* needs to be static

* close

* 64 is optimal

* 2

* take

* not 1

* offset

* whats going on

* i have no idea

* less resistence

* box defs

* no

* reduce blur artifacts

* simplify

* fix

* fake short is too much for bright

* can be subzero

* should not use lsvc

* no wasted bit

* cont no slow

* no less than 10bit

* it is based

* wrong

* right

* quart

* shift

* raise noise floor

* 4.5/4.7

* same ballpark

* int is fine

* shane owes me m4a4

* Revert "shane owes me m4a4"

This reverts commit b4283fee18.

* back

* Revert "4.5/4.7"

This reverts commit e38f96e90c.

* default

* oof

* clean up

* simpilfy

* from sensorinfo

* no div

* better name

* not the wrong one

* not anymore relevant

* too

* not call it debayer

* cl headers

* arg is 2nd

* gone is is_bggr

* define

* no is hdr

* rgb_tmp

* p1

* clean up

* 4

* cant for

* fix somewhre else

* const

* ap

* rects

* just set staruc

* nnew tmp

* pull it for now

* 12

* common rect

* Revert "not anymore relevant"

This reverts commit 1d574673a1.

* Revert "too"

This reverts commit c2d4dcc52a.

* Revert "Revert "too""

This reverts commit 0abbabe1fd.

* no tol is fine

* rename

* sensor id

* unsgin

* flag

* some linalg

* cast

* should be h ref

* cap

---------

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 331c7b103a
2024-04-18 21:45:59 -07:00
ZwX1616 c741dca04c 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
old-commit-hash: 1d05704d27
2024-04-17 12:56:37 -07:00
Dean Lee 9e67d3fd70 common/params.cc: unlink tmp_path only if there's an error (#32145)
old-commit-hash: c1edc0901e
2024-04-10 19:51:33 -07:00
Justin Newberry 4724c144a8 pytest: don't delete logs on-device (#32080)
fix log deletion
old-commit-hash: c09cf4983b
2024-04-01 17:43:22 -07:00
Adeeb Shihadeh 91be24ae16 timed: set valid flag (#32061)
* timed: set valid flag

* oops
old-commit-hash: 43832335b8
2024-03-30 17:47:21 -07:00
Dean Lee f1d7faf60d util: safer `ends_with` (#31943)
* safer ends_with

* improve
old-commit-hash: d05c19b9f4
2024-03-26 10:56:02 -07:00
Justin Newberry ac853fc354 common/run: add environment variable argument (#31957)
run add environment argument
old-commit-hash: efc32c2930
2024-03-21 12:58:16 -07:00
Justin Newberry 1e238a2163 git commands: more parameterization on path (#31942)
* more cwd

* here top

* and here

* basedir
old-commit-hash: 806f743e12
2024-03-21 09:47:26 -07:00
Justin Newberry 3ab117d599 add get_build_metadata function (#31923)
* version

* Get build metadata

* two lines

* channel

* cwd

* default to unknown

* dataclass
old-commit-hash: 38d03b9979
2024-03-20 16:43:58 -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
YassineYousfi 09fcc544b5 camera: add all_cams iterator, allow None camera, add camera size property (#31835)
* camera: add neo_config for easy access

* camera: add all_cams iterator and cam size

* can be none

* use FakeCameraConfig

* rename to None
old-commit-hash: 30ce6af490
2024-03-12 15:29:49 -07:00
Jason Wen 1d014c0892 Params: remove unused key (#31826)
old-commit-hash: 0e92097f7e
2024-03-11 13:47:41 -07:00
Justin Newberry f2533f20cd fix simulator device config (#31827)
fix sim
old-commit-hash: 1db30eae3a
2024-03-11 11:58:24 -07:00
Adeeb Shihadeh da31ce154a refactor camera transformations (#31818)
* refactor camera transormations

* update users

* more stuff

* more fix

* swap

* tici

* lil shorter
old-commit-hash: e3589e4b5c
2024-03-10 16:56:50 -07:00