Commit Graph

178 Commits

Author SHA1 Message Date
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 38c70c5a13 bump version to 0.8.3
old-commit-hash: 2525a628a155efc93a7ca703ab6e3112d9070a96
2021-02-27 21:14:14 -08:00
Willem Melching a98a06c1f8 loggerd: clean exit on SIGPWR (#20100)
* loggerd: clean exit on SIGPRW

* no SIGPWR on macos
old-commit-hash: d3dfb47d0e8fef18171a393005da76c98e941419
2021-02-18 17:46:46 +01:00
Dean Lee 06ac698691 OMXEncoder: remove pthread_mutex_t lock from member variables (#19948)
* remove mutex

* rebase master
old-commit-hash: 9a9641a296dcc0887d902412214510f0ff912fa2
2021-01-30 19:11:03 -08:00
Dean Lee da9b0e8baa remove cqueue, use class SafeQueue (#19774)
* class SafeQueue

* cleanup includes

* space

* add timeout

use try_poll

* add function empty() & size()

* class SafeQueue

* add timeout

use try_poll

* add function empty() & size()

* rebase master

* rebase master

* for loop

* fix bug
old-commit-hash: e6783f4d9f10a256a4c301eb1d1843d9e2a17ab6
2021-01-28 15:12:45 +01:00
Dean Lee 7a086b3f3d convert framebuffer to class (#19800)
* class FrameBuffer

* fix build error

* remove bootlog
old-commit-hash: 6583206ed41c9277bb7509bcb66b7d5e058ea5fe
2021-01-28 14:47:05 +01:00
Willem Melching 62f9992129 fix valgrind complaints about swaglog
old-commit-hash: 4f995b35d5d84508fda0a3d203dd8d3d35f8d2b2
2021-01-28 14:03:46 +01:00
Dean Lee 694b81e129 C++ swaglog (#19825)
* c++ swaglog

* dd

* continue
old-commit-hash: c283be24d38d688eb9a0009d79d33262ee542822
2021-01-28 13:52:18 +01:00
Dean Lee 9abfacf182 util.h: re-indent function string_format and use const std::string & for read_file (#19931)
old-commit-hash: 316f475544f4c28808933b593616da1080429e6d
2021-01-27 12:10:03 +01:00
Dean Lee 6af18c1c7c util.h: use const reference for std::string parameter (#19885)
old-commit-hash: c688461e11f085427b2ebfd7227f2837ceb4f17c
2021-01-23 13:47:09 -08:00
Adeeb Shihadeh 43d680c9c5 add device type to clouglog ctx (#19890)
* add device type to clouglog ctx

* remove is_eon

* str
old-commit-hash: c9679222aebfcbf0dcce7ac00d2e03d19101a81f
2021-01-22 20:02:48 -08:00
Dean Lee 57b1b4c456 loggerd: split bootlog to a separate program (#19831)
* bootlog

* blank lines

* move file_exists to util.h

* src = ['loggerd.cc']

* log_init_data

* Revert "src = ['loggerd.cc']"

This reverts commit 18a587023d75b3a3a54f1ceaf9cb31a51640a067.

* add bootlog to .gitignore

* use s->has_qlog instead of true

* add blank lines & remove extern C
old-commit-hash: f973c56a3695525442ac6c3e89c644b27cbeb384
2021-01-19 12:16:12 -08:00
Dean Lee 5f6337f949 clutil.h: remove extern C (#19809)
old-commit-hash: 3381cd371c03393df5d01bc5a10b24105711ad89
2021-01-18 15:04:37 +01:00
Dean Lee 0e1c994980 swaglog: use std::mutex & remove extern C (#19817)
old-commit-hash: 53b9d35fdab96888ac76e902304ce86dbedea736
2021-01-18 13:35:11 +01:00
Dean Lee e59584fe7c gpio.h: remove extern "C" (#19799)
old-commit-hash: 210b52e622e5d326dbbf02b3706955cb8b71c4c6
2021-01-17 15:51:05 -08:00
Dean Lee c3043515d8 text.c->text.cc (#19734)
old-commit-hash: c5c9b6f7123e573f6c3171c5d5843fcfc8af5dcd
2021-01-15 13:42:26 -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
Dean Lee 74dc639515 convert glutil.c to gltuil.cc & add class GLShader (#19720)
* c++ glutil

* function getUniformLocation

* rebase master
old-commit-hash: cef469cbed1d835e70e952d06e1fd8b4eabca450
2021-01-12 15:43:34 +01:00
Dean Lee 4b15f8a12d Refactor image texture stuff into class (#19719)
* Refactor image texture stuff into class

* cleanup

* Update selfdrive/common/visionimg.cc

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: b3107e153cca4aa98b623b80fdd13b8446f76d1c
2021-01-11 15:52:58 +01:00
Dean Lee 4069b2c414 Fix build error after merge utilpp.h to util.h (#19714)
* fix std::atomic build error

* remove include util.h
old-commit-hash: 83bdd23a08cbfda17f0020f58e9227db1acd5470
2021-01-10 20:28:11 -08:00
Dean Lee 4c1919f41e merge utilpp.h into util.h (#19710)
old-commit-hash: 595830135bb79c8b23eb8339ae768ca7b6a822f8
2021-01-10 14:57:32 -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 bc5449d328 remove double semicolons (#19682)
old-commit-hash: 8c62b21df113a8c361635e063087b755837cd06c
2021-01-06 20:57:46 -08: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
Adeeb Shihadeh d89bb8b29c setup clang tidy (#19533)
* setup clang tidy

* config

* some cleanup

* little more

* remove that

* fix qcom build
old-commit-hash: 87950eb3127e175f0f2b0bb42440f5350c679369
2021-01-05 12:50:23 -08: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
Dean Lee 5e30b23c58 UI: reducing CPU usage from 13% to 4% when offroad (#19575)
* Accurately control the UI frequency

* helper function sleep_for
old-commit-hash: a4afc03a732ab6438a72bda22911bf4532e9e4cd
2021-01-04 13:59:23 +01:00
Adeeb Shihadeh 1dae511b5b bump version to 0.8.2
old-commit-hash: a4cec444eb3b158176f0650b414090197e7610d4
2020-12-18 12:23:59 -08:00
grekiki 9f0611507e Qt Offroad stats (#19498)
* probably broke a lot, need the commit though

* finally works

* make it work...

* ...

* kind of works

* better styling

* all should work

* tiny cleanup

* temp

* looks nicer

* create JWT in C++

* kilometers -> km

* use correct free methods

* dont put code in assert statement

* Build JWT payload dynamically

* get dongle id once

* include cleanup

* Remove qDebug

* Update drive_stats.cc

Github is a nice editor :)

* swap week and all and fix sconscript

* install openssl

* openssl include dirs on mac

* is this where openssl is?

* It's here

* small cleanup

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 5b26c97141b65e3bcbddaec7e6526d5f2f1c910e
2020-12-18 13:29:20 +01:00
Adeeb Shihadeh 649fe5b34a fix camerad not exiting cleanly (#2768)
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: a96857f1aa068da241ad8b234addd76b23d1e594
2020-12-12 13:55:24 -08:00
Dean Lee 9be81a6f99 clutil refactor (#2733)
* cleaup clutil.h

* clutil.c -> clutil.cc

* std::hash

* try simplify functions

* using namespace group help functions

* continue

* add function get_platform_info

* continue

* remove caching

* struct CLContext

* std::cout & CL_ERR_TO_STR

* remove CLU_NO_CACHE

* Revert "struct CLContext"

This reverts commit 882e413f227e4c1ba4bb83f956cc67739a189221.

* cl_get_error_string : remove undefied error codes

* replace all printf with std::cout

* util::read_file

* cleanup

* revert CL_ERR_TO_STR

* simplify

* add macro CL_ERR_TO_STR

* cl_get_error_string: fix undeclared errors

* log_size should not +1

* use std::stirng log

* apply review
old-commit-hash: 3c08d0f1f7e7c9f376fd69fd46067c6f6ff59d39
2020-12-11 13:05:32 +01:00
HaraldSchafer 89b03fa2ee Test model refactor (#2720)
* template funcion fill_meta

* add function get_plan_max_idx

* add function get_mdn_max_idx

* remove temp builder variables

* get_mdn_max_idx->get_lead_data

* get_pan_max_idx->get_plan_data

* fill_lane_line

* combine fill_lane_line&fill_path into one function

* fill_lead_vw

* using unique_ptr

* prefer using constexpr

* more constexpr,remove duplicate defined TRAJECTORY_SIZE

* remove suffix _arr from variable name

* misc

* remove extern c

* refactor model_publish

* remove unused paramaters

* traffic_convention to c style array

* c style array:prev_desire&pulse_desire

* fix error&make easy for review

* const mat3 &transform

* move cl_command_queue into ModelState

* use maco LEAD_MHP_SELECTION

* move constexpr from .h to .cc

* remove #define MODEL_NAME

* modeldata.h: contexpr

* remove param temporal from model_init

* helper function get_best_data

* fix probs

* int

Co-authored-by: deanlee <deanlee3@gmail.com>
old-commit-hash: 630c7309a560e573a9398acd77c96aedcb65dfae
2020-12-09 22:48:14 -08:00
grekiki 2e07e45bed UI style improvements with improved keyboard (#2710)
* fix spaces and make spacebar dynamically sized

* some spaces and a comment

* more spaces

* const

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 3e466aa528dfaf40063c209189bb3c9ece3bf26b
2020-12-08 12:00:51 +01:00
Adeeb Shihadeh 325e37d22c bump version to 0.8.1
old-commit-hash: c80d9f132c70120ee96bdfe2f340a75c4b178c19
2020-11-30 09:30:57 -08:00
Dean Lee 57138a6e0f Error checking macros for opencl (#2615)
* macro CL_CHECK&CL_CHECK_ERR

* trigger checks
old-commit-hash: 42183d913f197fb6f9cc1d90322a1b891d46878a
2020-11-30 12:04:49 +01:00
ZwX1616 deab0f86aa tici front/wide encodeIdx msgs (#2564)
* different msgs

* also add timestamps

* keep impatient log, remove the other

* meaningless
old-commit-hash: f244b7c7e156cd109be13a68ba1096dc2d25f3d0
2020-11-19 16:12:02 -08:00
robbederks 394a3f4d86 Tici Focal (#2459)
* fix i2c

* fix libi2c (again?)

* qt 5.12.8

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: c5c875bad990475a48dd01ec7dad0ff6a83010d3
2020-11-12 17:09:36 -08:00
Harald Schafer 06f36e22cf a new dawn
old-commit-hash: a991e8af9c60cd8866986789e58824b04983b86c
2020-11-11 20:45:36 -08:00
HaraldSchafer 008f37c749 Torch model (#2452)
* refactor draw model

* rebase master

* correct valid_len

* rename function

* rename variables

* white space

* rebase to master

* e16c13ac-927d-455e-ae0a-81b482a2c787

* start rewriting

* save proress

* compiles!

* oops

* many fixes

* seems to work

* fix desires

* finally cleaned

* wrong std for ll

* dont pulse none

* compiles!

* ready to test

* WIP does not compile

* compiles

* various fixes

* does something!

* full 3d

* not needed

* draw up to 100m

* fix segfault

* wrong sign

* fix flicker

* add road edges

* finish v2 packet

* Added pytorch supercombo

* fix rebase

* no more keras

* Hacky solution to the NCHW/NHWC incompatibility between SNPE and our frame data

* dont break dmonitoringd, final model 229e3ce1-7259-412b-85e6-cc646d70f1d8/430

* fix hack

* Revert "fix hack"

This reverts commit 5550fc01a7881d065a5eddbbb42dac55ef7ec36c.

* Removed axis permutation hack

* Folded padding layers into conv layers

* Removed the last pad layer from the dlc

* Revert "Removed the last pad layer from the dlc"

This reverts commit b85f24b9e1d04abf64e85901a7ff49e00d82020a.

* Revert "Folded padding layers into conv layers"

This reverts commit b8d1773e4e76dea481acebbfad6a6235fbb58463.

* vision model: 5034ac8b-5703-4a49-948b-11c064d10880/780  temporal model: 229e3ce1-7259-412b-85e6-cc646d70f1d8/430  with permute + pool opt

* fix ui drawing with clips

* ./compile_torch.py 5034ac8b-5703-4a49-948b-11c064d10880/780 dfcd2375-81d8-49df-95bf-1d2d6ad86010/450 with variable history length

* std::clamp

* not sure how this compiled before

* 2895ace6-a296-47ac-86e6-17ea800a74e5/550

* db090195-8810-42de-ab38-bb835d775d87/601

* 5m is very little

* onnx runner

* add onnxruntime to pipfile

* run in real time without using the whole CPU

* bump cereal;

* add stds

* set road edge opacity based on stddev

* don't access the model packet in paint

* convert mat.h to a c++ header file (#2499)

* update tests

* safety first

Co-authored-by: deanlee <deanlee3@gmail.com>
Co-authored-by: mitchell <mitchell@comma.ai>
Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: George Hotz <george@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 08846b5c0ec3a5299c8cb73904da15a18d3aaccf
2020-11-11 20:31:46 -08:00
Willem Melching fc0b6f099f Revert "convert mat.h to a c++ header file (#2499)"
This reverts commit 607866bb60ba1c69c6f777082c5ea787e895a251.

old-commit-hash: f2c8a6122d881fbee5bbdd1cf16f8541ce33260b
2020-11-09 01:41:36 -08:00
Dean Lee 6f500ee98a fsync_dir: remove goto (#2498)
old-commit-hash: 1bd1c961efccfa99936dd7e096356af3fa5243ed
2020-11-09 01:21:48 -08:00
Dean Lee 13a25b9e27 convert mat.h to a c++ header file (#2499)
old-commit-hash: 519c043a63c9286f55b5a4325604489da087957a
2020-11-09 01:19:09 -08:00
Adeeb Shihadeh 3a05f06ced Qt spinner (#2494)
* move android spinner

* qt spinner

* rotation

* nothing by default

* spin spin

* fix rotate

* style

* spinner for all

* -2

* unused
old-commit-hash: 6c86afee16c706a3c8e787d576ead509373e6b55
2020-11-06 18:44:04 -08:00
Adeeb Shihadeh 0f2dfbfc52 trim trailing whitespace
old-commit-hash: 818bd8a591193b891cee44726203de327c5dd7fb
2020-11-05 14:11:41 -08:00
Adeeb Shihadeh c84a953a8b bump version to 0.7.11
old-commit-hash: f46ed718ba8d6bb4d42cd7b0f0150c406017c373
2020-10-23 20:09:08 -07:00
Adeeb Shihadeh cbafcbcc3c remove unused params function
old-commit-hash: 94991d9319bb96dd5b481a68afb3dffc1f1bc4f5
2020-10-22 17:05:52 -07:00
Willem Melching 9ecc0d362e store params in ~/.comma on PC (#2369)
old-commit-hash: c0d92516ccf4dcb8a09c972815a6e08326b59105
2020-10-20 13:18:21 +02:00
Dean Lee 1089f8fa8f fix build warning (#2365)
* fix build warning

* Update selfdrive/common/util.c

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

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 0bbd080a04bf6373a430811c48345703a9bbc256
2020-10-19 22:44:24 -07:00
Willem Melching 8cc1d9f855 fix typo in params path on PC
old-commit-hash: d28f488ea56c78c4f70fd3c8c16114ffa48ba38a
2020-10-19 14:25:45 +02:00
Comma Device b43b1ac567 need that one too
old-commit-hash: e4d2174a4efaf324f2e32c11a569bc7f069a4a30
2020-10-17 17:44:10 -07:00