Commit Graph

430 Commits

Author SHA1 Message Date
Adeeb Shihadeh
cd1d7eb4d2 OS04C10 support (#30658)
* getting frames

* ok

* support both output

* cleanup

* fix unused

* undo

* fix release files

---------

Co-authored-by: Comma Device <device@comma.ai>
2024-01-09 14:19:10 -08:00
Justin Newberry
3713e4d5ea add script to automatically format fingerprints file (#30792)
* Add script

* fix script

* fix script

* fix for subaddr

* run the script

* old style can fingerprints

* cleanup

* sort imports, make executable, fix path

* newline w/o newline

* match og can formatting

* match og formatting

* generate template once

* standard name

* less nested

* can fingerprints comments

* fix spacing

* no need for PLATFORM_TO_ENUM_NAME!

* prep for PRs

* comments for all, add honda comments

* Auto-generated fingerprint PR from fuzzy fingerprinting cars

* Revert "Auto-generated fingerprint PR from fuzzy fingerprinting cars"

This reverts commit 97bc9e3bdb9d819dcbe684ceba92ea702d40eaf0.

* even closer to original

* readd this comment

* and run script

* add to precommit

* add comments

* add comments

* add to release

* use for auto fingerprint

* disable precommit for now

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-12-20 11:18:29 -08:00
Adeeb Shihadeh
1421551297 Cython KF1D to Python (#30773)
* Cython KF1D to Python

* cleanup

* set x

* less nesting

* fix release

* Revert "fix release"

This reverts commit 97e5d0f80405660efb861c7b9df7fbfd5dda5dd9.
2023-12-16 23:45:28 -08:00
Adeeb Shihadeh
a07060b24b common: remove statlog (#30774)
* common: remove statlog

* fix release
2023-12-16 23:33:55 -08:00
Adeeb Shihadeh
bc54ed794b remove PyYAML package (#30770)
* remove PyYAML package

* remove those

* add comments back

* fix lock

* fix those
2023-12-16 20:48:57 -08:00
Adeeb Shihadeh
3831bf19e4 remove Qt wrapper scripts (#30454)
* remove Qt wrapper scripts

* revert those
2023-12-10 11:45:35 -08:00
Dean Lee
ef262ff9eb camerad: move sensor related code to /sensors (#30647) 2023-12-08 11:19:10 -08:00
Dean Lee
bdf868ddc2 camerad: split sensor_ic2.h (#30641)
* split sensor_ic2.h

* move start_reg,stop_reg
2023-12-07 15:45:49 -08:00
Dean Lee
ecfe201a57 camerad: move AR0231 functions to camera_ar0231.cc (#30635)
* move AR0231 functions to camera_ar0231.cc

* move to sensors/aro231.cc
2023-12-07 11:48:17 -08:00
Adeeb Shihadeh
35f819c823 swaglog.py goes in common/ (#30631)
* swaglog.py goes in common/

* all of these go in release

* we'll even include the pyx
2023-12-06 17:27:51 -08:00
Justin Newberry
36bebb1aa0 jenkins: retry build_devel (#30628)
* will it work

* retry build devel

* correct p[ath

* try a failure

* Revert "try a failure"

This reverts commit ba4e6a0a2096b94887fcfbf7d011e34aa2a16c41.
2023-12-06 17:22:32 -08:00
Justin Newberry
31ab43ce41 jenkins: remove pytest tici conf (#30621)
* remove pytest conf

* remove that too
2023-12-06 11:13:22 -08:00
Justin Newberry
abe39e5076 Soundd: move to python (#30567)
soundd python
2023-12-05 18:10:01 -08:00
Kacper Rączy
f46f00b373 webrtcd: endpoint for message schema retrieval vol. 2 (#30607)
* webrtcd: endpoint for message schema retrieval (#30578)

* Capnp json schema conversion

* Schema get endpoint

* Type annotation for generate_field

* Filter empty services

* Add schema.py to release
2023-12-04 23:51:52 -08:00
Kacper Rączy
f058b5d64e webrtcd: webrtc streaming server (audio/video/cereal) (#30186)
* WebRTCClient and WebRTCServer abstractions

* webrtc client implementation

* Interactive test scripts

* Send localDescriptions as offer/asnwer, as they are different

* Tracks need to be added after setting remote description for multi-cam streaming to work

* Remove WebRTCStreamingMetadata

* Wait for tracks

* Move stuff to separate files, rename some things

* Refactor everything, create WebRTCStreamBuilder for both offer and answers

* ta flight done time to grind

* wait for incoming tracks and channels

* Dummy track and frame reader track. Fix timing.

* dt based on camera type

* first trial of the new api

* Fix audio track

* methods for checking for incoming tracks

* Web migration part 2

* Fixes for stream api

* use rtc description for web.py

* experimental cereal proxy

* remove old code from bodyav

* fix is_started

* serialize session description

* fix audio

* messaging channel wrapper

* fix audiotrack

* h264 codec preference

* Add codec preference to tracks

* override sdp codecs

* add logging

* Move cli stuff to separate file

* slight cleanup

* Fix audio track

* create codec_mime inside force_codec function

* fix incoming media estimation

* move builders to __init__

* stream updates following builders

* Update example script

* web.py support for new builder

* web speaker fixes

* StreamingMediaInfo API

* Move things around

* should_add_data_channel rename

* is_connected_and_ready

* fix linter errors

* make cli executable

* remove dumb comments

* logging support

* fix parse_info_from_offer

* improve type annotations

* satisfy linters

* Support for waiting for disconnection

* Split device tracks into video/audio files. Move audio speaker to audio.py

* default dt for dummy video track

* Fix cli

* new speaker fixes

* Remove almost all functionality from web.py

* webrtcd

* continue refactoring web.py

* after handling joystick reset in controlsd with #30409, controls are not necessary anymore

* ping endpoint

* Update js files to at least support what worked previously

* Fixes after some tests on the body

* Streaming fixes

* Remove the use of WebRTCStreamBuilder. Subclass use is now required

* Add todo

* delete all streams on shutdown

* Replace lastPing with lastChannelMessageTime

* Update ping text only if rtc is still on

* That should affect the chart too

* Fix paths in web

* use protocol in SSLContext

* remove warnings since aiortc is not used directly anymore

* check if task is done in stop

* remove channel handler wrapper, since theres only one channel

* Move things around

* Moved webrtc abstractions to separate repository

* Moved webrtcd to tools/webrtc

* Update imports

* Add bodyrtc as dependency

* Add webrtcd to process_config

* Remove usage of DummyVideoStreamTrack

* Add main to webrtcd

* Move webrtcd to system

* Fix imports

* Move cereal proxy logic outside of runner

* Incoming proxy abstractions

* Add some tests

* Make it executable

* Fix process config

* Fix imports

* Additional tests. Add tests to pyproject.toml

* Update poetry lock

* New line

* Bump aiortc to 1.6.0

* Added teleoprtc_repo as submodule, and linked its source dir

* Add init file to webrtc module

* Handle aiortc warnings

* Ignore deprecation warnings

* Ignore resource warning too

* Ignore the warnings

* find free port for test_webrtcd

* Start process inside the test case

* random sleep test

* test 2

* Test endpoint function instead

* Update comment

* Add system/webrtc to release

* default arguments for body fields

* Add teleoprtc to release

* Bump teleoprtc

* Exclude teleoprtc from static analysis

* Use separate event loop for stream session tests
2023-12-01 21:13:37 -08:00
Adeeb Shihadeh
e34ee43eea camerad cleanup (#30573)
* misc cleanup

* rm those

* rm utils

* fix build

* rm pool

* little more

* goodbye imgproc
2023-12-01 20:10:07 -08:00
Kacper Rączy
f65e6bc30e locationd: remove models unused in openpilot (#30481)
* Remove filters used exclusively by xx

* Update SConstruct

* Remove from release

* Accomodate rednose build changes

* Update rednose ref

* rednose/helpers in rpath

* Add rednose_filters to files_common

* Change rednose_root

* Copy rednose site_scons to docker images

* Remove rednose from rpath

* Bump rednose

* Bump rednose

* Bump rednose
2023-11-22 13:25:29 -08:00
Adeeb Shihadeh
4cae08e636 rename rawgpsd to qcomgpsd (#30493)
* rename rawgpsd to qcomgpsd

* fix more paths

* that moved

* forgot the d
2023-11-18 23:23:16 -08:00
Dean Lee
335237aea0 modeld: remove modeldata.h (#30423)
* remove modeldata.h

* remove TRAJECTORY_SIZE
2023-11-18 22:45:26 -08:00
Adeeb Shihadeh
d3aad9ca46 esim is metered (#30486)
* esim is metered

* it's an enum

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-11-17 15:29:52 -08:00
Kacper Rączy
2de13bea91 Remove laika submodule (#30453)
* Remove laika submodule

* Remove laika check for minimal builds

* Fix minimal build check

* Bring back exclude for opendbc in codespell

* Fix typo

* Copy GNSS indices from laika

* Delete laika dependencies
2023-11-15 10:06:37 +01:00
Justin Newberry
2ad82cbfb0 Pytest: default settings on PC improvements (#30441)
* always multithreaded

* multithreaded

* pkill correct process

* escape more

* load for interfaces
2023-11-13 10:45:24 -08:00
Justin Newberry
aec7cea30d Pytest: tici mark for skipping on-device tests (#30412)
* mark tici

* not those ones

* missed that one

* add those

* add pypoetry

* oops
2023-11-07 17:35:44 -08:00
Harald Schäfer
c9fae805bc Tinygrad: use compile2 (#30400)
* Tinygrad: use compile2

* unused

* compile2 file

* slightly different

* Revert "slightly different"

This reverts commit 8a470ecab40c295f3b8c777b82cb7a22890d116e.

* slightly different ref

* add release file

* rm default args
2023-11-07 09:54:48 -08:00
Harald Schäfer
56dea7b0b4 Rm laikad (#30299)
* rm laika

* Rm laika

* Needed this

* More rm

* More rm
2023-10-23 00:15:39 -07:00
Adeeb Shihadeh
67f2321060 delete clocksd (#30252) 2023-10-22 14:47:38 -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
George Hotz
50d720fc2e Bump tinygrad to master (0.7) (#30254)
* bump tinygrad to master

* ops_cpu is required now

* and that one too

* tinygrad is getting out of hand with all the files

* bump tinygrad

* update ref commit

* tinygrad master

* Revert "update ref commit"

This reverts commit e7284152899d6dd8a986d9570e6021addfbc6b0f.

* bump tinygrad repo

* bump master

* update ref commit
2023-10-17 10:05:28 -07:00
Adeeb Shihadeh
f0aa631818 cleanup up old lib64 references (#30246)
* cleanup sensord

* rm rest

* fix that

* update that
2023-10-14 20:39:15 -07:00
Vivek Aithal
9e24a11f17 torqued: Refactor to share code with magd (#30238)
* refactor to extract common functions and classes out

* Add helpers.py to release files

* refactor
2023-10-13 17:24:04 -07:00
Adeeb Shihadeh
c347096c3e finish hardware move to system/ (#30140)
* finish hardware move to system/

* fix release

* couple more
2023-10-02 16:49:07 -07:00
Adeeb Shihadeh
f58969cb60 remove rtshield 2023-10-02 15:40:35 -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
Justin Newberry
bfe990b112 System: cleanup paths to use a common class (#29816)
* use OP prefix for logmessage

* cleanup paths too

* cleanup the paths too

* add hw.py to release

* fix those issues

* fix unittests

* fix unittests

* fix unittests

* do swaglog_ipc properly across all the files

* fix that

* fix swaglog in c++

* review suggestions
2023-09-07 11:32:47 -07:00
Dean Lee
125bd2cd9e ui/network: move to selfdrive/ui/qt/network/ (#29656)
* move to ui/qt/network

* wifimanager->wifi_manager
2023-08-27 15:23:19 -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
Adeeb Shihadeh
6b5a0b3498 include all model runners in release 2023-08-25 12:02:22 -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
Adeeb Shihadeh
973d90be77 Subaru: Crosstrek Hybrid dashcam mode (#25378)
* Subaru: Crosstrek Hybrid support

* hybrid cars in dashcam only

* revert that

* just dashcam

* tah should be abs

* remove unused import

* use the old dbc for now

* hybrid car exceptions in carstate

* need dashstatus until we get a proper cruiseactivated bit

* missing CP

* merge conflicts

* lets be consistent about extend

* cleanup

* fix and comments

* preglobal fix

* and the rest

* and this

* added hybrid to release

---------

Co-authored-by: Justin Newberry <justin@comma.ai>
2023-08-23 18:50:55 -07:00
Adeeb Shihadeh
91dc8457ae Revert Qt MOC hacks (#29528)
* Revert "CI: prevent moc from running in cache population step (#29401)"

This reverts commit d1aedccfbe.

* Revert "SCons: respect cache read only (#29437)"

This reverts commit 59abb469ea.

* don't change moc path
2023-08-22 11:16:58 -07:00
Kacper Rączy
d1aedccfbe CI: prevent moc from running in cache population step (#29401)
* Do not remove moc_files from cache

* Add cache cleanup script

* Use cache cleanup script

* Dry-run in cache population command

* Add newline

* Temporarly disable master only constraint for cache cleanup step

* Add test lines

* one more

* Fix shebang

* Remove debug lines

* Bring back master branch constraints
2023-08-22 10:47:56 -07:00
Dean Lee
3eef63af9b common: C++ RateKeeper (#29374)
* c++ RateKeeper

* add to files_common

* use util::random_int

* improve monotor_time

* remove ~ratekeeper
2023-08-20 21:27:02 -07:00
Adeeb Shihadeh
a9626f95b6 add openpilot prefix to imports (#29498)
* add openpilot prefix to imports

* more

* more

* fix docs

* fix linter

* bump submodules

* fix patched tests

* update dynamic imports

* debug

* Revert "debug"

This reverts commit db5e13b9911cc74438bee123bc3430da6c31b24b.

* fix pm test
2023-08-20 20:49:55 -07:00
Adeeb Shihadeh
d61f86d339 replace custom clock helpers with time module (#29499)
* replace custom clock stuff wtih time module

* fix double

* fix release

* bump cereal

* update type

* fix one more
2023-08-20 18:50:58 -07:00
Adeeb Shihadeh
00a11a1a2b remove fastcluster (#29352)
* remove fastcluster

* lock

* rm there

* and from release files
2023-08-11 21:08:49 -07:00
Vivek Aithal
e7d307ca1b [commabody] Add new body teleop ui (#29282)
* Revert "Revert "[commabody] Add new body teleop ui (#29119)" (#29249)"

This reverts commit 623351e4ed.

* add to release files

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-08-08 14:12:51 -07:00
Adeeb Shihadeh
7f02cb9faf jenkins: rm tools copy in release tests (#29273)
* jenkins: rm tools copy in release tests

* rm that too
2023-08-07 19:14:45 -07:00
Adeeb Shihadeh
1e3bb5be7e build_release: simplify panda building (#29252)
* build_release: simplify panda building

* cleanup
2023-08-05 16:56:30 -07:00
Kacper Rączy
c640429406 aarch64: ubuntu build support (#29171)
* Add support for aarch64 pc linux

* Add new libyuv path to release files

* Add libyuv's x86_64 lib dir

* Move left-over platform specific dirs from files_common

* Remove libyuv/lib directory (duplicate)

* Fix mpc Sconscripts

* Remove acados lib path from mpc sources

* Fix typo

* Add watch3 exec on aarch64
2023-08-01 16:18:46 -07:00