Commit Graph

143 Commits

Author SHA1 Message Date
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
Adeeb Shihadeh d06d1d76dc fix params permissions for offroad (#2356)
* fix params permissions

* don't need that one
old-commit-hash: 20a6ca83c9194025bb6f2edf2c3992b7b6c9001a
2020-10-17 17:07:40 -07:00
Willem Melching 651d4ce031 --std=c++17 (#2330)
* switch to c++17

* more 17

* 1z

* use std::clamp

* Fix types in clamp

* bump submodules

* bump laika

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 339d1967cb1e8ca73aeb1f0066a23b0933706ae5
2020-10-17 13:33:12 -07:00
Adeeb Shihadeh f92c30b164 fix build warnings (#2355)
* fix build warnings

* cython fixes

* cleanup transformations build

* little more
old-commit-hash: 96b637737bd42b334bffb188d278766bd0abe6c6
2020-10-17 12:40:01 -07:00
ZwX1616 dae628002f Clean up and test camerad refactor (#2310)
* refactor

add function get_camerabuf_by_type

remove cl_free

use camera_id

move front stuff into frontview_thread

bigger refactor

more

typo

rename camerabuf *c to *b

cleanup header files

remove wideview_thread

camera_qcom.c to c++

fix SConscript

camera_process_buf

space

sendrgb same with before

do autoexposure in processing_thread

correct sendrgb

add camera_common.cc

move yuv_transform to CameraBuf

* use C to keep consitent

* rebase master

* rebase master

* continue refactor

* refactor all camera related data&function out of main

 done

* cleanup

* -use buf.rgb_width&height

* remoe ,

* rebase master

* remove unused std::vector

* add func common_camera_process_front

* fix max

* fix sendrgb

* less crap being logged

* fix indents

* add back thumbnails

* thumbnail fixed on tici

* junk junk junk

* unify api

* fix ptr ref

* lol!

* cleanup

* more simplified

* typos

* remove terminate

* use standard polling

* ops_thread refactor, too much code!

* fix build

* ok

* assert

* listen

* incl more

* wq!

* fix more build

* macos

* fix exp targets

* front is different

* const

* bye

* remath

* remove irrelevant

* do ops in a thread

* fix init

* return null

* QCOM2 ops

* qcom2 build

* missing comma

Co-authored-by: deanlee <deanlee3@gmail.com>
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 6b020241c986f614e9a1f08b5b870ff225cf7b19
2020-10-16 21:58:05 -07:00
Willem Melching 789d5176cb Params path only in one place (#2344)
* fix params paths

* Qcom & qcom2

* This env variable is not used anywhere

* params path in only one place

* fix other PARAMS_PATH references

* absolute path is probably better
old-commit-hash: 3dd944898183be0ecf985f389d462e53c3feb8e5
2020-10-15 13:15:22 +02:00
Adeeb Shihadeh 31ea16e7fa fix params on PC and when reading path from env (#2340)
* fix params when reading path from env

* fix pc
old-commit-hash: 707a670f42dc87c322c6d27eb147ba260b149e23
2020-10-14 13:45:24 -07:00
Adeeb Shihadeh 13a5f5737b fix params permissions after refactor
old-commit-hash: 6f307ea4c560070f1eb7e02218f9de17adc3ab86
2020-10-13 19:14:51 -07:00
Willem Melching 498ecbdf3c 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>
old-commit-hash: 2e182e5c574ea1468678b5fd8d0597e34ed5898d
2020-10-13 16:23:23 +02:00
Adeeb Shihadeh 37529e23a9 bump version to 0.7.10
old-commit-hash: 47a42ff432db8a2494e922ca5e767e58020f0446
2020-10-03 14:51:47 -07:00
Dean Lee 63c8162fd3 close lock_fd if flock failed (#2231)
old-commit-hash: 9983389ffebe3383736111b0b4ad762aa9ef580b
2020-09-28 11:47:38 +02:00
Dean Lee f57c4d3052 camerad: close file descriptors (#2065)
* close file descriptors

* fix struct indent

* add some new lines
old-commit-hash: 9f34d1ff662c7b84ce5e4561247d8751ef57adca
2020-09-24 13:39:27 -07:00
Dean Lee f5ec24f42f Params: use a multiple-reader / single-writer flock to improve concurrency (#2207)
* improve concurrency: multiple readers, single writer locks

* remove lock in read_db_value
old-commit-hash: 4fba3408c41fad12a75533cf189686601f9e49a6
2020-09-24 11:51:36 +02:00
Dean Lee ef8b6d20fb add function write_file() (#2181)
* add function write_file()

* handle EAGIN & EWOULDBLOCK

* don't  handle errno
old-commit-hash: 64762070097884de48b7168ec337a96e3f03a07a
2020-09-21 16:10:38 +02:00
Dean Lee 0392ecd4ca touch.c:deleting useless function (#2208)
old-commit-hash: 58e5223aba4a16db42c1937f478ec7d54e28813b
2020-09-21 11:43:54 +02:00
Adeeb Shihadeh 6aebe5fa2a turn display on in spinner (#2148)
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 0ebc037be7a41ad8a42f157ef5c3368ab35062ec
2020-09-09 20:24:13 -07:00
Dean Lee 8de00af7f7 release copy_q in visionbuf_free (#2121)
old-commit-hash: f71467b4504292dff6d49553baeb6f068ba99471
2020-09-02 21:11:25 -07:00
Willem Melching e5f5cdaccf tici: fix set_realtime_priority (#2124)
* cleanup and pin modeld to core 5

* Unused import
old-commit-hash: 5c058140edb5678cfc31e5103e57cdb5d1c11305
2020-09-02 17:52:41 +02:00
Adeeb Shihadeh 91ac4efab2 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
old-commit-hash: 349040d9580bf7c9b98273dd2745fc4b147d3254
2020-08-29 17:16:00 -07:00
robbederks 7671d18467 Tici camerad (#2048)
* fix camera config

* typos

* oops

* more typo

* lambless

* forget to send

* visualize hist

* more typo

* 0xC000

* simple

* data loss prevention, clean up later

* loggerd

* back up code

* backup

* fixed memory leak

* fix vsync

* upload ecam

* WB

* 3stream

* fix OMX crash on loggerd rotation

* rewritten debayer kernel

* update viewer

* improved AE

* no artifact lines/grids

* standard trigger

* cleanups

* CCM

* cleanups

* slight tweak

* upd push sock

* build all these

* update tele fl

* update cereal

* upd viewer

* DualCameraState -> MultiCameraState

* cameras_open

* disable frame zmq push by default

* more cleanup

* no apks

* fix submodule error

* wat

* clean up trash

* remove junk

* only build on qcom2

* no need to check these

* update cereal

* some more minor cleanup

* bump panda

* add todo

* minor typo

* Revert "minor typo"

This reverts commit 9233a1df7cac214fae6827cdae3a10cb3bd060d9.

* not care

* use consistent hdr

* some cleanup

* Update selfdrive/camerad/main.cc

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

* more cleanups

* remove irrelevant stuff

* this too

* cleanup

* rerun ci

Co-authored-by: ZwX1616 <zwx1616@gmail.com>
Co-authored-by: Tici <robbe@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 37d6472bfa1c0ef9f1f8353162b97444ca66e45c
2020-08-26 19:59:56 -07:00
ZwX1616 06439bef18 Fix OMX error on loggerd rotation when using multiple cameras (#1953)
* cherry pick from f8745d3002afe1acd8b740c8421992f1a459b59d

* update cereal

* missed this line

* add enum

* Update selfdrive/loggerd/loggerd.cc

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

* Update selfdrive/loggerd/loggerd.cc

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

* use same logroot

Co-authored-by: Tici <robbe@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 3014280d1a7369c0d1f1f4b5bbc7553e656fe8af
2020-08-26 15:02:51 -07:00
robbederks c09e7f04e7 Tici sensord (#2072)
* tici sensord: WIP

* add sensor constants

* rename files

* base class

* init sensors

* publish something

* dont leak memory

* try reading from accel

* Accel works

* add time and sensor source

* Update release files

* If we want low BW we want 125hz

* this should run gyro as well

* add filter on gyro

* also filter accel data

* Add i2c files

* cast makes macos unhappy

* Same outputs as android sensord

Co-authored-by: Tici <robbe@comma.ai>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 622e42d504458ebfbb23e945beb1a60bbfd0e63b
2020-08-26 11:30:30 +02:00
Dean Lee ed31f8aaa5 Remove unnecessary string copy (#2067)
old-commit-hash: 71eedbce44b9239d05c3309a6f85c3c8abbb3908
2020-08-24 09:25:16 -07:00
Dean Lee 4c0da02183 visionstream: fix doube fd close (#2057)
* s->ipc_fd counld be closed twice

* white space
old-commit-hash: 17dd07e751a7fd3f4fe62811614b41ce9650811a
2020-08-24 14:07:27 +02:00
Dean Lee ebd4f68cba ui: refactor model related functions (#2026)
* remove read_model

* remove structs for c-capnp

* remove duplicate #define from modeld

* add function fill_path_points

* fix Indentation

* use MODEL_PATH_DISTANCE instead of 192

* fix type

use validLen

* rename left_path_points&right_path_points to xxx_lane_points
old-commit-hash: f8ab6bd009410a9f7ab9c30ce7b72a82c6d2507b
2020-08-18 15:26:43 +02:00
Dean Lee bccaaeb3fa fd should be initialized as -1 (#2041)
old-commit-hash: 963c00db09554e71264b699a99c9a705c80c99d8
2020-08-18 15:22:26 +02:00
Adeeb Shihadeh 0fac431c58 bump version to 0.7.9
old-commit-hash: 86dc54b836a973f132ed26db9f5a60b29f9b25b2
2020-08-17 12:49:08 -07:00
Dean Lee bf750511a1 add function cl_get_device_id (#1948)
* add func cl_get_device_id

cleanup

* add fix from review
old-commit-hash: d1588376171d8ba1d2ec1b670e085d6e15bd26c1
2020-08-17 11:24:39 +02:00
Willem Melching 938ce91d02 Pigeon abstraction layer (#1977)
* pigeon abstraction layer

* Fix string literals

* more generic pigeon class

* add TTYpigon

* nicer tty error handling

* close tty fd on pigeon delete

* pigeon receive return std::string

* use sizeof

* max receive size to prevent infinite loop

* remove namespace

* add unistd include for usleep

* fix is pigeon

* Handle tty error in opening

* fix printing binary strings with dump.py

* fix pigeon build on macos

* Handle errors seperately

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 502cc665e0bad89eba0b1c344c2f4f580b153ae1
2020-08-13 10:10:50 +02:00
Dean Lee d4f99896e3 remove selfdrive/common/visionstream.c (#1931)
old-commit-hash: 681ff41261eddc0962c9346e8aa7a019e293d691
2020-08-03 17:04:47 -07:00
Adeeb Shihadeh 0fe01be1b7 bump to 0.7.8
old-commit-hash: 2189fe8741b635d8394d55dee28959425cfd5ad0
2020-07-20 11:47:26 -07:00
Adeeb Shihadeh cdfb090c7a Wunused (#1841)
* enable Wunused, first pass

* unused stuff in snpe model

* these are used on phone

* handle sigint and sigterm in modeld

* fix phone build

* camera qcom

* QCOM build works

* delete unused camerad vars

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: eb1aa3d831fd0d7fffd9aacec1accb0a5bdb0304
2020-07-09 09:25:32 -07:00
George Hotz ada8359180 UI 10x speedup with hardware antialias (#1787)
* enable MSAA, disable nvg antialias

* less opaque and clean up

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: b62da571b4108487cfc4d2dbd1970a504ba0a317
2020-06-29 13:54:23 -07:00
George Hotz afbe8e36c0 0.8 is a lie
old-commit-hash: f1caed7299cdba5e45635d8377da6cc1e5fd7072
2020-06-24 16:02:03 -07:00
Dean Lee a4695dc837 Fix resource leak in visionbuf_free (#1699)
* fix resource leak in visionbuf_free

* add mmap_len to VisionBuf
old-commit-hash: a64f0119e0d86ab77aaf16a9b6ee2dfeb0d002df
2020-06-22 11:29:18 -07:00
George Hotz 5d069eb8c3 Fixups for Mac, and a bunch for PC (#1654)
* fix mac nui

* fix cereal

* builds on mac without warnings

* ui swap shouldn't be instant on pc

* camerad builds on mac

* modeld, and now everything, builds on mac

* ui draws pictures on mac now

* fix camerad shutdown

* support ui looping on pc

* python3 on that

* SCNu64 should be cross platform

* bump cereal and new apk

* clean up

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 344a9a369983f58fe1e71f84478ded5c766e0d1b
2020-06-11 18:21:59 -07:00