Commit Graph

202 Commits

Author SHA1 Message Date
Adeeb Shihadeh 532d19427c bump cereal
old-commit-hash: 8a280fbb8eb433fbfe0fc43254c9cbdaceedbab6
2021-05-03 20:47:11 -07:00
iejMac 4abd8988e4 cereal: SubMaster refactor, update is now void (#20730)
* cereal: SubMaster refactor, update is now void

* bump cereal

* mistake

* update void

* checks

* semicolon

* Update selfdrive/camerad/cameras/camera_frame_stream.cc

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

* check sensorEvent

* update cereal

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 4866a39244c59f540895ad64103e13f7c41a3cc8
2021-04-22 22:13:32 -07:00
Dean Lee 7534abdd50 util.cc: reduce two read_file functions into one (#20655)
* no need to malloc one extra byte

* combine two read_file into a faster one

* cleanup #include

* use resize

* apply suggestions from review

* space

* rebase master
old-commit-hash: fe2f63849ae467fee70c72d18fa52a184c056331
2021-04-13 11:43:43 -07:00
Adeeb Shihadeh 31d818b39a tici: offline big cluster while offroad (#20668)
* tici: offline big cluster while offroad

* shuffling

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 9edda6fbc1e4030e2e86ec7041d81c39cd27c8a0
2021-04-12 23:06:24 -07:00
Adeeb Shihadeh 7955ba0a5f enable --as-needed linking (#20619)
* only link as needed

* a few more

* need to fix order

* everywhre

* fix mac

* update spinner + text

* fix c2 build

* another fix

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 36d8c89ebf5fee583b89e48a5d2d5e1d178b5ee5
2021-04-08 11:17:07 -07:00
Willem Melching 00b19b6351 ecam toggle (#20597)
* use ecam in ui

* needs reboot

* use in modeld

* typo

* effective FL is longer in center

* normalize zoom by focal dist

* read param before init

* make 2x as wide

* review comments

* more explicit

* fix camera offset

Co-authored-by: ZwX1616 <zwx1616@gmail.com>
old-commit-hash: 1fc7bcca43e9ef75d95ae8689e3b1cd8c4f8041e
2021-04-07 19:12:35 +02:00
HaraldSchafer 1d36adf351 no heading cost (#20594)
* no heading cost

* live mpc weight config

* need to add stds

* make work on empty data

* no divide by 0

* update refs

* update model replay

* update proc replat

* new model replay ref
old-commit-hash: d72d433ec7a3c9f0bb2f90d196b3826d48d9b1a0
2021-04-06 23:49:29 -07:00
Dean Lee f0565ee578 dmoniitoring: new function crop_yuv (#20344)
* crop_yuv

* shorten variables name

* space
old-commit-hash: fb37af00d422d495bf0460f5a4642404aaa67fdc
2021-03-30 20:11:46 -07:00
Dean Lee 405df8b165 Params: python-like interface (#20506)
* rebase master

* delete outdated test_params.c

* putBool & more robust getBool

* putBool(SshEnabled)
old-commit-hash: 98e55996f67aaaf715c941d417ae4d3b0187f388
2021-03-30 12:54:59 +02:00
Dean Lee aa1474467e Added new util class FirstOrderFilter (#20303)
* new class FirstOrderFilter

* flick face icon

* revert ui_draw_vision_face

* new function reset()

* reset after update

* use filter to update brightness
old-commit-hash: 6db31b9a33e6caab06645be898957e2414a6dedc
2021-03-30 12:09:06 +02:00
Adeeb Shihadeh 3d04c4060b reduce log spam (#20330)
* fix big spammers

* my favorite test failure

* remove that one

* went down a bit more
old-commit-hash: 90795fc773fb46df4e8e97c19c0d64a449261604
2021-03-12 11:45:29 -08:00
Dean Lee aefb482339 thneed: remove redundant function nanos_since_boot (#20329)
old-commit-hash: d023397ba94cd1b2a47acf0e8b900cd8d53eb360
2021-03-12 10:31:55 -08:00
Dean Lee 355a3452ff transform_queue: const mat3& projection (#20316)
old-commit-hash: b32386cc354f50eabed87ce206e0f3d6d9f50b93
2021-03-11 11:42:16 -08:00
Dean Lee e2f9e013a7 driving.h: fix indentation (#20315)
old-commit-hash: d5c17723dae207e446ddf9288ceee14674f4d8d9
2021-03-11 17:00:14 +01:00
Dean Lee 362c98e6ba softmax(): use std::max_element (#20306)
old-commit-hash: bca53f337f5425a017216df3d0804bc5a2be98a7
2021-03-11 15:05:13 +01:00
iejMac efdd0e213a optimizing simulator performance (#20295)
* 20 hz

* weird blank screen on Low quality

* Epic quality
old-commit-hash: ea5fec76368617ec79344b1606a26c70af7e63a5
2021-03-09 23:48:46 -08:00
Dean Lee ee6d78c90b Run models in function run_model (#20272)
* reconnect vipc_client after disconnection

* run models in run_model()

* cleanup

* use std::Mutex

* use std::thread

* const

* comments

* cleanup include

* rename live_thread to calibration_thread

* add comment
old-commit-hash: a7672e285158e7b51d6d9a878e812e6158b0a270
2021-03-09 10:32:13 +01:00
Dean Lee bca42582d9 modeldata.h: new function get_model_yuv_transform (#20257)
old-commit-hash: 80cc0eefc9f132590e3baad595fdd3c01e85c406
2021-03-08 10:10:13 +01:00
iejMac afc0597686 Fix simulator docker: CPU only for now (#20227)
* initial commit

* CPU working in dokcer

* Update selfdrive/manager.py

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

* Update selfdrive/manager.py

* fixes

* fixing env var

* fixes

* building and running in docker

* camerad fix

* camerad fix

* this ACTUALLY works

* removing unused libraries

* updating to CARLA 0.9.11

* removing useless flags

* small changes

* forgot this

* sudo not needed for xhost

* final changes

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 968ed10200913d81833e87a738cd780089eb0eaa
2021-03-07 23:02:57 -08:00
Willem Melching c0098cec09 Manager cleanup (#20231)
* move manager in folder

* inital refactor

* call start

* small cleanup

* add comments

* use self.signal()

* order shouldnt matter

* newlines

* add helpers

* newlines

* add process config

* split out build part of manager

* this should fix most tests

* no sensord on pc

* dont start athena

* remove comment

* fix old athena test

* fix inject model

* fix test car models

* should be not none

* fix helpers exitcode

* ignore manage_athenad

* Use time.monotonic()

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

* combine init, remove spinner

* move manager test

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 5a3b51130649356b14b24e3c82e014b3a0be95a8
2021-03-05 11:03:23 +01:00
Willem Melching b5e8c1acdb modeld.cc fix matrix storage order
old-commit-hash: c3931074bfa43b1d7e896b36314f347ae928d38c
2021-03-03 14:48:22 +01:00
Willem Melching fc10bc8091 modeld.cc construct matrix directly from data
old-commit-hash: a27245e6c193624800bee06f9f9cab3b5c95953c
2021-03-03 13:09:14 +01:00
Dean Lee 5e19cdb0d3 move intrinsic_matrix into modeldata.h, removed duplicate definitions. (#20051)
* move intrinsic_matrix into modeldata.h

* def __cplusplus
old-commit-hash: ae72d34a42f23e9b295641e1b0f50515434d6d1f
2021-03-03 11:47:48 +01:00
Adeeb Shihadeh 05eb44115e cereal cleanup part 2 (#20092)
* car stuff

* thermal

* Revert "car stuff"

This reverts commit 77fd1c65ebd01abfa8493ae12c9e6b14f7ada976.

* panda state

* camera stuff

* start deg

* most is building

* builds

* planner + controls run

* fix up paramsd

* cleanup

* process replay passes

* fix webcam build

* camerad

* no more frame

* thermald

* ui

* paramsd

* camera replay

* fix long tests

* fix camerad tests

* maxSteeringAngle

* bump cereal

* more frame

* cereal master
old-commit-hash: 312b681a46b8153314a8420611b6479dd6f70dfc
2021-02-16 21:39:32 -08:00
Adeeb Shihadeh 01d65286f0 make thneed compile more robust
old-commit-hash: 5930749a127cfab11d2e541ad279527645352813
2021-02-05 00:54:57 -08:00
Willem Melching dadeec50dd thneed: lookup dlsym offset at compile time (#20019)
old-commit-hash: 1744076514a9aa5bf9d7e7940ddbd9c431c551bf
2021-02-04 16:41:46 +01:00
Adeeb Shihadeh 966945880b Cereal cleanup (#20003)
* start cleanup

* fan speed

* cleanup dm

* fix cereal

* hwType -> pandaType

* update refs

* update refs

* bump cereal

* freeSpacePercent

* cereal master
old-commit-hash: 000bd226aa9902da01e6010bf26762fca2c20df0
2021-02-03 19:57:30 -08:00
Dean Lee 04adbaf8e1 Don't call function in assert (#19997)
old-commit-hash: 91504176e403ca1bb6bd9491ce9e2075b7f4bae0
2021-02-02 13:18:11 +01:00
Comma Device a63dca4659 fix thneed build
old-commit-hash: dcd4bb4f4eac60439e354686b85a67d99c2b0458
2021-02-01 20:34:21 -08:00
Dean Lee 3f7488b73a model_publish: use kj::ArrayPtr<const float> raw_pred (#19917)
old-commit-hash: 0b7b7241c8fd314775fa2a5b3c7c1846ab3f2776
2021-02-01 19:08:17 -08:00
Dean Lee 04d7c01eda 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
old-commit-hash: 2d0c249f4048fba02ad12f25a45f26df4742b444
2021-01-30 18:49:44 -08:00
ZwX1616 e961d9b64c 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>
old-commit-hash: 8605ba8ab95bfe1edea69c648ccef4ea0c9f911e
2021-01-28 14:02:58 -08:00
Dean Lee 1a29755702 dmonitoring_publish: use kj::ArrayPtr<const float> raw_pred as paramater instead of float (#19916)
old-commit-hash: 8bb3c41cfd8c71d9dd2368da0a980d8f635e2a75
2021-01-27 14:30:12 -08:00
Dean Lee 2a95f73b84 Thneed::clinit() : use cl_get_device_id helper(#19934)
old-commit-hash: 21f45e3ef49fece453feeefa1c65286c36bfc14b
2021-01-27 12:09:28 +01:00
Dean Lee 8c963586f8 model_init: remove memset (#19921)
old-commit-hash: ccf055fd6267bd6bfa0189d2f61d39574548fa80
2021-01-26 16:56:37 +01:00
Dean Lee 898c93dcbf dmonitoring_init: use &s->output[0] instead of &s->output (#19918)
old-commit-hash: 4bfed95071efbde6c8bb29b7b7252665ab73de05
2021-01-26 16:07:57 +01:00
Dean Lee 52e1efffd5 modeld: remove template from fill_meta (#19862)
old-commit-hash: 1e617a3931608d38d37180c19eeb5f6f39b50efd
2021-01-20 20:50:24 -08:00
George Hotz 3484683199 Thneed load/save (#19700)
* start thneed load/save

* compiling

* fix loading

* build thneed model in scons

* don't hardcode /data/openpilot

* release files

* those too

* support for loading/saving binary kernels

* save binaries out of json band

* make binary a command line flag to the compiler

* need include assert

* fix shadowed common in SConscript

* cleanup run.h

* hmm, the recurrent buffer wasn't 0ed

* ugh, unique ptr

* remove power constraint, refactor record

* Revert "remove power constraint, refactor record"

This reverts commit bb6fa52db6df59cd9d6420a6f630430e35af8a5e.

* print on thneed stop

* fingers crossed for this one

* recorded

* just curious

* okay okay, pass tests?

* cleanups

* refactor wait

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 59fac9fdc630fa78f520fc9a244f9f9cd39fa562
2021-01-19 18:08:31 -08:00
HaraldSchafer 5c2c6691b2 remove old model packet (#19769)
* remove publisher

* move to V2

* radard new model

* fix plant

* change packety

* need hack here too

* change to new

* this has been wrong all along

* no more model msg

* subscribe to new model

* not needed anymore

* make work

* need to ignore that too

* should pass tests, needs car test

* fix process replay

* no more poly

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 124100d0fa42485edaf86cb25f77f27e8917eed1
2021-01-19 17:15:16 -08:00
ZwX1616 744d263288 compensate for tilt
old-commit-hash: 78cd373c4bae8190154639f6c5a42171c0f76b19
2021-01-14 21:23:52 -08:00
HaraldSchafer c6d9b9565a Mpc rework2 (#19660)
* start again

* need that too

* this actually works

* not needed

* do properly

* still works

* still works

* still good

* all G without ll

* still works

* all still good

* cleanup building

* cleanup sconscript

* new lane planner

* how on earth is this silent too....

* update

* add rotation radius

* update

* pathplanner first pass

* misc fixes

* fix

* need deep_interp

* local again

* fix

* fix test

* very old

* new replay

* interp properly

* correct length

* another horrible silent bug

* like master

* fix that

* do doubles

* different delay compensation

* make robust to empty msg

* make pass with hack for now

* add some extra

* update ref for increased leg

* test cpu usage on this pr

* tiny bit faster

* purge numpy

* update ref

* not needed

* ready for merge

* try again after recompile

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 158210cde8e689daa04bcaa1e502727cf7bfddb6
2021-01-14 18:43:50 -08:00
Comma Device 25dbb18f73 fix rounding error
old-commit-hash: 451d4590cf99d2231e2705005ff05b884887b96c
2021-01-14 21:59:26 +00:00
ZwX1616 fa97a4c7be fix tici dm
old-commit-hash: 9eb7688dfe6c8eea85c0053c235434bd575b8945
2021-01-12 21:17:54 -08:00
Dean Lee 99a831dd5c replace std::this_thread::sleep_for with util::sleep_fo (#19717)
old-commit-hash: 72bb55247cb82d9a1517b516dab535b9502864c4
2021-01-11 11:59:48 +01:00
Dean Lee 4c1919f41e merge utilpp.h into util.h (#19710)
old-commit-hash: 595830135bb79c8b23eb8339ae768ca7b6a822f8
2021-01-10 14:57:32 -08:00
Dean Lee 5561bb058d dmonitoringd: add helper function get_yuv_buf (#19590)
old-commit-hash: d39d737ae0e79d9706d829969bff7d56fb2e1b2b
2021-01-08 15:30:06 -08:00
Willem Melching 3f950832b9 VisionIPC 2.0 (#19641)
* Squashed vipc

* Update release files

* Remove else

* add visionipc to release files

* use poller in vipc receive

* opencl framework instead of lib on macos

* Fix camera webcam

* Fix opencl on mac in ui

* more webcam fixes

* typo in ui sconsfile

* Use cur_yuv_buf

* visionbuf c++ class

* Camera qcom was still using visionbuf_allocate

* Turn loggerd back on

* fix snapshot

* No build needed

* update test camerad

* no more release callback

* make encoder c++

* Revert "no more release callback"

This reverts commit e5707b07002fee665d0483d90713154efc2d70d4.

* fix exit handlers

* No need to check errno

* move release callback call

* s/VIPCBufExtra/VisionIpcBufExtra/g

* use non blocking connect

* ui use non blocking connect

* Lower condition variable wait time

* Snapshot cleanup

* bump cereal

* bump cereal
old-commit-hash: fb496c692a9ebdcda15069a8d4eb95734b587d68
2021-01-08 14:54:25 +01:00
Dean Lee 5e557ed96d common exit handler (#19661)
* common signal handle

* fix typo

* rename to ExitHandler

* remove include signal.h

* remove include csignal

* rename variable exit to v

* rebase master
old-commit-hash: 86fe2d1697531bebdf5d0d83609e91ed4006f54b
2021-01-05 20:19:53 -08:00
Dean Lee b1b5baf5e9 shorten variable name (#19659)
old-commit-hash: 170ece1ddd28a76ee672becf852defe27287f484
2021-01-05 12:57:31 +01:00
Dean Lee bbfb751d69 Replace usleep with util::sleep_for (#19643)
* replace usleep with sleep_for

* sleep microseconds

* sleep nanoseconds

* Trigger Build
old-commit-hash: c1cf0882bd4e0fce5e1a581536f6a0e7afb640e6
2021-01-04 18:03:11 +01:00