Commit Graph

226 Commits

Author SHA1 Message Date
YassineYousfi
dd54ec9aa8 blue diamond model 💎 (#30504)
* c53b1113-ca16-434f-a3e7-457a36ba98cc/700

* 672ee0a5-0466-420d-be18-0610c5d71b6d/700

* update model replay ref commit
2023-12-12 11:24:04 -08:00
Harald Schäfer
9118973ed0 Farmville model (#30392)
* slightly different

* Revert "slightly different"

This reverts commit 8a470ecab40c295f3b8c777b82cb7a22890d116e.

* d09c9c88-1797-4ed5-ab2d-9dca5b12340b/700

* Update power draw

* Revert "Update power draw"

This reverts commit 1c95b663ec9c507604dd8580ff6386497b5391a8.

* Update ref
2023-11-07 11:17:37 -08:00
YassineYousfi
4c2bd853e4 (New) Lemon Pie Model 🍋 (#30209)
* 6f6e3749-1b7c-42e8-a33b-03929b7fc476/700

* oops deleted too much

* 1b4308b7-a659-4ebd-b4c6-c81c1c3890f8/700

* 1be192f3-f407-4217-9757-78b9ad92750a/700

* remove some todos

* more cleanup in lat planner

* vego > min_speed

* regen and update process replay refs

* update model replay ref

* update model replay ref commit again

* Revert "update model replay ref commit again"

This reverts commit 922cb796b8dfe264b0cce7a18206bb898b18bcb3.

* update again

* bump cereal
2023-11-02 14:01:00 -07:00
YassineYousfi
cad17b1255 modeld: parsing and publishing in python (#30273)
* WIP try modeld all in python

* fix plan

* add lane lines stds

* fix lane lines prob

* add lead prob

* add meta

* simplify plan parsing

* add hard brake pred

* add confidence

* fix desire state and desire pred

* check this file for now

* rm prints

* rm debug

* add todos

* add plan_t_idxs

* same as cpp

* removed cython

* add wfd width - rm cpp code

* add new files rm old files

* get metadata at compile time

* forgot this file

* now uses more CPU

* not used

* update readme

* lint

* copy this too

* simplify disengage probs

* update model replay ref commit

* update again

* confidence: remove if statemens

* use publish_state.enqueue

* Revert "use publish_state.enqueue"

This reverts commit d8807c8348338a1f773a8de00fd796abb8181404.

* confidence: better shape defs

* use ModelConstants class

* fix confidence

* Parser

* slightly more power too

* no inline ifs :(

* confidence: just use if statements
2023-10-19 14:23:51 -07:00
Harald Schäfer
3c0a7d6986 Night Strike Model (#30148)
* baab2a46-f0c3-46eb-8756-00c55354945b/700

* Update model replay ref
2023-10-03 14:25:30 -07:00
Harald Schäfer
3799fe46b3 Optimus Prime Model 🤖 (#29752)
* b449f295-7e40-4f97-96a6-d858815955e5/700

* make it compile b449f295-7e40-4f97-96a6-d858815955e5/700

* simpler - b449f295-7e40-4f97-96a6-d858815955e5/700

* feature_len changed

* 0a833ab4-9fc7-4e51-a686-9bce3eafcb91/700

* Revert "0a833ab4-9fc7-4e51-a686-9bce3eafcb91/700"

This reverts commit 41708b88447cfcf302b16f21f0caa69450bbd3df.

* 0a833ab4-9fc7-4e51-a686-9bce3eafcb91/700 again

* Update ref

* update ref

---------

Co-authored-by: Yassine <yassine.y10@gmail.com>
2023-09-21 13:51:12 -07:00
Mitchell Goff
503fa121ee Rewrite dmonitoringmodeld in python (#29740)
* Added dmonitoringmodeld.py

* Removed dmonitoringmodeld.cc

* Use ModelRunner helpers from runners/__init__.py

* Fixed DriverStateResult field ordering

* Some bug fixes

* Set calib input

* Look ma, no loop!

* Bump dmonitoringmodeld cpu usage in test_onroad

* Fixed memory leak caused by np.ctypes.data_as

* Formatting fixes

* chmod +x

* remove USE_ONNX_MODEL

* Realtime priority 1, formatting fixes
2023-09-07 19:46:43 -07:00
Mitchell Goff
0c0af682a1 Rewrite navmodeld in python (#29579)
* Added navmodeld.py

* Deleted navmodeld.cc

* Write SConscript config flags to config.py

* Remove deleted files from release/files_common

* Some more bug fixes

* Added config.py to gitignore

* Get rid of config.py

* Use set_realtime_priority

* A tiny bit more cleanup

* set realtime priority 1

* Use ModelRunner helper class from runners/__init__.py

* Formatting fixes

* mama mia that's a SPICY memory leak
2023-09-07 14:39:37 -07:00
mitchellgoffpc
05993f50df Added cython bindings for commonmodel sigmoid 2023-08-31 19:40:53 -07:00
mitchellgoffpc
f91e955a86 Move Runtime into runmodel_pyx 2023-08-31 13:51:50 -07:00
mitchellgoffpc
857f747467 Remove unnecessary hardware check in modeld 2023-08-31 13:51:49 -07:00
Mitchell Goff
1eb60516cb Move update_calibration to modeld.py (#29688)
* Move update_calibration to modeld.py

* Updated ref commit
2023-08-30 14:12:52 -07:00
Mitchell Goff
d998fd88a8 Added USE_THNEED environment variable and removed build flag (#29645) 2023-08-29 14:07:57 -07:00
Mitchell Goff
72a3c987c0 Rewrite modeld in python (#29230)
* Added modeld.py (WIP)

* No more VisionIpcBufExtra

* Started work on cython bindings for runmodel

* Got ONNXModel cython bindings mostly working, added ModelFrame bindings

* Got modeld main loop running without model eval

* Move everything into ModelState

* Doesn't crash!

* Moved ModelState into modeld.py

* Added driving_pyx

* Added cython bindings for message generation

* Moved CLContext definition to visionipc.pxd

* *facepalm*

* Move cl_pyx into commonmodel_pyx

* Split out ONNXModel into a subclass of RunModel

* Added snpemodel/thneedmodel bindings

* Removed modeld.cc

* Fixed scons for macOS

* Fixed sconscript

* Added flag for thneedmodel

* paths are now relative to openpilot root dir

* Set cl kernel paths in SConscript

* Set LD_PRELOAD=libthneed.so to fix ioctl interception

* Run from root dir

* A few more fixes

* A few more minor fixes

* Use C update_calibration for now to exactly match refs

* Add nav_instructions input

* Link driving_pyx.pyx with transformations

* Checked python FirstOrderFilter against C++ FirstOrderFilter

* Set process name to fix test_onroad

* Revert changes to onnxmodel.cc

* Fixed bad onnx_runner.py path in onnxmodel.cc

* Import all constants from driving.h

* logging -> cloudlog

* pylint import-error suppressions no longer needed?

* Loop in SConscript

* Added parens

* Bump modeld cpu usage in test_onroad

* Get rid of use_nav

* use config_realtime_process

* error message from ioctl sniffer was messing up pyenv

* cast distance_idx to int

* Removed cloudlog.infos in model.run

* Fixed rebase conflicts

* Clean up driving.pxd/pyx

* Fixed linter error
2023-08-25 14:36:26 -07:00
Mitchell Goff
e2e39d100b Added cython bindings for model runners and commonmodel (#29607)
* Added cython bindings for model runners and commonmodel

* Removed cython language_level=3

* loop to set CXXFLAGS for both envs
2023-08-24 17:00:26 -07:00
Dean Lee
7bfd3dac81 cpplint: add filter whitespace/comma (#29595) 2023-08-24 10:42:06 -07:00
Dean Lee
5480d32bb5 cpplint: add filter whitespace/parens (#29565) 2023-08-23 14:25:05 -07:00
Mitchell Goff
c04e5d12fc Non-Inflatable Model 🎈 (#29003)
* Added all maneuvers to navInstruction message

* Added nav instruction logic to modeld

* New model: fcee01c1-96bb-414f-b00d-e4a994a00922/700

* Fixed bug in navd

* Added sharp/slight modifiers

* Updated refs
2023-08-09 19:56:45 -07:00
Mitchell Goff
663fc0d8fe Clean up model_publish args to simplify cython bindings (#29203)
* Clean up model_publish args to simplify cython bindings

* pass by reference

* Move FCW and model confidence queues into PublishState
2023-08-01 19:23:18 -07:00
Nima Khodaveisi
24c7b044de dmmonitoringmodeld: remove unused libyuv import (#29180) 2023-07-31 13:23:13 -07:00
YassineYousfi
14e524d52b models/README: DM input is only luma (#29188)
dm input = only luma
2023-07-31 12:57:22 -07:00
Dean Lee
8dcd92253b dmonitoring: use sizeof(float) instead of hardcorded size (#28963) 2023-07-15 10:30:50 -07:00
Mitchell Goff
e346839c68 nav model: fix flicker in nav enabled state (#28815)
* Fix flicker in nav enabled state

* Move all relevant information for validity checks into navModel packet

* Ignore locationMonoTime in replay tests

* Check route valid in navmodeld

* sm update

* check that

* update refs

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-07-09 15:10:02 -07:00
Mitchell Goff
c9f00678af Refactor model runners (#28598)
* Started work on model runner refactor

* Fixed some compile errors

* everything compiles

* Fixed bug in SNPEModel

* updateInput -> setInputBuffer

* I understand nothing

* whoops lol

* use std::string instead of char*

* Move common logic into RunModel

* formatting fix
2023-07-06 22:26:11 -07:00
Mitchell Goff
531c13f2ac Moonrise Model (#28761)
* New model: 889463fc-5e5d-497d-9111-c8567a13cabf

* Updated model replay ref
2023-06-30 18:52:20 -07:00
ZwX1616
ce2dffe566 Modeld: send confidence class (#28625)
* 0.7

* magic

* faster magic

* more simple

* up

* empty

* more mid bits

* naive

* flatten

* dz

* that can stay

* this is fine

* what the

* what the

* giRevert "what the"

This reverts commit 1619ba68e6098dc581fe9b82e7ecb74562b619cc.

* Revert "what the"

This reverts commit 0037dd368290497a6d0009ca34adb2184b584d2e.

* 1x fine

* that was fine

* combined

* independent cum

* 0 is fine

* use metrics

* up cereal

* process and publish from modeld

* cleanup

* use s.output

* bg

* a greener approach

* dns

* serial

* update ref commit

* rebase

* ref

* cereal master

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-06-23 16:49:14 -07:00
Mitchell Goff
4c2c73b152 Publish navEnabled from modeld (#28647)
* Publish navEnabled from modeld

* Bump cereal
2023-06-22 19:39:51 -07:00
Mitchell Goff
a9cb255017 New map model: 917a2539-5e7a-4374-878a-9b356f0f1922/500 (#28579) 2023-06-16 19:31:57 -07:00
YassineYousfi
4fcd82076a Nicolas Cage Model (#28547)
01697194-d32d-4c3a-a803-d8f61cdf24e9/449 2ff8e6a1-7efd-4984-9f29-974164a3747b/700
2023-06-16 13:36:56 -07:00
YassineYousfi
7925232a34 hot coffee model (#28296)
* 1061b1c7-b944-43e3-a940-b56b64d66f54/700

* bump cereal

* bump cereal

* make mypy happy

* write TODO

* read height from written params

* fix certain_if_calib logic and unit tests

* factor moving_avg_with_linear_decay

* remove whitespace

* update model ref commit

* default value for CI

* update process replay ref commit

* update process replay ref commit

* update process replay ref commit

* bump cereal
2023-06-02 20:55:13 -07:00
Mitchell Goff
328b5d9d47 Nicki Minaj Model (#28218)
* New model: 2ff7490f-8a2f-4c0d-87a8-b0fa3a4a6a71

* Updated model_replay_ref_commit
2023-05-22 15:11:04 -07:00
YassineYousfi
bda0d6ac77 update dm model README (#28238)
add calib dm input in readme
2023-05-19 15:20:43 -07:00
YassineYousfi
2d4558d5cf update DM model README (#28211)
* update DM model readme

* rename + permalink + correct types and ranges
2023-05-16 13:40:49 -07:00
YassineYousfi
f80c1087fc new model: trained with augmented turn desire pulses (#28063)
* df733db3-fad2-4485-abe9-59a6a47f2233/449 85f20e13-dd4d-49a8-ba33-98e6afc161d9/700

* update ref commit
2023-05-01 16:03:16 -07:00
YassineYousfi
26541d9e7a new model: trained on new dataset (#27637)
* df733db3-fad2-4485-abe9-59a6a47f2233/449 946c0f55-247d-4790-a407-c07e4364b340/700

* fix reducel2 df733db3-fad2-4485-abe9-59a6a47f2233/449 946c0f55-247d-4790-a407-c07e4364b340/700

* update ref commit
2023-03-22 20:19:46 -07:00
YassineYousfi
e146bb1a96 update modeld/models readme (#27564)
* update readme with new model design

* typo

* space
2023-03-11 16:26:39 -08:00
Harald Schäfer
eb8bdc0026 MPC path in UI (#27380)
* 10s lat

* Full length MPC

* redfine N

* Leave controls the same for now

* Updates

* use long plan in lat plan

* interp plan

* simplergit add selfdrive/controls/plannerd.py selfdrive/controls/

* expand to 10s

* revert this

* fix linter

* vizualize

* fix long test

* typo

* cleanup

* compiles

* unused

* unused

* bump cereal

* bump cereal

* use model if no uiplanm

* update replay

* update ref commit

* bump cereal to master
2023-02-17 19:58:30 -08:00
YassineYousfi
1e49c54ffb new model: improved height estimation (#27234)
* 07a3a2b2-6dbe-43c3-9bb9-a8023932e054/449 c3d7d18a-6207-42e7-84d9-601ecb3c6f0e/700

* 07a3a2b2-6dbe-43c3-9bb9-a8023932e054/449 db92e7f3-3f4b-4f0f-95ff-76cb6ed6894a/700

* update ref commit
2023-02-08 22:21:31 -08:00
YassineYousfi
7316cd03fb new model: fixed weight decay logic (#27068)
* 07a3a2b2-6dbe-43c3-9bb9-a8023932e054/449 cdfa9e3c-2807-49fc-bdc7-a985f8ff1644/700

* update refs
2023-01-26 19:09:12 -08:00
Harald Schäfer
160c9ba1d2 Navmodel and driving style: update runner (#26762)
* Navmodel and driving style: update runner

* No driving style yet

* thneedrunner without extra inputs

* nav feature ref
2022-12-11 15:25:36 -08:00
Mitchell Goff
bb8a38a050 navmodeld (#26665)
* Added navmodeld

* New nav model: 7c306685-5476-4bd4-ab65-105b01b6bca8/300, feats only

* little cleanup

* Remove NAV flag

* Moved to_kj_array_ptr to commonmodel.h

* Switch from decimation to last_frame_id check

* add to release files

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-12-02 13:14:30 -08:00
YassineYousfi
ceb94f1bcd Revert "Albert Einstein Model" (#26576)
Revert "Albert Einstein Model (#26456)"

This reverts commit 34c80a6fbd.
2022-11-22 11:41:22 -08:00
YassineYousfi
34c80a6fbd Albert Einstein Model (#26456)
* d0bc247d-9529-4e50-a5dd-95a8a5733874/440 38fb1ce9-18d7-4292-9ffd-678f8483ebf4/700

* update model replay ref commit
2022-11-18 17:50:24 -08:00
Harald Schäfer
f63f0de80a E2e long model: calibrate model speed to wheel speed (#26395)
* calibrate!

* Fix test

* Fix proc replay

* check len

* get v_ego from model 8501d20-bb59-4193-aa82-82b2737dedd6/449 609d90f3-65e6-4617-a60c-d6d99eead408/700

* bump cereal

* initialize v_model_error

* typo

* better names

* cleanup

* bump cereal

* update model replay ref commit

* bump to cereal master

Co-authored-by: Yassine Yousfi <yyousfi1@binghamton.edu>
2022-11-07 17:49:36 -08:00
YassineYousfi
c3388d216c Model trained with headlight augmentation (#26284)
* d8501d20-bb59-4193-aa82-82b2737dedd6/449 ddfe2a22-fb0e-4ff0-a97f-0157b95eb44d/700

* update ref
2022-10-30 23:55:48 -07:00
HaraldSchafer
2b7290a142 Model trained with more long noise (#26241)
* d8501d20-bb59-4193-aa82-82b2737dedd6/449 d37d320d-7d78-479a-9be2-d58c75284307/700

* Update model ref
2022-10-26 00:20:30 -07:00
HaraldSchafer
0edbbdeaf9 Modeld: Add comment (#26188)
Rename and add comment
2022-10-21 11:20:52 -07:00
HaraldSchafer
d25ab3e366 Wide transform model (#26165)
* d8501d20-bb59-4193-aa82-82b2737dedd6/449 f78009d1-2184-4136-9fbc-1c5de55d460d/700

* Change model outs

* Add cereal

* Publish transform

* d8501d20-bb59-4193-aa82-82b2737dedd6/449 f78009d1-2184-4136-9fbc-1c5de55d460d/700

* Bump cereal to master

* Bump cereal to master

* Update model ref
2022-10-21 01:29:58 -07:00
Bruce Wayne
3a50d5fd85 Revert "d8501d20-bb59-4193-aa82-82b2737dedd6/449 f78009d1-2184-4136-9fbc-1c5de55d460d/700"
This reverts commit 0ac12b82c7.
2022-10-21 00:32:34 -07:00
Bruce Wayne
0ac12b82c7 d8501d20-bb59-4193-aa82-82b2737dedd6/449 f78009d1-2184-4136-9fbc-1c5de55d460d/700 2022-10-21 00:24:11 -07:00