Commit Graph

127 Commits

Author SHA1 Message Date
Greg Hogan
7bb13acc45 ModelDataRaw struct part 4 (#22673)
* convert model data for leads to struct

* make things more consistent

* change names with path to plan

* consistent use of plural
2021-10-25 16:46:09 -07:00
Greg Hogan
755a0a63a2 ModelDataRaw struct part 3 (#22639)
* lane lines and road edges

* roll back some changes to find what broke things

* rollback more changes to find issue

* fix order of lane line probs

* try outputs on stack again

* initialize output array
2021-10-21 14:59:07 -07:00
Greg Hogan
a7f36c9daf ModelDataRaw struct part 2 (#22554)
* model pose more struct

* constexpr seems useful

* more concise

* fix order

* seems more readable

* plan struct

* attempt to fix compiling on device

* fix constexpr errors on device

* fix rotation rate in log

* maybe this fixes compiling constexpr on device

* exp() cannot be used in constexpr on c2

* only copy what we actually log

* simplify pivot()

* fix setting position std

* see if this works

* try lambda again

* giving up on the lambda to select member

* fix position std

* fix param order
2021-10-19 19:04:01 -07:00
Greg Hogan
c1c402a821 model position std should be exp(std) (#22593) 2021-10-17 19:42:20 -07:00
Greg Hogan
21e58f9f4a ModelDataRaw struct with fixed size arrays (#22544)
* convert pose

* fix indexes
2021-10-13 20:03:15 -07:00
Dean Lee
ac9bef1f64 modeld: more readable fill_model (#22540)
* more readable fill plan_t_attr

* remove parameter column_offset from fill_xyzt
2021-10-13 19:01:08 -07:00
ZwX1616
8574e79fec wider FOV DM on comma three (#22286)
* c3 is straightforward

* c2 transform

* c3 preview

* alpha model

* Revert "alpha model": wrong quantization data

This reverts commit b50e5739735b30d960aca22bcf3cbe23b0121e13.

* yuv looks good

* a55b

* const int

* block top deadzone

* new box alpha curve

* update k

* fix debug

* rhd use same offset

* box shift for rhd

* 7e3e

* set new thresh

* update ref

* explain

* remove e2e

* same metric thresh

* process isocc

* model

* cancel extra policy

* update numbers

* new model

* update cereal

* up cereal

Co-authored-by: Comma Device <device@comma.ai>
2021-10-13 17:00:46 -07:00
HaraldSchafer
0885790e34 more readable (#22519) 2021-10-11 14:20:44 -07:00
HaraldSchafer
72a736f90e Improved lead model: 6be443f2-ed70-4580-9c31-61b94d068e24/950 (#22290)
* 6be443f2-ed70-4580-9c31-61b94d068e24/950

* meta changed too

* new ref

* new ref from CI

* unused

* Revert "new ref from CI"

This reverts commit 28b6bdc81055c39973d0bf9cc964647838b73a73.

* new ref from CI again
2021-09-21 17:36:05 -07:00
George Hotz
83ff9ca331 Use thneed directly on the loaded YUV data (#22236)
* completely untested

* it builds now

* bug fixes, save 1ms

* using a kernel to copy works

* more sane API to loadyuv

Co-authored-by: Comma Device <device@comma.ai>
2021-09-16 14:13:03 -07:00
Dean Lee
7db04ab0c5 ONNXModel: use the actual model file name (#22084)
* use the actual file name

* use macro

* fix typo

* continue

* Apply suggestions from code review

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-09-02 14:21:15 -07:00
Dean Lee
784b3a2ac9 dmonitoring: improve yuvframe2tensor (#21996)
* use Y,U,V

* use a pre-calculated table

* add variable use_snpe_model

* .dlc

* remove if
2021-08-30 21:23:01 -07:00
Mitchell Goff
05b37552f3 Retuned desire model (#21919)
* New model: d8e7f76f-7bec-4a83-af00-c0fae792527f/950

* Updated process replay refs

* Updated model replay ref
2021-08-12 21:06:26 -07:00
Mitchell Goff
15d6bbb47c Revert "New desire model (#21729)" (#21805)
* Revert "New desire model (#21729)"

This reverts commit e83973b9b3.

* Updated process replay ref and reverted release notes
2021-07-30 14:34:29 -07:00
Mitchell Goff
e83973b9b3 New desire model (#21729)
* New model: b822ee32-917c-4639-99f8-25be3e6aabad/900

* Enable keeps

* use new packet

* Send keep pulses once per second

* Updated model_replay_ref_commit

* New model: 0f160bf9-1bce-43e6-9785-564b2453eeac

* Bump model_replay_ref_commit

* Bump submodules

* New model: fd904bf9-5dd8-4619-8997-c5668400e078/550

* New model: fd904bf9-5dd8-4619-8997-c5668400e078/950

* No keeps

* Bumped model replay ref

Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
2021-07-26 21:11:09 -07:00
Willem Melching
48020e686e make sure tidx+1 doesn't exceed TRAJECTORY_SIZE-1 (#21595)
* make sure tidx+1 doesn't exceed TRAJECTORY_SIZE-1

* Update driving.cc

* Update driving.cc

Co-authored-by: deanlee <deanlee3@gmail.com>
Co-authored-by: HaraldSchafer <harald.the.engineer@gmail.com>
2021-07-14 10:07:58 -07:00
robbederks
2f22207ece Add option to avoid thneed (#21577)
* add option to avoid thneed

* cleaner

Co-authored-by: Willem Melching <willem.melching@gmail.com>

* fix USE_THNEED in modeld

* cleanup

Co-authored-by: Willem Melching <willem.melching@gmail.com>
Co-authored-by: Comma Device <device@comma.ai>
2021-07-13 16:40:20 +02:00
Adeeb Shihadeh
88424ede2c Revert model (#21571)
* Revert "New desire model (#21458)"

This reverts commit 4230d5d212.

* revert rel notes
2021-07-12 19:26:50 -07:00
HaraldSchafer
4230d5d212 New desire model (#21458)
* New model: b822ee32-917c-4639-99f8-25be3e6aabad/900

* Enable keeps

* use new packet

* Send keep pulses once per second

* Updated model_replay_ref_commit

* New model: 0f160bf9-1bce-43e6-9785-564b2453eeac

* Bump model_replay_ref_commit

Co-authored-by: mitchell <mitchellgoffpc@gmail.com>
2021-07-07 19:44:17 -07:00
HaraldSchafer
70f0059be4 Revert DM model change (#21442)
* Revert "tici patch"

This reverts commit 09de331f18.

* Revert "dm e2e outputs added (#21210)"

This reverts commit 46e3f4528f.

* Revert "improved dm model (#21113)"

This reverts commit 0f48fddf41.
2021-06-29 21:29:06 -07:00
Adeeb Shihadeh
4a1aec27ef segment regen (#21148)
* start seg regen

* send vipc

* fix up some paths

* set fp

* fix no entries

* engages

* seperate camera procs

* send real frames

* regen test routes

* nice argparser

* fix valgrind test

* move that

* fix that
2021-06-28 21:44:40 -07:00
Dean Lee
8da538c18c Refactor ModelFrame struct to class (#20005)
* refactor modelframe

* remove DUMP_YUV

* use constructor/destructor instead of init/free

* OMG...should be clEnqueueReadBuffer

* rebase master

* rebase master

* fix build

* small cleanup

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-06-19 01:22:50 -07:00
Dean Lee
e4e669bb0f add space after function name and if statement (#21225) 2021-06-11 10:17:52 +02:00
ZwX1616
46e3f4528f dm e2e outputs added (#21210)
* try this

* use e2e only

* add new outputs

* Revert "use e2e only"

This reverts commit 423dd8e29b88d892074f6f6a0e103681147ff6cc.

* send new

* fix batchnorm
2021-06-09 16:18:14 -07:00
Adeeb Shihadeh
9e94fb17cf fix qcom and qcom2 builds 2021-06-08 16:44:05 -07:00
Dean Lee
c53cb5d570 Use C++ header files instead of C header files. (#21192)
* use cstring instead of string.h

* use cstdio instead of stdio.h

* remove inttypes.h

* use cstdlib instead of stdlib.h

* use cstdint instead of stdint.h

* #include <cstddef>

* cstdlib

* use cmath

* remove stddef.h

* use cassert

* use csignal

* use ctime

* use cerror

* rebase master
2021-06-08 13:46:22 -07:00
Dean Lee
b06b3ecb60 Use full include path (#21194) 2021-06-08 12:09:30 -07:00
HaraldSchafer
dc40631e97 Fix planner low speed behaviour (#20990)
* first point is 0

* first point is always now

* print replay diffs

* new ref

* changed wrong commit
2021-05-21 15:10:59 -07:00
Mitchell Goff
29cc3500a5 New model outputs (#20933)
* New model: 51a237cd-9c43-4281-9072-802325e6744d/950

* Added new meta outputs and proper interp for plan_t_arr

* Added meta-based trigger for FCW

* No nans in planner, separate alert for model FCW

* Cleaned up plan_t interp logic

* Added empty cameraError alert to fix unit tests

* Use the normal FCW event

* Updated filter logic

* Updated model replay ref

* Moved disengage predictions into their own cereal struct

* Updated model replay ref for new cereal structs

* Apparently this breaks stuff?

* Bumped cereal commit and model replay ref
2021-05-19 22:30:23 -07:00
Comma Device
6ffc183359 fix dmonitoring build after include cleanup 2021-05-08 23:30:35 -07:00
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
Adeeb Shihadeh
8a280fbb8e bump cereal 2021-05-03 20:47:11 -07:00
HaraldSchafer
d72d433ec7 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
2021-04-06 23:49:29 -07: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
Dean Lee
d5c17723da driving.h: fix indentation (#20315) 2021-03-11 17:00:14 +01:00
Dean Lee
bca53f337f softmax(): use std::max_element (#20306) 2021-03-11 15:05:13 +01: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
Comma Device
dcd4bb4f4e fix thneed build 2021-02-01 20:34:21 -08:00
Dean Lee
0b7b7241c8 model_publish: use kj::ArrayPtr<const float> raw_pred (#19917) 2021-02-01 19:08:17 -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
ccf055fd62 model_init: remove memset (#19921) 2021-01-26 16:56:37 +01:00
Dean Lee
4bfed95071 dmonitoring_init: use &s->output[0] instead of &s->output (#19918) 2021-01-26 16:07:57 +01:00