Commit Graph

68 Commits

Author SHA1 Message Date
Mitchell Goff
5732002296 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
old-commit-hash: 503fa121ee
2023-09-07 19:46:43 -07:00
Mitchell Goff
f9daa1d1cc 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
old-commit-hash: 0c0af682a1
2023-09-07 14:39:37 -07:00
Adeeb Shihadeh
5bc6566e7c 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>
old-commit-hash: d013f2174a
2023-08-24 06:00:55 -07:00
Adeeb Shihadeh
16ec56398c 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
old-commit-hash: a9626f95b6
2023-08-20 20:49:55 -07:00
Vivek Aithal
8d11558056 [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>
old-commit-hash: 81322a4805
2023-08-11 15:34:25 -07:00
Vivek Aithal
c1bcb53d4e [commabody] Add new body teleop ui (#29282)
* Revert "Revert "[commabody] Add new body teleop ui (#29119)" (#29249)"

This reverts commit 5dcfddbbfbddf00d16cb1f28c51f3dffc75d7cf6.

* add to release files

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: e7d307ca1b
2023-08-08 14:12:51 -07:00
Harald Schäfer
c0fbbd4b36 Revert "[commabody] Add new body teleop ui (#29119)" (#29249)
This reverts commit 0df6353569b77869ce4ddc8ce43bab621bccd107.
old-commit-hash: 623351e4ed
2023-08-05 07:15:35 -07:00
Vivek Aithal
082b1fd924 [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
old-commit-hash: a7304d059c
2023-08-04 13:56:46 -07:00
Adeeb Shihadeh
6cdd601cfe manager: remove old unkillable process handling (#29209)
old-commit-hash: bc0aa1c598
2023-08-01 22:18:58 -07:00
Adeeb Shihadeh
6baeca82c7 manager: write ublox param on change (#28748)
old-commit-hash: 9ca96cc4b1
2023-06-29 16:05:00 -07:00
Mitchell Goff
77b5e197aa 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
old-commit-hash: aadd9ae269
2023-06-16 21:27:35 -07:00
Mitchell Goff
300071a27c Rename map_renderer -> mapsd (#28580)
old-commit-hash: 6509cde41b
2023-06-16 20:12:50 -07:00
Adeeb Shihadeh
2d3f8208f7 soundd: only run onroad (#28449)
old-commit-hash: 3e3c8b7ddf
2023-06-07 16:24:54 -07:00
Adeeb Shihadeh
a1b574b737 only run rawgpsd without a ublox (#27577)
old-commit-hash: 39cf8c6694
2023-03-14 13:31:49 -07:00
Adeeb Shihadeh
de9a100719 ubloxd: move to system/ (#27536)
* ubloxd: move to system/

* more fixes

* add missing sconscript

* fix valgrind tests

* uncomment
old-commit-hash: c97911dbad
2023-03-08 16:11:18 -08:00
Adeeb Shihadeh
3a968c67e1 loggerd: move to system/ (#27534)
old-commit-hash: 94eb215980
2023-03-08 11:20:49 -08:00
Adeeb Shihadeh
47d30174d3 sensord: move to system/ (#27531)
* sensord: move to system/

* add gitignore to releaes files
old-commit-hash: 6f40f0d442
2023-03-08 10:56:54 -08:00
Adeeb Shihadeh
cd2756da23 don't run ublox procs without ublox (#26965)
* pigeond: don't run if ublox missing

* same for ubloxd

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 6861c99991
2023-01-14 23:06:09 -08:00
Mitchell Goff
46f70592ae 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>
old-commit-hash: bb8a38a050
2022-12-02 13:14:30 -08:00
Cameron Clough
9bcf83f493 micd: scale sound volume with ambient noise level (#26399)
* test changing sound volume

* test changing sound volume

* create system/hardware/pc/hardware.h

* implement Hardware::set_volume using pactl

* soundd: use Hardware::set_volume

* add sounddevice dependency

* sounddevice example

* simple micd

* cleanup

* remove this

* fix process config

* add to release files

* hardware: get sound input device

* no more offroad

* debug

* calculate volume from all measurements since last update

* use microphone noise level to update sound volume

* fix scale

* mute microphone during alerts

* log raw noise level

* hardware: reduce tici min volume

* improve scale

* add package

* clear measurements on muted

* change default to min volume and respond quicker

* fixes

Co-authored-by: Shane Smiskol <shane@smiskol.com>

* logarithmic scaling

* fix

* respond quicker

* fixes

* tweak scaling

* specify default device

* Revert "hardware: get sound input device"

This reverts commit 50f594f7a3bab005023482bc793147a8c8dae5d7.

* tuning

* forgot to update submaster

* tuning

* don't mute microphone, and clip measurement

* remove submaster

* fixes

* tuning

* implement Hardware::set_volume using pactl

* Revert "test changing sound volume"

This reverts commit 4bbd870746ec86d1c9871a6175def96cf7f751a6.

* draft

* draft

* calculate sound pressure level in dB

* fix setting

* faster filter

* start at initial value

* don't run command in background

* pactl: use default sink

* use sound pressure db

* tuning

* bump up max volume threshold

* update filter slower

* fix divide by zero

* bump cereal

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 108ff15f5d
2022-11-30 21:56:03 -08:00
Mitchell Goff
656788eb36 Compute zoom level and downsample image in map_renderer.cc (#26315)
* Automatically zoom to fixed scale in map_renderer.cc

* Always downsample in map_renderer

* Remove updateZoom function

* Added mapsd to process_config.py (commented out for now)
old-commit-hash: fcd6125deb
2022-11-01 19:16:37 -07:00
Adeeb Shihadeh
7176feffdc always enable rawgps on tici (#25987)
old-commit-hash: 9935a65115
2022-10-06 13:47:09 -07:00
Vivek Aithal
51d25b2011 Live torque (#25456)
* wip torqued

* add basic logic

* setup in manager

* check sanity and publish msg

* add first order filter to outputs

* wire up controlsd, and update gains

* rename intercept to offset

* add cloudlog, live values are not updated

* fix bugs, do not reset points for now

* fix crashes

* rename to main

* fix bugs, works offline

* fix float in cereal bug

* add latacc filter

* randomly choose points, approx for iid

* add variable decay

* local param to capnp instead of dict

* verify works in replay

* use torqued output in controlsd

* use in controlsd; use points from past routes

* controlsd bugfix

* filter before updating gains, needs to be replaced

* save all points to ensure smooth transition across routes, revert friction factor to 1.5

* add filters to prevent noisy low-speed data points; improve fit sanity

* add engaged buffer

* revert lat_acc thresh

* use paramsd realtime process config

* make latacc-to-torque generic, and overrideable

* move freq to 4Hz, avoid storing in np.array, don't publish points in the message

* float instead of np

* remove constant while storing pts

* rename slope, offset to lat_accet_factor, offset

* resolve issues

* use camelcase in all capnp params

* use camelcase everywhere

* reduce latacc threshold or sanity, add car_sane todo, save points properly

* add and check tag

* write param to disk at end of route

* remove args

* rebase op, cereal

* save on exit

* restore default handler

* cpu usage check

* add to process replay

* handle reset better, reduce unnecessary computation

* always publish raw values - useful for debug

* regen routes

* update refs

* checks on cache restore

* check tuning vals too

* clean that up

* reduce cpu usage

* reduce cpu usage by 75%

* cleanup

* optimize further

* handle reset condition better, don't put points in init, use only in corolla

* bump cereal after rebasing

* update refs

* Update common/params.cc

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

* remove unnecessary checks

* Update RELEASES.md

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 4fa62f1464
2022-09-19 15:19:26 -07:00
Robbe Derks
78881cf731 Pigeond (#25561)
* split out pigeond from boardd

* also want to turn off power

* fix manager calls

* move to sensord folder

* release files:

* add assistnow code

* no bare except

* add test script to test TTFF

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 13489d092e
2022-08-26 23:11:46 -07:00
Adeeb Shihadeh
b52244ef78 rawgps in CI (#25473)
old-commit-hash: 96f8d3acd5
2022-08-17 20:00:15 -07:00
Willem Melching
0c2afda822 enable laikad (#25013)
* enable laikad

* increase logprint for onroad test
old-commit-hash: cdc7a6dbea
2022-07-01 08:26:41 -07:00
Adeeb Shihadeh
d9d83b0225 Move camerad to system/ (#24836)
* mv camerad

* add hardware symlink

* fix unit tests
old-commit-hash: 6123ab3d1c
2022-06-19 14:43:49 -07:00
Gijs Koning
226edb4918 laikad: fixes to run on device (#24879)
* Always run laikad on device!

* Update laika

* Update laika

* Fix gps week and time of week in msg

* Reset kalman filter if pos_fix or last_known_position

* put behind file

* move pr parsing into common file

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: dc98511b7a
2022-06-16 17:45:08 +02:00
Adeeb Shihadeh
3c48bc47b7 Move a bunch of stuff to system/ part 3 (#24829)
* move swaglog.py

* timezoned

* logmessaged

* version.py

* fix linter
old-commit-hash: 0fce5d9045
2022-06-11 23:19:27 -07:00
Adeeb Shihadeh
9a45a3b99b Move selfdrive/hardware/ to system/ (#24725)
* move hardware to system/

* fix mypy
old-commit-hash: 1139fe507b
2022-06-11 16:38:24 -07:00
Adeeb Shihadeh
b249f40f0c move clocksd to system/ (#24761)
old-commit-hash: ca682b389d
2022-06-06 13:27:45 -07:00
Adeeb Shihadeh
3dd10e51e1 Create system/ for generic services (#24717)
* Create system/ for generic services

* logcatd joins the party

* fix those up
old-commit-hash: afd16b2ade
2022-06-02 17:02:25 -07:00
Willem Melching
753045c73d less TICI when not needed (#24698)
* less TICI when not needed

* fix process replay

* move reading voltages into hw abstraction layer

* Update selfdrive/hardware/tici/hardware.h

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

* Update selfdrive/hardware/hw.h

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

* Update selfdrive/hardware/base.h

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

* rename init function

* Update selfdrive/athena/athenad.py

Co-authored-by: Robbe Derks <robbe.derks@gmail.com>

* Update selfdrive/boardd/boardd.cc

* Apply suggestions from code review

* Update selfdrive/thermald/thermald.py

* update ref

* fix alert width if all cameras are bad

* add ecam to test_loggerd

* bump cereal

* bump cereal

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Robbe Derks <robbe.derks@gmail.com>
old-commit-hash: f49a9c9fd2
2022-06-02 15:20:51 +02:00
Willem Melching
2c343d2fe3 navd: rewrite in python (#24621)
* navd: start python rewrite

* use enum

* send empty instruction packet

* parse banner

* cleanup

* switch to coordinate class

* add segment transition logic

* add recompute logic

* cleanup old navd code

* split out helpers

* cleanup release files

* fix typo

* fix docs

* add typing to helpers

* small fixes

* move outside of ui

* get last pos from param

* add ui restart detection

* check running

* send route

* set navInstruction to invalid with no active route

* whitespace

* do not overwrite response and use ratekeeper

* reuse params object

* remove navd exception
old-commit-hash: e72d6b5689
2022-05-30 15:15:51 +02:00
Willem Melching
e45155f592 sim no encoderd, move to BLOCK env variable
old-commit-hash: 85b07bf3e8
2022-05-30 11:49:15 +02:00
Gijs Koning
3947af88e8 Remove encoderd service from PC. Fixes Sim (#24676)
* Disable encoderd completely in sim
old-commit-hash: 44bffc1b3b
2022-05-30 02:36:11 -07:00
George Hotz
a053d070be encoderd: enable (#24492)
* enable encoderd

* correct enable line

* fix loggerd tests

* fix power draw and cpu tests

* correct cpu for encoderd

* fix a bug, video_writer is shared

* fix issue with not recording dcam

* add recording state

* wooo tests pass. encode id keeps counting

* core 3

* loggerd then encoderd

* stop loggerd first

* core 3 always online

* see the camera when we see encoder packet

* encoderd on small core uses 37%

* remove encoder logic from loggerd

* delete unit test that doesn't really make sense anymore

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 94b9972eb7
2022-05-13 17:56:02 -07:00
Dylan Herman
2dfba97175 add mypy check for return-any (#24379)
* add mypy check for return-any

* remove unused import

* typing

* remove unnecessary variable typing

* cleanup

* cleanup

* bump submodules

* small fixes

* only a problem on mac

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: d2eef1955c
2022-05-12 14:59:00 +02:00
Adeeb Shihadeh
5e42de3e36 body: opt-out logging (#24423)
* body: opt-out logging

* wait a bit

* little better

* fix that too

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 2466233b1c
2022-05-04 14:57:39 -07:00
Adeeb Shihadeh
9424f67e19 body: opt-in logging (#24416)
old-commit-hash: 670126cbf1
2022-05-03 23:46:59 -07:00
Adeeb Shihadeh
d097c4df26 manager: start process by callback (#24417)
old-commit-hash: cdf6338388
2022-05-03 23:30:35 -07:00
Willem Melching
b9fb3cb647 updated: only run offroad & disable automatic git garbage collection (#24269)
* updated: disable automatic git garbage collection

* set gc.autoDetach false

* add gc cloudlogs

* trigger updated

* handle exception

* trigger updated

* only while offroad

* no trigger needed

* trigger updated

* check if git gc was interrupted

* trigger updated

* dont set params when shutting down

* let manager clear params

* no offroad check anymore

* event is nicer to parse

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 3063c70ff1
2022-04-22 14:43:44 -07:00
Willem Melching
373ac5ce3d manager: cleanup ensure_running (#24270)
* manager: cleanup ensure_running

* make notcar a blocking condition

* invert last conditions

* duplicate

* always run daemon process

* comment

* typo

* make notcar like driverview
old-commit-hash: 207df4742f
2022-04-21 16:23:39 +02:00
Adeeb Shihadeh
ae71ecf8b8 manager: start bridge and web joystick for notcars (#24212)
* manager: start bridge and web joystick for notcars

* fix that

* bump cereal

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 76a8338197
2022-04-19 14:13:05 -07:00
Adeeb Shihadeh
5a9644261f remove comma two support (#24248)
* remove comma two support

* cleanup release files

* little more

* more libs

* no more gralloc

* add snpe back
old-commit-hash: 5c48e7bc86
2022-04-18 17:55:23 -07:00
George Hotz
e929e32bc7 sensord: add support for Quectel raw gps (#24027)
* connecting to rawgps

* dumping rawfps packets

* this works, but it might be useless

* fix parsing

* parsing 0x1476

* compare

* compare better

* refactoring

* parsing and broadcasting GPS packet

* glonass support

* compare using submaster

* fix compare for glonass

* update cereal

* make linter happy

* other linter issue

* last mypy complaints

* add support for publishing gpsLocationExternal

* set flags to 1 to match ubloxd

* ready to ship

* qcomdiag

* use unused variables

* last one

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 1df3c86999
2022-03-24 23:07:26 -07:00
Adeeb Shihadeh
ec7f17d288 move pandad to boardd/ (#23958)
old-commit-hash: 8ac30fea24
2022-03-13 21:21:30 -07:00
Adeeb Shihadeh
2f87bde2ff Log android system shutdown to param (#23520)
* Log android system shutdown to param

* comment

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 610b99fd68
2022-01-13 22:40:35 -08:00
Robbe Derks
323febbf37 Statsd (#23413)
* device side of statsd

* need to start it

* enable in manager

* add sleep

* cleanup

* remove aggregates for now and standardize on industry terms

* manager needs main

* need to have a try/except

* atomic_write_on_fs_tmp does not work

* cleaner

* use dump

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

* one file at a time

* limit amount of files

* move to influx line protocol and cleanup

* needs to be a list

* fix timezone bug

* actually rate limit

* add to release

* normalized origin

* also log deviceType

* more stats

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 1b49ce6ec4
2022-01-10 15:21:48 +01:00
Adeeb Shihadeh
19b6dd15bd Revert "soundd: back to onroad only (#23236)"
This reverts commit 6709810ab7604e6fe996708278a816d13a6deb80.

old-commit-hash: c70fc7dbe5
2022-01-03 16:37:35 -08:00