Commit Graph

60 Commits

Author SHA1 Message Date
Adeeb Shihadeh
bc0aa1c598 manager: remove old unkillable process handling (#29209) 2023-08-01 22:18:58 -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
3e3c8b7ddf soundd: only run onroad (#28449) 2023-06-07 16:24:54 -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
6861c99991 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>
2023-01-14 23:06:09 -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
Cameron Clough
108ff15f5d 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>
2022-11-30 21:56:03 -08:00
Mitchell Goff
fcd6125deb 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)
2022-11-01 19:16:37 -07:00
Adeeb Shihadeh
9935a65115 always enable rawgps on tici (#25987) 2022-10-06 13:47:09 -07:00
Vivek Aithal
4fa62f1464 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>
2022-09-19 15:19:26 -07:00
Robbe Derks
13489d092e 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>
2022-08-26 23:11:46 -07:00
Adeeb Shihadeh
96f8d3acd5 rawgps in CI (#25473) 2022-08-17 20:00:15 -07:00
Willem Melching
cdc7a6dbea enable laikad (#25013)
* enable laikad

* increase logprint for onroad test
2022-07-01 08:26:41 -07:00
Adeeb Shihadeh
6123ab3d1c Move camerad to system/ (#24836)
* mv camerad

* add hardware symlink

* fix unit tests
2022-06-19 14:43:49 -07:00
Gijs Koning
dc98511b7a 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>
2022-06-16 17:45:08 +02:00
Adeeb Shihadeh
0fce5d9045 Move a bunch of stuff to system/ part 3 (#24829)
* move swaglog.py

* timezoned

* logmessaged

* version.py

* fix linter
2022-06-11 23:19:27 -07:00
Adeeb Shihadeh
1139fe507b Move selfdrive/hardware/ to system/ (#24725)
* move hardware to system/

* fix mypy
2022-06-11 16:38:24 -07:00
Adeeb Shihadeh
ca682b389d move clocksd to system/ (#24761) 2022-06-06 13:27:45 -07:00
Adeeb Shihadeh
afd16b2ade Create system/ for generic services (#24717)
* Create system/ for generic services

* logcatd joins the party

* fix those up
2022-06-02 17:02:25 -07:00
Willem Melching
f49a9c9fd2 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>
2022-06-02 15:20:51 +02:00
Willem Melching
e72d6b5689 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
2022-05-30 15:15:51 +02:00
Willem Melching
85b07bf3e8 sim no encoderd, move to BLOCK env variable 2022-05-30 11:49:15 +02:00
Gijs Koning
44bffc1b3b Remove encoderd service from PC. Fixes Sim (#24676)
* Disable encoderd completely in sim
2022-05-30 02:36:11 -07:00
George Hotz
94b9972eb7 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>
2022-05-13 17:56:02 -07:00
Dylan Herman
d2eef1955c 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>
2022-05-12 14:59:00 +02:00
Adeeb Shihadeh
2466233b1c 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>
2022-05-04 14:57:39 -07:00
Adeeb Shihadeh
670126cbf1 body: opt-in logging (#24416) 2022-05-03 23:46:59 -07:00
Adeeb Shihadeh
cdf6338388 manager: start process by callback (#24417) 2022-05-03 23:30:35 -07:00
Willem Melching
3063c70ff1 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>
2022-04-22 14:43:44 -07:00
Willem Melching
207df4742f 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
2022-04-21 16:23:39 +02:00
Adeeb Shihadeh
76a8338197 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>
2022-04-19 14:13:05 -07:00
Adeeb Shihadeh
5c48e7bc86 remove comma two support (#24248)
* remove comma two support

* cleanup release files

* little more

* more libs

* no more gralloc

* add snpe back
2022-04-18 17:55:23 -07:00
George Hotz
1df3c86999 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>
2022-03-24 23:07:26 -07:00
Adeeb Shihadeh
8ac30fea24 move pandad to boardd/ (#23958) 2022-03-13 21:21:30 -07:00
Adeeb Shihadeh
610b99fd68 Log android system shutdown to param (#23520)
* Log android system shutdown to param

* comment

Co-authored-by: Comma Device <device@comma.ai>
2022-01-13 22:40:35 -08:00
Robbe Derks
1b49ce6ec4 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>
2022-01-10 15:21:48 +01:00
Adeeb Shihadeh
c70fc7dbe5 Revert "soundd: back to onroad only (#23236)"
This reverts commit 3bdb445c84.
2022-01-03 16:37:35 -08:00
Adeeb Shihadeh
3bdb445c84 soundd: back to onroad only (#23236) 2021-12-15 14:29:32 -08:00
Adeeb Shihadeh
ed8e6f857c soundd: configure as persistent process (#22878)
* soundd: configure as persistent process

* update c2 test

* fix that

* little more

Co-authored-by: Comma Device <device@comma.ai>
2021-11-12 15:04:57 -08:00
Dean Lee
797bb1acb0 soundd: misc cleanup + tests (#22796)
* pass AudibleAlert to setAlert

* apply reviews

* remove trailing underscore

* add current_alert_type

* common function get_alert

* same freq as ui

* small cleanup

* setvolumne on change

* static Alert::get

* test_sounds

* remove old test files

* loop twice

* assert loopsRemaining

* assert stop

* init to min_volumne

* Revert "remove old test files"

This reverts commit 12e8bfefae1ae7f8649d3eda1e4126ff8eb1fe17.

* move to ui/soundd

* move test to tests/test_sound.cc

* remove old tests

* cleanup

* lower volume

* Revert "remove old tests"

This reverts commit e6bb12abfa3d5cd0aa8986d2b8da0b1edc7ea31b.

* return Alert

* cleanup

* remove #include <optional>

* cleanup .gitignore

* revert to std::optional

* Revert "revert to std::optional"

This reverts commit a66291c51f3a846652837cc4a43d5d60dd81896b.

* cleanup

* remove volume check

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-11-09 14:18:29 -08:00
Willem Melching
bef686f275 Move navigation into separate daemon (#22767)
* Add navd folder

* prints route instructions to console

* broadcast NavInstuction without lanes

* show basic instructions and eta

* parse out lane info

* use swaglog

* clip distance on ui side

* draw lane directions

* show route

* add to process config

* add to release files

* small cleanup

* show route without gps

* pop open map on initial route

* fix error messages around no gps

* done

* make persistent process

* handle end of route

* clear route on offroad

* only one timer

* fix layout hacks

* explicit rendering at 20Hz
2021-11-04 14:32:32 +01:00
Adeeb Shihadeh
c8ca56dddd android health daemon (#21965)
* androidd

* three strikes

* better logging

* persistent

* add to release files

* cleanup

* no cpu usage

* colon

Co-authored-by: Comma Device <device@comma.ai>
2021-08-19 16:00:05 -07:00
Adeeb Shihadeh
8aafbc78f6 add that back 2021-08-06 15:48:16 -07:00
Harald Schafer
fd53169ade Revert "add boardd as a managed process for tests"
This reverts commit fcae199723.
2021-08-06 15:20:32 -07:00
Adeeb Shihadeh
fcae199723 add boardd as a managed process for tests 2021-08-06 11:47:30 -07:00