Commit Graph

197 Commits

Author SHA1 Message Date
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
abe39e5076 Soundd: move to python (#30567)
soundd python
2023-12-05 18:10:01 -08:00
Adeeb Shihadeh
99d51bf02c Revert "Simplify passive mode handling (#30593)" 2023-12-04 15:05:05 -08:00
Adeeb Shihadeh
5ccff25d88 Simplify passive mode handling (#30593)
* simplify passive handling

* makes more sense
2023-12-03 13:59:59 -08:00
Adeeb Shihadeh
a1d36961cf new msgs default to invalid (#30587)
* new msgs default to invalid

* fix lm

* set more valid

* update rest

* update refs

* fix logMessage

* more valids

* cleanup

* fix llk test

* pigeond is also valid

* more valids
2023-12-03 10:50:17 -08:00
Adeeb Shihadeh
531e62fc03 clear non-release params on startup (#30583) 2023-12-01 23:57:54 -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
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
Adeeb Shihadeh
5f7143df02 jenkins: use build.py to manage cache size (#30440)
* jenkins: use build.py to manage cache size

* label

* set pp

* double

* cleanup

* non mimimal build on PC

---------

Co-authored-by: Justin Newberry <justin@comma.ai>
2023-11-10 16:55:25 -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
Adeeb Shihadeh
af86e30566 remove mapsd exit code exception (#30398) 2023-11-06 21:26:52 -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
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
1ee6ed4b16 Linter: remove pylint (#29611)
remove pylint
2023-08-24 16:30:54 -07:00
Adeeb Shihadeh
4917e22615 Minimal build (#29600)
* add build flag for minimum build

* add minimal build

* update

* fix pj

* bump opendbc

* update subaru
2023-08-24 14:58:30 -07:00
Adeeb Shihadeh
d013f2174a manager: refactor process starting logic (#29574)
* refactor into sane api

* always set

* cleanup

* cleanup

* and there too

* fix order

* fail

* and ensure we test

* pass test

pass test

* order

* only diff not related

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-08-24 06:00:55 -07:00
Shane Smiskol
84b897cf44 manager: test process exclusion (#29586)
* add test

* add comment

* Update selfdrive/manager/test/test_manager.py

* more accurate
2023-08-24 00:34:36 -07:00
Adeeb Shihadeh
bb1b641812 build.py: retry with less threads (#29543)
* build.py: retry with less threads

* cleanup

* fix no output

* cleanup
2023-08-22 20:58:43 -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
Shane Smiskol
3e2903a0c1 Update TOTAL_SCONS_NODES
Should add a CI test for this
2023-08-14 17:34:19 -07:00
Vivek Aithal
81322a4805 [commabody] setup and run live stream encoders (#29087)
* op changes needed for body

* remove logmessaged callback

* add newlines

* add stream arg

* add stream_encoder to config

* supersets, avoid two encoderd

* fix recursive exit error

* fix loggerd crash

* add stream_encoderd cpu usage to test

* Update system/loggerd/loggerd.h

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

* resolve comments

* stream_encoderd onroad to false

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-08-11 15:34:25 -07:00
Justin Newberry
62c1e65924 Ruff: enable most of bugbear (#29320)
* added mutable default args

* most of the Bs

* add comment about lrucache
2023-08-11 15:33: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
Harald Schäfer
623351e4ed Revert "[commabody] Add new body teleop ui (#29119)" (#29249)
This reverts commit a7304d059c.
2023-08-05 07:15:35 -07:00
Vivek Aithal
a7304d059c [commabody] Add new body teleop ui (#29119)
* add new ui

* move body tele op ui to new dir

* fix codespell errors

* resolve mediablackhole pylint error

* fix import error

* style fixes

* use logging, not print

* fix js styling

* resolve comments
2023-08-04 13:56:46 -07:00
Adeeb Shihadeh
bc0aa1c598 manager: remove old unkillable process handling (#29209) 2023-08-01 22:18:58 -07:00
Kacper Rączy
547a033a3c process_replay: capture process output (#29027)
* Add ProcessOutputProxy

* Move launcher to its own field

* Move ProcessOutputCapture to its own file

* Return itself from __enter__ of OpenpilotPrefix

* Integrate ProcessOutputCapture into process_replay

* Add note about capture_output_store to README

* ipykernel import is optional

* Disable type checking for link_with_current_proc

* Remove assertion

* Decode outputs to utf-8

* read(self): return empty buf if its none

* Fix type annotations

* Replace fifo with regular file, to avoid hitting fifo size limit
2023-07-31 16:30:58 -07:00
Adeeb Shihadeh
571bf47b0a mapsd exit needs some work 2023-07-24 20:22:14 -07:00
Adeeb Shihadeh
2aa3000371 test_manager: skip mapsd check for now 2023-07-18 19:15:47 -07:00
Adeeb Shihadeh
260e83d8e4 manager: create params once (#28757) 2023-06-30 10:03:45 -07:00
Adeeb Shihadeh
9ca96cc4b1 manager: write ublox param on change (#28748) 2023-06-29 16:05:00 -07:00
Mitchell Goff
aadd9ae269 Enable nav features in modeld (#28448)
* Enable nav features in modeld

* Enable mapsd/navmodeld

* Updated model_replay_ref_commit and added mapsd/navmodeld to test_onroad

* fixed process name

* always publish from mapsd
2023-06-16 21:27:35 -07:00
Mitchell Goff
6509cde41b Rename map_renderer -> mapsd (#28580) 2023-06-16 20:12:50 -07:00
Adeeb Shihadeh
111b4eee30 fix a bunch of python warnings (#28576)
* fix a bunch of python warnings

* fix that
2023-06-16 13:22:30 -07:00
Adeeb Shihadeh
58d32a70d7 manager: watchdog restart UI with SIGKILL (#28523) 2023-06-12 21:46:20 -07:00
Adeeb Shihadeh
3e3c8b7ddf soundd: only run onroad (#28449) 2023-06-07 16:24:54 -07:00
Harald Schäfer
205c900742 Driving Personality setting (also changes follow distance) (#24742)
* Skeleton

* Adjustable follow parameter

* fix rebase

* long planner

* typo

* Add ui toggle

* Fix icon

* Improve text

* Better toggle position

* Im a UX engineer now

* add param reader

* CHange jerk to have same crash test performance

* Try reading param

* Unused comment

* translate ui text

* std stoi

* Parametrized buttons

* Empty strings are ints

* Move to generic

* Update translations

* Fix translation diffs

* Release notes

* update refs

* tweaks

* Misc fixes

* No param is standard
2023-06-05 22:17:41 -07:00
Shane Smiskol
75fc029130 manager: clear onroad/offroad transition params on start (#28199)
* clear onroad transition params

* all offroad params also have manager start
2023-05-24 20:46:59 -07:00
Shane Smiskol
22ce4e17ba manager: initialize onroad params before starting processes (#28198)
* initialize to off on startup

* params

* better

* better

* move to helpers

* rm
2023-05-16 12:45:05 -07:00
Shane Smiskol
b8fa7f58ea onroad transition: clear params and start safety setter thread (#28151)
* rename from ignition to onroad/offroad

* forgot one

* clear in manager

* don't clear in boardd anymore

fix

* params isn't used here

* add comment

* Revert "add comment"

This reverts commit 54fb6660501679e5a989c3f06c0a438bdb04dc7e.

* write params in manager

* first part is self explanatory

* remove these from thermald now

* start safety setter thread with IsOnroad

* drivesss

* more

* less

* come back

* makes sense here
2023-05-09 21:25:23 -07:00
Cameron Clough
a33af9cb74 cloudlog: add git to ctx (#27996)
* cloudlog: add git to ctx

* use normalised origin, change names

* order
2023-04-21 22:35:50 -07:00
Adeeb Shihadeh
455d76cdb6 manager: log time with exit param (#27615)
* manager: log time with exit param

* fix double brackets
2023-03-17 16:17:42 -07:00
Adeeb Shihadeh
39cf8c6694 only run rawgpsd without a ublox (#27577) 2023-03-14 13:31:49 -07:00
Adeeb Shihadeh
c97911dbad ubloxd: move to system/ (#27536)
* ubloxd: move to system/

* more fixes

* add missing sconscript

* fix valgrind tests

* uncomment
2023-03-08 16:11:18 -08:00
Adeeb Shihadeh
94eb215980 loggerd: move to system/ (#27534) 2023-03-08 11:20:49 -08:00
Adeeb Shihadeh
6f40f0d442 sensord: move to system/ (#27531)
* sensord: move to system/

* add gitignore to releaes files
2023-03-08 10:56:54 -08:00
Adeeb Shihadeh
d6abf1d572 No disengage on gas by default (#27472) 2023-03-01 13:38:49 -08:00