Commit Graph

1216 Commits

Author SHA1 Message Date
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
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
Adeeb Shihadeh
c38766b061 Revert "UI: remove DM icon (#24771)"
This reverts commit f7f2bb2a1e70e0946edb362b70ed42e496f77f91.

old-commit-hash: 86ce2f8d4d
2022-06-09 17:39:39 -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
Adeeb Shihadeh
d25c537b8b UI: remove DM icon (#24771)
old-commit-hash: 4d836c6edd
2022-06-07 13:59:48 -07:00
Jason Young
1f5667285b ui: fix prime ad storage duration (#24756)
fix ui prime ad storage duration
old-commit-hash: 7e5eec2e4f
2022-06-06 14:03:34 -07:00
Adeeb Shihadeh
59a58cd15f UI: don't disable toggles onroad
old-commit-hash: d3af76842c
2022-06-03 14:34:16 -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
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
Adeeb Shihadeh
11b41511c9 remove unused visionimg
old-commit-hash: c677c6b164
2022-06-01 14:42:32 -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
Willem Melching
2c343d2fe3 navd: rewrite in python (#24621)
* navd: start python rewrite

* use enum

* send empty instruction packet

* parse banner

* cleanup

* switch to coordinate class

* add segment transition logic

* add recompute logic

* cleanup old navd code

* split out helpers

* cleanup release files

* fix typo

* fix docs

* add typing to helpers

* small fixes

* move outside of ui

* get last pos from param

* add ui restart detection

* check running

* send route

* set navInstruction to invalid with no active route

* whitespace

* do not overwrite response and use ratekeeper

* reuse params object

* remove navd exception
old-commit-hash: e72d6b5689
2022-05-30 15:15:51 +02:00
Shane Smiskol
a11084a6c6 UI: draw map with uiUpdate signal (#24632)
* draw map with same uiUpdate signal as onroad window

* fix

* fix

* fix

* test

* test

* clean up

* clean up

* clean up

* draw instantly when dragging

* self explanatory

* remove line

* fix spacing

* see if we call ui'c sm->update before mapwindow

* Revert "see if we call ui'c sm->update before mapwindow"

This reverts commit e5dcd70013750b871894c276e4d15d55b0c92e97.

* sort includes
old-commit-hash: fb4b4773a5
2022-05-27 15:35:09 -07:00
Adeeb Shihadeh
402a0800dd athena: remove redirect detection for old prime (#24662)
This worked on old magenta, but doesn't work on new magenta
or blue prime.
old-commit-hash: e38b93fc31
2022-05-26 16:09:22 -07:00
Shane Smiskol
8d83408ace UI: draw camera on same frame from modelV2 (#24335)
* draw camera on same frame from modelV2

* fix reversing

* optimze

* sleep shorter

* heavy debugging

* clean up

* fix ui hang

* try this

* more generic implementation

* add unused flag back

* draw latest frames when camerad is coming up with no modeld

* only get modelV2 once

* fix drawing

* conflate, reduce buffer, and remove special case when starting

* make tests pass

* remove comments

* frame_id is a uint32_t

* not sure why passing to cameraview causes overflow

* ternary, not too complicated

* change to size

* rename to frame

* use unique_ptr

* Revert "use unique_ptr"

This reverts commit 955842d9511a26468d4deedd1807f096540cb40c.

* Assert buffer size

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

* use one deque with pairs and uint32_t

* formatting

* frame offset

* Revert "frame offset"

This reverts commit a2cff8a2d57a02f314d9f6adb7221b193a150e4c.

* use array

* add prints

* Revert "add prints"

This reverts commit d6978746e5c316fb2d5a619091c9aaf849c31967.

* clean up

* this handles all cases

* we want to clip

* fixes going backwards when replay or modeld lags multiple frames, then skips multiple frames

fixes going backwards when replay or modeld lags multiple frames, then skips multiple frames

* fix rare case where camera is behind model

simpler comment

* draw latest frames if we start with no model, then hang on current frame until model catches up

fix

* store if it's updated

* accurate comment

* reset to latest on connect and showevent

* better order

* use quint32 for sending signal function

* use empty

* draft

* kinda works

* works

* one line

* debug

* clean up

* revert this

* to preserve behavior, think we need to poll these

* revert

* no timeout when modeld is not alive

* Update selfdrive/ui/qt/onroad.cc

* changes from other PR

* see if we're drawing dup model or camera frames

* looks good, just need to clean up

* debug

* clean up

* clean up

* revert these changes

* fix

* pretty simple, test on device

* clean up

* revert this

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: c10a2ef2e4
2022-05-24 17:08:06 -07:00
Jake Lynn
7933015668 fixed CarParams write in replay (#24613)
* fixed CarParams write in replay

* need to capture temporary object

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: dc1a7bf082
2022-05-22 04:30:13 -07:00
Adeeb Shihadeh
dea5b1fbe0 define new prime types
old-commit-hash: ab7c653cc5
2022-05-18 18:50:42 -07:00
Adeeb Shihadeh
f4675fc260 Merge common/ and selfdrive/common (#24556)
* Merge common/ and selfdrive/common

* fix that

* fix version

* fix unit tests
old-commit-hash: cb8885cffb
2022-05-18 14:11:57 -07: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
Willem Melching
860487c4b7 ui: fix cameraview widget on MacOS after YUV changes (#24506)
old-commit-hash: aac7248a01
2022-05-12 17:16:30 +02:00
Dean Lee
dd6b18857a tools/replay: replace deprecated usleep(0) with std::this_thread::yield (#23544)
* use std::this_thread::yield()

* use yield in cameraServer::waitFinish

* rename waitFinish to waitForSent
old-commit-hash: 3863a88356
2022-05-12 15:11:04 +02:00
Anton Rudomanenko
f69d9c7326 fix the problem with replay routes locally (#24350)
fix: fix the problem with replay routes locally

Co-authored-by: Anton Rudomaneko <anton.rudomanenko@nami.ru>
old-commit-hash: 3bfe4a691c
2022-05-12 14:58:35 +02:00
Adeeb Shihadeh
5e42de3e36 body: opt-out logging (#24423)
* body: opt-out logging

* wait a bit

* little better

* fix that too

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 2466233b1c
2022-05-04 14:57:39 -07:00
Willem Melching
1ccab5f034 ui: fix HUD drawing order (#24419)
old-commit-hash: e8892481ab
2022-05-04 12:12:13 +02:00
Willem Melching
44a92a53d0 cameraview.cc: set alignment to 1 when copying texture (#24418)
old-commit-hash: 3fc01ec15a
2022-05-04 11:44:16 +02:00
Willem Melching
43b558f6db map.cc: fix crash on older route with missing liveLocationKalman values
old-commit-hash: 9307fe434c
2022-05-04 11:37:31 +02:00
Adeeb Shihadeh
9424f67e19 body: opt-in logging (#24416)
old-commit-hash: 670126cbf1
2022-05-03 23:46:59 -07:00
Adeeb Shihadeh
98e1937b9d ui: new notcar battery design (#24412)
* ui: new notcar battery design

* if charging

* cleanup

* remove that

* slower

* real colors

* relative from left

* fix that
old-commit-hash: 043a309d67
2022-05-03 16:51:44 -07:00
Adeeb Shihadeh
b35ac8b532 UI: add battery percent to body (#24401)
* UI: add battery percent to body

* little smaller

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 061b18805e
2022-05-02 21:34:06 -07:00
Adeeb Shihadeh
754512ce13 UI: better double click on touch screens (#24400)
* UI: better double click on touch screens

* lower

* just right

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: d7c6121ba8
2022-05-02 19:18:50 -07:00
Joost Wooning
3783eb811f UI: remove unused lock and fence (#24355)
old-commit-hash: 7ac92938d2
2022-05-01 18:57:39 -07:00
Willem Melching
2a5eae5a56 ui: combine OnroadHud into NvgWindow (#24369)
* ui: combine OnroadHUD and NVGWindow

* draw hud first

* cleanup

* removed commented line

* fix text rendering

* increase cpu usage
old-commit-hash: a3cfa444d3
2022-04-29 10:55:44 -07:00
Willem Melching
0817a5aaef ui: only open map pane when route is not empty (#24352)
old-commit-hash: bff0db566b
2022-04-28 14:51:02 +02:00
Adeeb Shihadeh
35e073a22e Revert "onroad UI: show negative speed (#23987)"
This reverts commit cac807daf9e39f982db2a856403a50a67622b992.

old-commit-hash: de56544531
2022-04-25 15:16:06 -07:00
Joost Wooning
31f9e8af0f UI: remove memcpy on frame receive (#24318)
* UI: remove frame memcpy

* fix freezing

* fix onroad test
old-commit-hash: f84fdc86bb
2022-04-25 13:45:55 -07:00
Joost Wooning
c3bebf3e19 UI: use YUV stream instead of RGB (#24317)
* UI: use YUV stream instead of RGB

* cleanup

* cleanup
old-commit-hash: 43f43b1c64
2022-04-25 21:07:08 +02:00
Adeeb Shihadeh
8eb8cf95ec Revert "UI: remove RGB buffer usage (#24298)"
This reverts commit 2a13d8446cd19340bfb67f14470b7c35f643e8b8.

old-commit-hash: 13e1c0b339
2022-04-24 11:56:30 -07:00
Joost Wooning
e0c973fe70 UI: remove RGB buffer usage (#24298)
* ui: use yuv buffer

* cleanup

* fix watch3

* replay always send yuv

* fix drawing of path

* fix onroad test

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: b9907e86b2
2022-04-22 12:55:37 -07:00
Willem Melching
f1dce8540a fix --extras on device: move ui.cc into widgets_src (#24286)
old-commit-hash: 303f4ea5c1
2022-04-21 16:23:20 +02:00
Willem Melching
c1091a67cd ui: Fix path artefact when going over hill (#24285)
old-commit-hash: 38300474bb
2022-04-21 16:18:48 +02:00
Shane Smiskol
8d6ab099dc ui: adjust e2e path width
old-commit-hash: 492489e55c
2022-04-19 16:07:46 -07:00
George Hotz
440e82e106 ui: make the path double wide for e2e
old-commit-hash: 273831aa14
2022-04-19 15:53:58 -07:00
Adeeb Shihadeh
5a9644261f remove comma two support (#24248)
* remove comma two support

* cleanup release files

* little more

* more libs

* no more gralloc

* add snpe back
old-commit-hash: 5c48e7bc86
2022-04-18 17:55:23 -07:00
Shane Smiskol
96ef36dcb4 ui: adjust laneless design (#24246)
* tune design

* adjust

* adjust

* fix and compromise!

* fix sl
old-commit-hash: fdeb590ae6
2022-04-18 13:32:09 -07:00
Shane Smiskol
4d820e1096 UI: new laneless design (#24169)
* stash

* Revert "stash"

This reverts commit f0019010e28ffb6d70b3c84666572f30c22077c9.

* new laneless ui

* clean up

* always draw lane lines

* no compensation

* make sure it's long enough

* debug time

* tune design

* tune design 2

* correct scaling with new updated curve hue

* debug time

* full test

* revert test

* move yellow back a bit
old-commit-hash: 998cd7fa20
2022-04-14 20:09:51 -07:00
Adeeb Shihadeh
6371a16f4e UI: double click to switch between body and onroad views (#24214)
* UI: double click to switch between body and onroad views

* fix that

* Update selfdrive/ui/qt/home.cc

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 639255bd10
2022-04-14 17:33:17 -07:00
Adeeb Shihadeh
b747791691 nav: better reroute backoff policy (#24179)
* nav: reduce max reroute backoff

* remove that too
old-commit-hash: fcf657763d
2022-04-10 20:53:07 -07:00
Willem Melching
6cafad7e30 route.cc: include <array>
old-commit-hash: b379fca0ae
2022-04-06 07:34:11 -07:00
Brett Sanderson
58771d8bdd UI: improved disengage on gas toggle description (#24132)
* Update settings.cc

Should be depressed as standard in automotive industry.

Pressed implies state change from down -> up, depressed means the state is down

* Update selfdrive/ui/qt/offroad/settings.cc

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 61d987f630
2022-04-05 15:07:28 -07:00