Commit Graph

93 Commits (87950eb3127e175f0f2b0bb42440f5350c679369)

Author SHA1 Message Date
Adeeb Shihadeh 87950eb312
setup clang tidy (#19533)
* setup clang tidy

* config

* some cleanup

* little more

* remove that

* fix qcom build
2021-01-05 12:50:23 -08:00
Dean Lee c1cf0882bd
Replace usleep with util::sleep_for (#19643)
* replace usleep with sleep_for

* sleep microseconds

* sleep nanoseconds

* Trigger Build
2021-01-04 18:03:11 +01:00
Dean Lee a4afc03a73
UI: reducing CPU usage from 13% to 4% when offroad (#19575)
* Accurately control the UI frequency

* helper function sleep_for
2021-01-04 13:59:23 +01:00
Adeeb Shihadeh a4cec444eb bump version to 0.8.2 2020-12-18 12:23:59 -08:00
grekiki 5b26c97141
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>
2020-12-18 13:29:20 +01:00
Adeeb Shihadeh a96857f1aa
fix camerad not exiting cleanly (#2768)
Co-authored-by: Comma Device <device@comma.ai>
2020-12-12 13:55:24 -08:00
Dean Lee 3c08d0f1f7
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 882e413f22.

* 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
2020-12-11 13:05:32 +01:00
HaraldSchafer 630c7309a5
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>
2020-12-09 22:48:14 -08:00
grekiki 3e466aa528
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>
2020-12-08 12:00:51 +01:00
Adeeb Shihadeh c80d9f132c bump version to 0.8.1 2020-11-30 09:30:57 -08:00
Dean Lee 42183d913f
Error checking macros for opencl (#2615)
* macro CL_CHECK&CL_CHECK_ERR

* trigger checks
2020-11-30 12:04:49 +01:00
ZwX1616 f244b7c7e1
tici front/wide encodeIdx msgs (#2564)
* different msgs

* also add timestamps

* keep impatient log, remove the other

* meaningless
2020-11-19 16:12:02 -08:00
robbederks c5c875bad9
Tici Focal (#2459)
* fix i2c

* fix libi2c (again?)

* qt 5.12.8

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2020-11-12 17:09:36 -08:00
Harald Schafer a991e8af9c a new dawn 2020-11-11 20:45:36 -08:00
HaraldSchafer 08846b5c0e
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>
2020-11-11 20:31:46 -08:00
Willem Melching f2c8a6122d Revert "convert mat.h to a c++ header file (#2499)"
This reverts commit 519c043a63.
2020-11-09 01:41:36 -08:00
Dean Lee 1bd1c961ef
fsync_dir: remove goto (#2498) 2020-11-09 01:21:48 -08:00
Dean Lee 519c043a63
convert mat.h to a c++ header file (#2499) 2020-11-09 01:19:09 -08:00
Adeeb Shihadeh 6c86afee16
Qt spinner (#2494)
* move android spinner

* qt spinner

* rotation

* nothing by default

* spin spin

* fix rotate

* style

* spinner for all

* -2

* unused
2020-11-06 18:44:04 -08:00
Adeeb Shihadeh 818bd8a591 trim trailing whitespace 2020-11-05 14:11:41 -08:00
Adeeb Shihadeh f46ed718ba bump version to 0.7.11 2020-10-23 20:09:08 -07:00
Adeeb Shihadeh 94991d9319 remove unused params function 2020-10-22 17:05:52 -07:00
Willem Melching c0d92516cc
store params in ~/.comma on PC (#2369) 2020-10-20 13:18:21 +02:00
Dean Lee 0bbd080a04
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>
2020-10-19 22:44:24 -07:00
Willem Melching d28f488ea5 fix typo in params path on PC 2020-10-19 14:25:45 +02:00
Comma Device e4d2174a4e need that one too 2020-10-17 17:44:10 -07:00
Adeeb Shihadeh 20a6ca83c9
fix params permissions for offroad (#2356)
* fix params permissions

* don't need that one
2020-10-17 17:07:40 -07:00
Willem Melching 339d1967cb
--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>
2020-10-17 13:33:12 -07:00
Adeeb Shihadeh 96b637737b
fix build warnings (#2355)
* fix build warnings

* cython fixes

* cleanup transformations build

* little more
2020-10-17 12:40:01 -07:00
ZwX1616 6b020241c9
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>
2020-10-16 21:58:05 -07:00
Willem Melching 3dd9448981
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
2020-10-15 13:15:22 +02:00
Adeeb Shihadeh 707a670f42
fix params on PC and when reading path from env (#2340)
* fix params when reading path from env

* fix pc
2020-10-14 13:45:24 -07:00
Adeeb Shihadeh 6f307ea4c5 fix params permissions after refactor 2020-10-13 19:14:51 -07: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
Adeeb Shihadeh 47a42ff432 bump version to 0.7.10 2020-10-03 14:51:47 -07:00
Dean Lee 9983389ffe
close lock_fd if flock failed (#2231) 2020-09-28 11:47:38 +02:00
Dean Lee 9f34d1ff66
camerad: close file descriptors (#2065)
* close file descriptors

* fix struct indent

* add some new lines
2020-09-24 13:39:27 -07:00
Dean Lee 4fba3408c4
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
2020-09-24 11:51:36 +02:00
Dean Lee 6476207009
add function write_file() (#2181)
* add function write_file()

* handle EAGIN & EWOULDBLOCK

* don't  handle errno
2020-09-21 16:10:38 +02:00
Dean Lee 58e5223aba
touch.c:deleting useless function (#2208) 2020-09-21 11:43:54 +02:00
Adeeb Shihadeh 0ebc037be7
turn display on in spinner (#2148)
Co-authored-by: Comma Device <device@comma.ai>
2020-09-09 20:24:13 -07:00
Dean Lee f71467b450
release copy_q in visionbuf_free (#2121) 2020-09-02 21:11:25 -07:00
Willem Melching 5c058140ed
tici: fix set_realtime_priority (#2124)
* cleanup and pin modeld to core 5

* Unused import
2020-09-02 17:52:41 +02: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
robbederks 37d6472bfa
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 9233a1df7c.

* 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>
2020-08-26 19:59:56 -07:00
ZwX1616 3014280d1a
Fix OMX error on loggerd rotation when using multiple cameras (#1953)
* cherry pick from f8745d3002

* 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>
2020-08-26 15:02:51 -07:00
robbederks 622e42d504
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>
2020-08-26 11:30:30 +02:00
Dean Lee 71eedbce44
Remove unnecessary string copy (#2067) 2020-08-24 09:25:16 -07:00
Dean Lee 17dd07e751
visionstream: fix doube fd close (#2057)
* s->ipc_fd counld be closed twice

* white space
2020-08-24 14:07:27 +02:00
Dean Lee f8ab6bd009
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
2020-08-18 15:26:43 +02:00