Commit Graph

44 Commits (7222d0f20dc8edfe0d2f3417d1ce7c84fbd32805)

Author SHA1 Message Date
Dean Lee 7222d0f20d
Cleanup selfdrive/ includes (#20822)
* cleanup include path

* continue

* format includes

* fix testraw.cc

* remove include path from SConstruct

* regroup

* rebase master

* almost done

* apply review

* rename FileReader.xx to filereader.xx

* rename Unlogger.x->unlogger.x

* rename FrameReader.xx -> framereader.xx

* apply reviews

* ui.h

* continue

* fix framebuffer.cc build error:mv util.h up

* full path to msm_media_info

* fix qcom2 camerad

Co-authored-by: Comma Device <device@comma.ai>
2021-05-08 22:15:17 -07:00
Willem Melching ab319d4f54
Replace ifdef with hw abstraction layer (#20843)
* Replace ifdefs with hardware abstraction layer (#20801)

* add type to class hadwareXXX

* replace ifdefs with hardware layer

* continue

* continue

* new function get_driver_view_transform

* full path to hw.h

* fix build error setup.cc

* apply review

* fix typo

* fix deprecated error:replace deprecated fromPath with new

* fix build error

* Fixes after ifdef clenaup (#20842)

* inheritance doesnt work with static

* fix debayer

* small cleanup

* Update selfdrive/camerad/cameras/camera_common.cc

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

* Update selfdrive/common/modeldata.h

* flip conditions

* fix comment

Co-authored-by: Dean Lee <deanlee3@gmail.com>
2021-05-06 14:39:05 +02:00
Willem Melching 3a95d3ccaa Revert "Replace ifdefs with hardware abstraction layer (#20801)"
This reverts commit 757d2923d2.
2021-05-06 12:29:30 +02:00
Willem Melching d34647bbf7 Revert "Fixes after ifdef clenaup (#20842)"
This reverts commit fd7c2b4adf.
2021-05-06 12:29:19 +02:00
Willem Melching fd7c2b4adf
Fixes after ifdef clenaup (#20842) 2021-05-06 11:58:35 +02:00
Dean Lee 757d2923d2
Replace ifdefs with hardware abstraction layer (#20801)
* add type to class hadwareXXX

* replace ifdefs with hardware layer

* continue

* continue

* new function get_driver_view_transform

* full path to hw.h

* fix build error setup.cc

* apply review

* fix typo

* fix deprecated error:replace deprecated fromPath with new

* fix build error
2021-05-06 11:41:46 +02:00
Dean Lee fb37af00d4
dmoniitoring: new function crop_yuv (#20344)
* crop_yuv

* shorten variables name

* space
2021-03-30 20:11:46 -07:00
Dean Lee 98e55996f6
Params: python-like interface (#20506)
* rebase master

* delete outdated test_params.c

* putBool & more robust getBool

* putBool(SshEnabled)
2021-03-30 12:54:59 +02:00
Adeeb Shihadeh 000bd226aa
Cereal cleanup (#20003)
* start cleanup

* fan speed

* cleanup dm

* fix cereal

* hwType -> pandaType

* update refs

* update refs

* bump cereal

* freeSpacePercent

* cereal master
2021-02-03 19:57:30 -08:00
Dean Lee 2d0c249f40
dmonitoring: use the same way as driving to build model output more clearly (#19933)
* Use the same way as driving to build model output more clearly

* rebase master
2021-01-30 18:49:44 -08:00
ZwX1616 8605ba8ab9
pyTorch DM (#19760)
* new model files

* no more rot

* no rot no diag switch

* should be correct and cache aware

* 405d7aeb

* parse new outputs

* change uncertain policy accordingly

* 1bdbd9ed

* adjust

* 0.5 is fine

* 3d4f9cab

* no face prob no loss

* clean up

* clean up test

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-01-28 14:02:58 -08:00
Dean Lee 8bb3c41cfd
dmonitoring_publish: use kj::ArrayPtr<const float> raw_pred as paramater instead of float (#19916) 2021-01-27 14:30:12 -08:00
Dean Lee 4bfed95071
dmonitoring_init: use &s->output[0] instead of &s->output (#19918) 2021-01-26 16:07:57 +01:00
ZwX1616 78cd373c4b
compensate for tilt 2021-01-14 21:23:52 -08:00
Comma Device 451d4590cf fix rounding error 2021-01-14 21:59:26 +00:00
ZwX1616 9eb7688dfe
fix tici dm 2021-01-12 21:17:54 -08:00
Dean Lee d39d737ae0
dmonitoringd: add helper function get_yuv_buf (#19590) 2021-01-08 15:30:06 -08:00
Adeeb Shihadeh b3fd759fe8
log DSP execution time (#2723)
* log dsp execution time

* don't need that
2020-12-08 17:28:47 -08:00
HoverB_SN_11 18c9e42520 too wide 2020-12-08 19:31:38 +00:00
ZwX1616 f30d15ea24
raw pred api (#2611)
* send both

* update cereal

* ptr type

* this is fine

* clean up

* v1 and v2

* header

* update cereal

* cereal
2020-12-02 18:46:12 -08:00
Dean Lee bd4f6650fa
simplify building capnp messages with arrays (#2617) 2020-11-30 12:08:52 +01:00
George Hotz bdb1b766d0
Make the DSP work everywhere (#2621)
* Use DSP again

* 20 Hz

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2020-11-30 11:21:06 +01:00
George Hotz 327aa123f4
Prerotate dmonitoringmodeld input (#2606)
* not tested, but something like this

* more like this

* dl and ur may still be flipped

* they were flipped

* Revert "they were flipped"

This reverts commit fbd477bb4407c9e051fad7d6a3f0825ca3d23c11.

Co-authored-by: Comma Device <device@comma.ai>
2020-11-23 17:42:01 -08:00
Adeeb Shihadeh 580589b250
log DM model execution time (#2589) 2020-11-20 13:38:31 -08:00
Comma Device 826c21b045 fix some lack of cache awareness in yuvframe2tensor 2020-11-20 18:03:06 +00:00
Willem Melching 2e182e5c57
Params refactor, simplified (#2300)
* always c++

* Create C++ params class

* get works

* tests hang now

* passes tests

* cleanup string formatting

* handle interrupt in blocking read

* fix memory leak

* remove unused constructor

* Use delete_db_value directly

* Rename put -> write_db_value

* filename cleanup

* no semicolons in cython

* Update common/SConscript

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

* add std::string version of delete_db_value

* This is handled

* cleanup encoding

* Add clear method to clear all

* add persistent params

* fix android build

* Should be called clear_all

* only import params when needed

* set params path on manager import

* recusrively create directories

* Fix function order

* cleanup mkdirp

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Comma Device <device@comma.ai>
2020-10-13 16:23:23 +02:00
ZwX1616 13588e4255
improve tici camerad robustness (#2135)
* equalize performance on three threads

* need to request first

* clean up indexing

* obsolete

* handling skips and drops

* clean up repeated chunks

* use main frame id

* oneshot

* real skip check

* move to test

* should be cropped H here

Co-authored-by: Comma Device <device@comma.ai>
2020-09-14 16:05:57 -07:00
Adeeb Shihadeh 4d5733924a
message builder (#2161)
* use custom MessageBuilder from cereal

* use MesageBuilder.toBytes

* bump cereal

* unused

* another one

* fix ui msg

Co-authored-by: deanlee <deanlee3@gmail.com>
2020-09-12 21:48:15 -07:00
Adeeb Shihadeh fdbfe52927
tici driver monitoring (#2158)
* use cpu for now on tici

* pin to core 5

* fix driver view

* probably wrong

* correct this time

* RHD too

Co-authored-by: Comma Device <device@comma.ai>
2020-09-12 17:50:22 -07:00
ZwX1616 e9f49254da
swap ur/dl (#2153) 2020-09-11 11:29:19 -07:00
Adeeb Shihadeh 349040d958
driver monitoring cleanup (#2101)
* read rhd from param

* don't need that anymore

* fix build

* bump cereal

* read param from camerad too

* add read_db_bool helper

* bump model replay ref commit, IsRHD wasn't set
2020-08-29 17:16:00 -07:00
ZwX1616 2cfa0edb4c
EfficientNet driver monitoring (#1907)
* e96f9be6

* bump cereal

* filter sunglasses

* fix unittest

* update refs

* udpate refs

* update refs

* add tolerance for dmonitoringd

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-07-27 20:22:06 -07:00
ZwX1616 c2be31c10b Revert "EfficientNet driver monitoring (#1866)"
This reverts commit 2d0e994674.

Need to fix test
2020-07-17 18:20:04 -07:00
ZwX1616 2d0e994674
EfficientNet driver monitoring (#1866)
* e96f9be6

* bump cereal

* filter sunglasses

* fix unittest

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-07-17 15:34:02 -07:00
Dean Lee c7ff6dd194
pass DMonitoringResult as referer (#1639) 2020-06-05 12:42:01 -07:00
Dean Lee cdb48cc180
dmonitoring : use memory cache to avoid malloc/free on every frame (#1599)
* use memory cache

* use template function to return buffer

* inline function

* const size_t

* use std::vector instead of kj::array
2020-06-01 14:00:43 -07:00
Willem Melching ab5af232b2
Use C++ version of SubMaster and PubMaster (#1548)
* add PubMaster & SubMaster

remove 'delete msg'

remove headers

* use constructor to initial all submster

* modify drain sockets

* fix typo in ssconscript.remove lines

no checkValid in loggerd

last modify

handle_message:event->&event

fix type

remove heads

event to auto

* new interface

* api changed

* Revert "use constructor to initial all submster"

This reverts commit 73be7ea46250a325ce41d3a0445e34395a2ae692.

* change to new api

* revert loggerd

* dd

* use new PubSub api

* update to new interface

don't modify loggerd

reset panda

reset opendbc

remove empty lines

* switch to new pubMaster

* update to the new inteface

change

remove error code

. to ->

merge paramsd.cc

update panda

fix typo

simplify

fix typo

* Fix build

* always conflate

Co-authored-by: deanlee <deanlee3@gmail.com>
2020-05-21 16:04:33 -07:00
Willem Melching 72db8d890d
Library cleanup (#1491)
* library cleanup

* remove fastcv

* Fix build step

* bump cereal

* bump cereal

* Install capnp

* bump

* no docker cache

* Update installation instructions

* Needs sudo

* Can we sudo?

* Cache was not the problem

* remove static libraries from boardd install script

* Update setup script

* Remove import

* No capnp install in lgtm

* Fix dockerfile
2020-05-12 18:50:07 -07:00
ZwX1616 6c5080fa98
fix RHD memory leak 2020-04-16 17:31:59 -07:00
ZwX1616 133b1a20b4
RHD support for driver monitoring (#1299) 2020-04-15 16:48:44 -07:00
George Hotz 8db0993663
tici: add (somewhat) broken camerad support (#1300)
* capnparm

* building in progress

* scons build works

* that script fixes opencl

* start new camera code

* includes and more camera scripts

* control c works now

* no device control yet

* phy too

* just one camera for now

* fix capnparm

* hmm, the inits are needed

* more cameras

* link stop start

* doesn't work yet

* fix ion on qcom2

* start poll ish

* 4 pictures and done

* no jpeg

* it works to picture

* destroy sync obj

* both work for now

* defined QCOM2

* fix fd leak

* run modeld

* 10 bit mode

* real frame stride

* needs digital gain

* dnew

* no color correcting on new

* that snpe doesn't work

* qcom2 gate

* cleanups

* oops, fix aarch64 detector

* update cereal

* modeld works with SNPE

* fix driver monitoring model

Co-authored-by: Tici <robbe@comma.ai>
2020-03-31 16:34:55 -07:00
ZwX1616 a95e61edf4
add webcam to cameras (#1201) 2020-03-26 19:19:47 -07:00
George Hotz c50c718293
Cleanup simulator and add usage instructions (#1050)
* cleanup simulator files

* minor updates

* update readme

* keras runner builds

* hmm, still doesn't work

* keras runner works

* should work with python3 keras mod

* touchups
2020-02-04 19:46:57 -08:00
ZwX1616 6322a275d6
dmonitoringd (#1016) 2020-01-30 19:12:44 -08:00