Commit Graph

958 Commits

Author SHA1 Message Date
Adeeb Shihadeh
3c48bc47b7 Move a bunch of stuff to system/ part 3 (#24829)
* move swaglog.py

* timezoned

* logmessaged

* version.py

* fix linter
old-commit-hash: 0fce5d9045
2022-06-11 23:19:27 -07:00
Adeeb Shihadeh
9a45a3b99b Move selfdrive/hardware/ to system/ (#24725)
* move hardware to system/

* fix mypy
old-commit-hash: 1139fe507b
2022-06-11 16:38:24 -07:00
HaraldSchafer
bc679f735d Misc torque control fixes (#24801)
* Fiction compensation should be based on error

* Update refs

* Add deadzone

* update ref
old-commit-hash: 843e59f6f0
2022-06-10 22:52:48 -07:00
HaraldSchafer
f7edd5f3d3 Car interface: set max lateral torque from table (#24789)
* json

* better naem

* Read from table

* formatting and default to nan

* Generate docs

* Read from table

* this should be the same

* Prius v is full

* test we always set the tunes correctly

add to release files

* Set for all cars

Set for all cars

* Revert tuning changes

Revert tuning changes

* remove that

* fixes

* update ref commit for new maxLateralAccels

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 3066ad81a8
2022-06-10 17:57:23 -07:00
ZwX1616
c73d4e5fc6 Revert fullframe DM model (#24812)
* Revert "fullframe DM: flip RHD yaw to use matching thresholds"

This reverts commit ce7daabc8847d18ba46e5d1879f5a6958d04ccc7.

* Revert "fullframe DM model (#24762)"

This reverts commit 817be81fb19004f4873881f6b29dcdfffbe7e3a8.

* revert cereal
old-commit-hash: c646eeee0a
2022-06-10 16:16:46 -07:00
Shane Smiskol
68e8173474 docs: adjust steering torque thresholds (#24798)
* Prius has good steering control now

* 1.5 is the threshold for good torque

* get back down there, hondas

* half stars for 1.0-1.5

* show number of cars

* try bigger

* emphasize tiers

balanced

* Add half star

* Update ref_commit
old-commit-hash: 1b402687e4
2022-06-09 18:51:34 -07:00
ZwX1616
02f0f39b52 fullframe DM model (#24762)
* get log

* simplify two nonsense

* not needed

* libyuv is a joke

* clean up

* try small

* fast but not bad

* working

* clean up driverview

* simplified

* thats mirrored

* smol

* tweak

* ref is screen

* w/ ee

* update camera model

* no if TICI

* start

* update pose thresh

* less cpu more dsp

* new libyuv

* new snpe

* add files

* test

* should be fast

* update out len

* trigger test

* use master snpe

* add cereal

* update cereal

* refactor parsing

* missing ;

* get

* wrong type

* test model

* use driver data

* 10829278-72fe-4283-a118-2cef959ce174/1550

* no pf

* adapt driverview

* ;

* rhd learner

* update libyuv buildi x64

* ad4337ea

* remove blink slack

* test

* no

* use toggle

* b16

* fix for nv12

* 5b02cff5 both

* update test

* update cereal

* update cereal

* update cereal

* v2 packets

* revert libyuv

* no /

* update snpemodel

* ;

* memcpy

* fix test

* use toggle in driverview

* update power

* update replay

* Revert "update replay"

This reverts commit 1d0979ca59dbc89bc5890656e9501e83f0556d50.

* update model ref

* halve cpu

* fake 8bit onnx runner

* same thresh as report

* cereal master

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: d6c07a6b15
2022-06-08 20:13:46 -07:00
Lukas Petersson
4171e45e9c process replay: regen in parallel (#24628)
* regen in parallel

* prefixes

* clean regen

* clean output

* tqdm loc

* del swp file

* add routes back

* cleanup

* disable tqdm

* unique dirs

* unique dirs

* outdir in regen_all

* formatting when played from other dirs

* prefix dongle id

* local disable_tqdm

* formatting

* bug fix

* dont spam fakedata

* 16 char fake dongle ids

* formatting

* formatting

* more descriptive dongle

* fix azure path

* couple more fixes

* handle failures nicely

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 397da56c85
2022-06-06 14:21:12 -07:00
Shane Smiskol
1a2bf8412c Car documentation: set steering torque star using car interface (#24709)
* Set good torque using torque controller tuning

* should be equal to

* save lateral accel to car params

* use maxLateralAccel

* always

* same convention

* nan will always evaluate to false

* The great good torque purge

* adjust default friction

* Add data for more cars

* adjust name

* Welcome back, guys. Only adjust good torque if maxLatAccel is set

* Update refs (1.7 is 1.7000001...)
old-commit-hash: c6bc03311c
2022-06-03 17:41:20 -07:00
HaraldSchafer
08ad733229 Remove laneless toggle (#24738)
* Remove laneless toggle

* Update refs
old-commit-hash: 7f16e19f79
2022-06-03 14:04:14 -07:00
HaraldSchafer
7c4645f227 Fix onnx model replay (#24702)
* No more C2

* Add test

* Various fixups

* Use ONNXCPU

* rm prints

* LFS pull

* Use sim docker

* Try sim docker again

* Print counter

* Make sure it can fail

* Fails correctly

* comments

* Add more install to opencl base docker

* vim not needed in base
old-commit-hash: a2c6b30c98
2022-06-03 10:43:09 -07:00
Lukas Petersson
35f277516e process replay: upload-only bug (#24722)
dont look for lr with upload only
old-commit-hash: 50a8b30580
2022-06-02 17:25:44 -07:00
Shane Smiskol
6e6f8422fc process replay: fix tested_cars
old-commit-hash: 6a21cc83ff
2022-06-02 14:20:19 -07:00
Shane Smiskol
490a836dd6 process replay: fix updating refs (#24716)
fix updating refs
old-commit-hash: 90af436a12
2022-06-02 13:49:21 -07:00
Willem Melching
753045c73d less TICI when not needed (#24698)
* less TICI when not needed

* fix process replay

* move reading voltages into hw abstraction layer

* Update selfdrive/hardware/tici/hardware.h

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

* Update selfdrive/hardware/hw.h

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

* Update selfdrive/hardware/base.h

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

* rename init function

* Update selfdrive/athena/athenad.py

Co-authored-by: Robbe Derks <robbe.derks@gmail.com>

* Update selfdrive/boardd/boardd.cc

* Apply suggestions from code review

* Update selfdrive/thermald/thermald.py

* update ref

* fix alert width if all cameras are bad

* add ecam to test_loggerd

* bump cereal

* bump cereal

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Robbe Derks <robbe.derks@gmail.com>
old-commit-hash: f49a9c9fd2
2022-06-02 15:20:51 +02:00
Lukas Petersson
a16a20005b process replay: logreader as bytes (#24610)
* willem's changes

* classmethod for bytes

* submodules

* submodules

* Update tools/lib/logreader.py

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

* add back files

* little cleanup

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 86f73a507e
2022-06-01 22:02:42 -07:00
ClockeNessMnstr
eeccd04c11 process replay: only download used logs (#24661)
* only download wanted logs

* cleanup

* cache as an option

* cleanup

* Readme

* Revert "cache as an option"

This reverts commit 060ed4ade548696505e3185fc7d20f1897072ded.

* cleanup

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 3fb22c0289
2022-06-01 21:46:45 -07:00
George Hotz
2a6ffaf71d nv12: encoderd avoids a full frame copy (#24519)
* rgb to nv12

* nv12 works (w memcpy)

* correct now

* no copy

* fix nv12 with fast debayer

* reverts of unused stuff

* ui use nv12

* comment out thumbnails for now

* rebase fix

* dm read nv12

* model read nv12

* fix ffmpeg encoder

* thumbnails from nv12

* replay to nv12

* python framereader support nv12

* remove hardcoded frame/buffer sizes

* fix build

* ffmpeg encoder fix buffers

* small cleanup

* reduce power usage test

* fix cpu usage test

* fix snapshot

* fix loggerd test

* bump cereal

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Joost Wooning <jwooning@gmail.com>
old-commit-hash: ea5b8cdfb1
2022-06-01 17:18:28 +02:00
Gijs Koning
6a53db981b Simulator: Speed up process by removing second camera (#24679)
* simulator: support running wide camera only

* proper frame id

* use param name that makes more sense

* do some cleanup

* Update tools/sim/bridge.py

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: b5aed2bf67
2022-05-30 15:25:07 +02:00
HaraldSchafer
f5a6a6dc77 Tssp prius torque control (#24669)
* use llk

* use steering sensor at low speed stil

* Try more simple

* rm prius tune

* updated ref
old-commit-hash: d708a134bd
2022-05-27 10:21:02 -07:00
Shane Smiskol
222d8818d7 process replay: fix updating refs after regen (#24656)
* fix updating refs after regen

* match spacing

* same as before

* fix

* minimize diff

* update

* not used
old-commit-hash: dff70876c3
2022-05-26 00:39:33 -07:00
Adeeb Shihadeh
3e8625e50b visionipc python shim (#24660)
old-commit-hash: 32a9ccfc37
2022-05-25 20:49:56 -07:00
Lukas Petersson
afbdbc7c39 process replay: fix regen routes with migration (#24651)
* hacks to make routes work

* clean up

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 7d06a366f7
2022-05-24 20:00:55 -07:00
HaraldSchafer
39886246c9 Rerevert torque control (#24649)
* Revert "Revert torque control (#24565)"

This reverts commit 93f434d047a92366c4ccefeece86fe101ed98d02.

* Move tune out of car specific stuff

* Update ref commit
old-commit-hash: d928972150
2022-05-24 17:52:33 -07:00
Lukas Petersson
81af5dacdf process replay: update regen body route (#24648)
update to a preserved route
old-commit-hash: 3e975eb3aa
2022-05-24 17:07:10 -07:00
Lukas Petersson
bcc6ca0cf5 process replay: prefix setup in helper (#24636)
* prefix setup in helper

* context manager

* name change + none default

* skip checking prefix

* type hints + unset env
old-commit-hash: d6fb78b9a3
2022-05-24 12:33:59 -07:00
HaraldSchafer
55085a12db New model: better laneless (#24605)
* Fix ping pong

* Fix hugging: e6fd3a62-aa86-46d1-a414-19137ed1babc/800

* Remove lateral toggle

* a6da6265-1952-48dd-986b-2b5996dd2642/950

* Model replay commit

* Revert "Remove lateral toggle"

This reverts commit 69e57eb7e1a72e4bad5e12bcfded6ff431a21a0e.
old-commit-hash: 7da48ebdba
2022-05-24 09:11:31 -07:00
Lukas Petersson
d1e21cef79 process replay: support running in parallel (#24534)
* prefix params

* set env

* prefix in manager

* filesystem except

* dont delete manager folder

* Update selfdrive/common/params.h

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

* debug same path

* remove cleanup + same default

* dont use filesystem lib

* param symlink path

* prefix helpers

* path

* dont delete d

* parallel loop

* refactor loop

* msgq

* clean msgs

* spelling

* nestable pool

* spelling

* logreaders in parallel

* bugfix

* assert msgq

* Update selfdrive/test/process_replay/test_processes.py

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

* Update selfdrive/test/process_replay/test_processes.py

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

* assert in cereal

* folder exists

* create dirs in test

* bump cereal

* Update selfdrive/test/process_replay/process_replay.py

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

* PR feedback

* params path in basedir

* ref commit

* param path

* bugfix

* upload_only

* param path

* Update selfdrive/test/process_replay/process_replay.py

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

* msgq path name

* python concurrency.features

* progress bar

* remove progress bar from compare logs

* Update selfdrive/test/process_replay/test_processes.py

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

* Update selfdrive/test/process_replay/test_processes.py

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

* defaultdict

* context manager

* update refs

* dont get logs if upload only

* upload refs in parallel

* cleanup

* Update selfdrive/test/process_replay/test_processes.py

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

* cleanup

* text

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 444d265821
2022-05-18 19:59:30 -07:00
HaraldSchafer
3494ec7bbd Revert "Joint model (#24521)" (#24581)
This reverts commit 9fc732468ee4d4fd135d679a919c748633f06d02.
old-commit-hash: e2e5378dd3
2022-05-18 10:56:45 -07:00
Adeeb Shihadeh
1d9d8d874b controlsd cpu has crept up
old-commit-hash: 3771ccc655
2022-05-17 19:42:58 -07:00
HaraldSchafer
efa559f9be Revert torque control (#24565)
* torque reversal start

* Fix carmodel tests

* Update ref

* update ref

* Elif is better than if
old-commit-hash: 9f8b03753d
2022-05-17 19:00:57 -07:00
George Hotz
3ee5b1bf07 make debayer faster (#24557)
* remove local caching

* remove local caching

* reduce camerad power

* break stupid imx390 black level support

* handle edges

* now 13ms, vignetting is 'slightly' less correct

* halfs->floats and inlines, down to 12.9ms

* oops, fix float

* val from 12 is ushort

* don't decide vignetting in the debayer kernel

* 7.77 ms

* adding back black level support was free

* Revert "adding back black level support was free"

This reverts commit a841d17727886807a040dcf856ab22480fa93eff.

* minor

* rip out unused gain and black level, remove print

* save 150mW

* fix replay test

* fix top/bottom rows

* lame left right edge fix

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Joost Wooning <jwooning@gmail.com>
old-commit-hash: 72b52f8b7d
2022-05-17 10:18:36 -07:00
HaraldSchafer
78c2e16a03 Joint model (#24521)
* update models

* wip lanelines mhp parsing

* typos

* newer models

* 95995a49-db0c-4261-8776-b90780dc2a8c/600

* Use laneful policy to prevent planner aggression

* c8c3ab69-bd2c-4d1c-a7f8-9e8457e4827b/950

* ede8f75a-df3e-41fb-bc56-63e2f33858e5/950

* 7205c5af-7532-4215-ad9b-678789054db7/995

* bfb34fa3-1d72-4987-854f-43d42ee01015/950

* change cost

* 8ae2477a-b452-4601-b04c-d3af66ea5e98/950

* Update heading cost

* 9b991314-94f5-4f0b-872e-58d95266e4d0/333

* 9b991314-94f5-4f0b-872e-58d95266e4d0/950

* ede8f75a-df3e-41fb-bc56-63e2f33858e5/950

* undo lateral planner changes

* rm whitespace

* update ref

* c0acc19d-f2f1-47ae-8838-5382c6c6c7f5/950

* c0acc19d-f2f1-47ae-8838-5382c6c6c7f5/950

* update model refg

* Update model ref

Co-authored-by: Yassine Yousfi <yyousfi1@binghamton.edu>
old-commit-hash: 7996fd37ef
2022-05-16 17:26:23 -07:00
Willem Melching
0a2c2a6b28 Add unittest for alert callbacks (#24551)
add alert callback test
old-commit-hash: 31af13101b
2022-05-16 16:25:52 +02:00
Joost Wooning
4b3954a21f debayering: update test ref commit
old-commit-hash: 2294fcdbe7
2022-05-16 13:37:16 +02:00
Adeeb Shihadeh
29a516bed8 replay: cleanup unused RGB buffers (#24537)
* replay: cleanup unused RGB buffers

* update replay cam

* little more
old-commit-hash: ab75c53792
2022-05-14 19:55:12 -07:00
Shane Smiskol
874ba219dc Fix process replay regen (#24517)
* fix regen issues

* compress like uploader
old-commit-hash: d6c6275163
2022-05-14 19:53:08 -07:00
George Hotz
a053d070be encoderd: enable (#24492)
* enable encoderd

* correct enable line

* fix loggerd tests

* fix power draw and cpu tests

* correct cpu for encoderd

* fix a bug, video_writer is shared

* fix issue with not recording dcam

* add recording state

* wooo tests pass. encode id keeps counting

* core 3

* loggerd then encoderd

* stop loggerd first

* core 3 always online

* see the camera when we see encoder packet

* encoderd on small core uses 37%

* remove encoder logic from loggerd

* delete unit test that doesn't really make sense anymore

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 94b9972eb7
2022-05-13 17:56:02 -07:00
Joost Wooning
da6d0d878a camerad: combine debayering and rgb_to_yuv opencl kernels (#24452)
* camerad: combine debayering and rgb_to_yuv opencl kernels

* fix border

* fix snapshot

* rename function

* update camerad cpu usage

* update camerad power draw

* vignetting equal to previously

* test other local worksize

* use less floats

* reduce amount of code

* move barrier back

* make faster

* fix corners

* cleanup

* cleanup

* allow more jitter on driverState timing

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 489fbb74b0
2022-05-13 16:49:31 +02:00
Adeeb Shihadeh
aefc73be1b Revert "Joint Model (#24213)"
This reverts commit f6aaafb8d9332c934373fc6fde27abd596b7049f.

old-commit-hash: ef81afc354
2022-05-12 22:52:45 -07:00
Adeeb Shihadeh
99e7d3f26c jenkins: workaround lfs bug
old-commit-hash: c643d74609
2022-05-12 22:08:25 -07:00
YassineYousfi
4709fb5f61 Joint Model (#24213)
* update models

* wip lanelines mhp parsing

* typos

* newer models

* 95995a49-db0c-4261-8776-b90780dc2a8c/600

* Use laneful policy to prevent planner aggression

* c8c3ab69-bd2c-4d1c-a7f8-9e8457e4827b/950

* ede8f75a-df3e-41fb-bc56-63e2f33858e5/950

* 7205c5af-7532-4215-ad9b-678789054db7/995

* bfb34fa3-1d72-4987-854f-43d42ee01015/950

* change cost

* 8ae2477a-b452-4601-b04c-d3af66ea5e98/950

* Update heading cost

* 9b991314-94f5-4f0b-872e-58d95266e4d0/333

* 9b991314-94f5-4f0b-872e-58d95266e4d0/950

* ede8f75a-df3e-41fb-bc56-63e2f33858e5/950

* undo lateral planner changes

* rm whitespace

* update ref

Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
old-commit-hash: eff08cb17f
2022-05-12 19:47:33 -07:00
Adeeb Shihadeh
7a0bddab89 jenkins: prune lfs objects
old-commit-hash: affeb2ef73
2022-05-12 19:38:58 -07:00
Shane Smiskol
28dfaa0abe process replay: save logs to folder (#24509)
* save logs to folder for proc replay

* use fakedata dir

* fix

* only once and where needed
old-commit-hash: d686f9e527
2022-05-12 19:19:47 -07:00
Shane Smiskol
5a0778518d process replay: don't print diff when only uploading (#24514)
when only uploading no need to print success status or update diff

don't print succeed/fail when only uploading
old-commit-hash: 934bc1e6fb
2022-05-12 17:05:22 -07:00
Shane Smiskol
f1f447d092 Add desired curvature to controlsState (#24510)
* Add desired_curvature to controlsState

* clean up

* bump

* bump

* update refs from GitHub!

Co-authored-by: Jason Shuler <jshuler@gmail.com>
old-commit-hash: 6518ecca8f
2022-05-12 16:59:52 -07:00
Joost Wooning
6059fe131b debayering: update ref commit for debayer test
old-commit-hash: 7ff3e32c2b
2022-05-12 14:56:32 +02:00
grekiki
7cd23af9b1 Mypy fixes for --check-untyped-defs (#24372)
more type fixes
old-commit-hash: 17e33978cd
2022-05-12 14:08:11 +02:00
Shane Smiskol
024f42bae5 process replay: automatically push refs on fail (#24414)
* test failure()

* let's just change a tune here

* debug

revert

* debug

* use current commit, not ref_commit

fix

* need to figure out better place for this

* quick test

* test without upload

* temp

* use azure token

* fixes

* shouldn't need this

* debug

* debug

* not getting anything?

* does this mean nothing gets envvars?

* add azure token to docker environment variables

* quote

* move back

* clean up a bit

* more clean up

* like this sorting better

* replace flags with CI and clean up

* test FULL_TEST and minimalize diff a bit

* now test all

* revert tests comments

* remove flags

* revert this

revert this

* now make it fail

* now update ref_commit to last commit (make sure we can re-start this test if we commit before last one finishes uploading)

* fix

fix

fix

fix

* bad commit

* why is it not throwing an exception?

* debug

* URLFile returns empty bytes if using cache and remote file doesn't exist

* we always need to download anyway

* debug...

* duh, wrong file. but neither should have it

* add that back and just check explicitly

* check both

* clean up and make a diff

* stylize

* see if this is a better diff on files changed

* update refs

* revert changes

* only for owners or members

* if we have token access

* if we have token access

* if we have token access

* move up

* clean up

* revert

* move update refs to test_processes

* clean up

* update messages

* update msg

* update README and delete update_refs

* this isn't possible to reach anymore

* fix readme

* better help message

better help message

better help message

* only show basename when uploading, only if failed to find

* test diff

* fix printing old ref commit

* change to using

* update refs

* Revert "update refs"

This reverts commit 2e352a736a6de68e2c7064daa4e2e9409ce77686.

* revert

* ref refers to reference commit/logs, cur refers to current logs/commit (future ref)

* like for better

* Apply suggestions from code review

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

* Update selfdrive/test/process_replay/test_processes.py

* every time lol

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: d2d3b7b823
2022-05-11 15:03:05 -07:00
HaraldSchafer
3427eb411b Latcontrol torque: fix integrator induced ping pong (#24458)
* Latcontrol torque: fix integrator induced ping pong

* Reset on disengage since unwind resets anywayh

* Might be overkill

* rm whitespace

* update ref
old-commit-hash: 29afd53d88
2022-05-06 22:17:21 -07:00