Commit Graph

350 Commits

Author SHA1 Message Date
Kurt Nistelberger
981532f0c3 Laikad preperation (#26800)
* laikad update, renaming

* update locationd

* address PR comments

* draft to fix replay

* fix process relay to allow no response for messages

* bump cereal

* update process replay ref commit

* move laikad helpers to laika

* fix ublox test

* update refs

* add proper qcom replay support

* fix gnss support if both is available

* update refs

* move laika back to master

* move cereal back to master

Co-authored-by: Kurt Nistelberger <kurt.nistelberger@gmail.com>
2022-12-29 16:56:35 -08:00
Vivek Aithal
d4fd0c3c87 [torqued] Make torqued work on Hyundai Tucson (#26511)
* changes to get offline values

* set tucon values

* move to params.yaml
2022-11-15 18:41:43 -08:00
Kurt Nistelberger
4eda53cef2 add laikad comment 2022-11-15 16:41:27 -08:00
Vivek Aithal
fbf2f3816b [locationd] Add input checks (#26460)
* add input checks with same decay as reset_tracker

* add observation timings check

* typo

* bugfix

* improve offline locationd visibility

* sbugfix offline lld

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-11-14 15:02:26 -08:00
Vivek Aithal
81f6ebebaa [paramsd] Prevent low speed drifting (#26360)
* lower active speed for paramsd observations

* update refs
2022-11-04 01:32:29 -07:00
Kurt Nistelberger
aebb08e105 locationd: add gps sanity check for quectel gps (#26352)
* update check

* .

* .

* remove gps kf time check for gps ok

* upsi

* dont use gps_mode

* update refs

* Update selfdrive/locationd/locationd.cc

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

Co-authored-by: Kurt Nistelberger <kurt.nistelberger@gmail.com>
Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
2022-11-03 23:43:30 -07:00
HaraldSchafer
dbc30c053c UI: fade into wide camera (#26203)
* UI: fade into wide camera

* handle routes with no wide calib

* more cleanup

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-10-27 17:27:31 -07:00
Vivek Aithal
b158c016cb [torqued] Update offline values (#26261)
* add qlog mode to torqued

* update offline valujes from qlogs

* resollve comments

* update refs

* resolve comments
2022-10-27 16:34:11 -07:00
HaraldSchafer
15595fc859 Calibrationd: Calibrate wide from device (#26204)
* Use calibrator to stabilize wide transform

* Need array

* Needs init

* Needs to be arr

* publish mshg

* Check size

* Update ref

* fix calibration param read when no wide calib

* need self!
2022-10-24 20:17:05 -07:00
Bruce Wayne
75b7fd0a7d Revert "Use calibrator to stabilize wide transform (#26201)"
This reverts commit 42ef62e391.
2022-10-21 21:44:47 -07:00
HaraldSchafer
42ef62e391 Use calibrator to stabilize wide transform (#26201)
* Use calibrator to stabilize wide transform

* Need array

* Needs init

* Bump to master

* Needs to be arr

* publish mshg

* Check size

* Update ref
2022-10-21 20:30:48 -07:00
HaraldSchafer
b332441803 locationd: Fix GPS sensor times with fixed offsets (#25920)
* Rewind to qcom time

* Fix test

* Typo

* init unix_time fix

* add gps sensor_time_offsets

* remove all clocks code and add todo

* :emove clocks in unit test

* update refs

* update refs

Co-authored-by: nuwandavek <vivekaithal44@gmail.com>
2022-10-12 17:47:30 -07:00
HaraldSchafer
57a82ced28 rawgpsd: publish ephemerides (#25931)
* add svpoly parsing

* Publish poly

* add source check

* add safety check for invalid gpsWeek values

* address PR comments

* add qcom ephemeris source type

* bump cereal and laika

Co-authored-by: Kurt Nistelberger <kurt.nistelberger@gmail.com>
2022-10-07 17:27:09 -07:00
Adeeb Shihadeh
01d05f66fe auto-detect pigeon or quectel (#25991)
* auto-detect pigeon or quectel

* persistent

* fix sim

* fix process replay

* fix locationd unit tests

* fix that

Co-authored-by: Comma Device <device@comma.ai>
2022-10-06 16:46:15 -07:00
Vivek Aithal
ca746b0a18 Extend torqued (#25961)
* extend live torque to all hyundai and toyota cars

* update refs
2022-10-04 13:34:31 -07:00
Adeeb Shihadeh
5d33199905 sim: fix sensor freq and timestamps (#25937)
* sim: fix sensor freq and timestamps

* 100hz

* fix that too
2022-09-29 22:36:09 -07:00
Vivek Aithal
4bc175bb9c Live torque fix (#25868)
* fix np empty array quirk

* reset to offline values if saved values were not valid live

* edit cloudlog text
2022-09-29 16:36:43 -07:00
Kurt Nistelberger
29d3ed2ce6 Sensor events splitup (#25714)
* PoC of reading sensors via interrupts instead of polling

* add Gyro and draft for magn

* add more functionality to gpio.cc

* change LSM gyro to interrupt

* resolve rebase conflict

* update BMX accel interrupt impl

* add interrupt collector thread to fetch in parallel

* change get_event interface to return true on successful read

* update BMX gyro interrupt impl

* update gpio.h/.cc according to comments

* address comments, rename Edgetype enum

* Edgetype to EdgeType

* update sensor interrupt interface

* add error handling, and read fd on trigger

* avoid sending empty messages

* fix build

* use gpiochip

* less diff

* gpiochip on both edges, but skip falling edge if rising edge is detected

* init last_ts with 0

* update sensord testcases

* update sensord testsweet

* test for pipeline

* readd with_process

* add null check

* move tests update to seperate PR

* sensord: improve test coverage (#25683)

* update sensord-interrupt testsweet

* address review comments

* inc stddev threshold

* fix format string

* add version 0 check again

* relax strictness after c3 with bmx tests

* relax strictness after tests

Co-authored-by: Kurt Nistelberger <kurt.nistelberger@gmail.com>

* address PR comments

* fix typo

* remove 4ms limit, and skip first 0.5sec of data

* revert disable_interuppt change to destructor

* fix and remove timing skip

* make gpiochip generic

* sensord port

* change from sensorEvents to separated events

* fix gyro usage

* add splitted sensor tests

* modify debug script sensor_data_to_hist.py

* refactor get_event interface to remove sensorEvent message type

* update locationd to non sensorEvent usage

* tmp commit

* fix replay

* fix accelerometer type

* fix sensor to hist debug script

* update sensord tests to split events

* remove rebase artifacts

* port test_sensord.py

* small clean up

* change cereal to sensorEvents-splitup branch

* upate sensorEvents in regen

* fix route generation for splitted sensor events

* regen cleanUp from sensorEvents change

* .

* remove light and temp from locationd

* add generic init delay per sensor

* .

* update routes

* move bmx gyro/accel to its own channel

* adopt sensor tests to bmx channel

* remove rebase artifacts

* fix sensord test

* handle bmx not present

* add bmx sockets to regen

* .

* .

* code cleanUp

* .

* address PR comments

* address PR comments

* address PR comments

* lsm clean up

* readd sensorEvents

* rever regen.py

* .

* update replay refs

* move channels

* fix artifact

* bump cereal

* update refs

* fix timing issue

Co-authored-by: Bruce Wayne <batman@workstation-eu-intern2.eu.local>
Co-authored-by: gast04 <kurt.nistelberger@gmail.com>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-09-29 14:31:54 -07:00
Dean Lee
cdbb06d45d locationd: remove redundant break statements (#25873) 2022-09-22 10:41:47 -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
Adeeb Shihadeh
6590fb2b93 pre-commit: add codespell (#25571) 2022-08-30 11:20:55 -07:00
Adeeb Shihadeh
6334980949 laikad: fix cache path 2022-08-29 14:08:21 -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
90a4565eb2 params: make python and c++ API match (#25573)
* params: make python and c++ API match

* few more
2022-08-26 20:46:19 -07:00
HaraldSchafer
32201bbbbd Quectel unix timestamp (#25329)
* Use laika

* Fix bug

* Better timestamp name

* Better name

* bump cereal
2022-08-01 22:06:58 -07:00
HaraldSchafer
772b748689 Cleanup calibration code (#25119)
* First attempt

* worksish

* tests pass

* cleanup

* get rid of garbahe

* fix name

* Still used in xx

* add debug functions

* used

* Revert "used"

This reverts commit 276e8ebab06d2d4f0e9927ba32b7d8aca2bf88c3.

* Update ref
2022-08-01 20:35:14 -07:00
Vivek Aithal
e77dc1ab44 Lateral Acceleration Error alert (Sensor Invalid) (#25291)
* sensor flag in paramsd

* increase lateral acc err alert threshold

* add invalid sensor alert from paramsd

* update ref, bool before adding to msg

* account for sign difference in locationd and paramsd

* revert ref
2022-07-28 13:10:01 -07:00
HaraldSchafer
11da2804f6 Support quectel gps (#25299)
* qcom clock gets corrected randomly it seems

* Use quectel gps

* fix small laikad bugs

* Support both

* Support ublox and qcom clock model

* fix laikad test

* fix typo

* Back to original value

* More typos

Co-authored-by: Comma Device <device@comma.ai>
2022-07-28 10:56:59 -07:00
Gijs Koning
5ccc2b8921 Laikad: improve logging + posfix every 2 sec (#25184)
* Improve logging for pos fix and caching

* Set to debug
2022-07-15 13:18:52 +02:00
Gijs Koning
c7771d1783 Bump laika and catch Downloadfiles exception. 2022-07-14 11:49:27 +02:00
Gijs Koning
105afee4a2 Laikad: set cache dir to comma_download_cache (#25131)
* Cache downloads for process replay

* set cache dir permanent

* Create constant
2022-07-12 09:11:47 -07:00
Gijs Koning
cf862b6576 Laikad: Fix getting covariances for pos and velocity (#25084)
* Fix getting covariances for pos and velocity

* ref commit
2022-07-08 10:03:42 -07:00
Willem Melching
7a4c33795a laikad: add residual threshold for pos_fix (#25082)
* laikad: add residual threshold for pos_fix

* update ref

* update test
2022-07-08 09:20:16 -07:00
Gijs Koning
eaf7eb4278 Laikad: Use clocks for faster fetching orbits (#25060)
* Use clocks msg to for first fetch of orbits. Which is sent earlier than ublox msgs

* refactor last_fetch_orbits

* Add comment.
Add test

* increase timeout

* Add clocks to process replay
2022-07-07 04:06:51 -07:00
Gijs Koning
b88d7c89fa laikad: Filter unwanted pseudoranges (#25051)
Filter unwanted pseudoranges
2022-07-06 10:01:19 -07:00
Gijs Koning
8d6799d95a Laikad: Allow fetching orbits every minute (#25016)
* Allow fetching orbits every minute

* Small cleanup
2022-07-01 08:44:10 -07:00
Gijs Koning
f10283072e Laikad: dont log when filter is not initialized 2022-07-01 16:51:07 +02:00
Gijs Koning
20ccfed9c1 laikad: Improve logging, fix warning and more exception handling (#25005)
* change logs and add some debugging. Add test

* Less logging and better check for exceptions when parsing orbits

* Fix debug log and fix kf initialization
2022-07-01 07:43:36 -07:00
HaraldSchafer
dd43ae2856 Full localizer: Use standard naming conventions (#25007)
Use standard naming conventions
2022-06-30 14:49:17 -07:00
Gijs Koning
c49f997be5 Add laikadOffline subtest to process replay. (#24995)
* Add subtests to process replay.
Adds laikadOffline subtest

* Update cpp.

* Update ref

* Update ref again

* Update ref again

* update ref

* Fix disabling fetching orbits

* Add proc name to event exception

* update ref

* Update setup_env

* Fix offline test and update refs
2022-06-30 08:39:12 -07:00
Willem Melching
005bc44df6 laikad: use cython filter (#24983)
use cython filter
2022-06-28 14:29:41 +02:00
Willem Melching
3823f55476 add laikad to process replay (#24889)
* merge

* Fix closing process executor after fetching orbits

* cleanup

* Add ref commit and revert test_processes hack

* Fix

* Fix ref

* Fix test

* Temp

* Temp

* Trying

* Trying

* Cleanup and change test

* add ref commit

* remove print

* fix test getting stuck

* cleanup fetch_orbits

Co-authored-by: Gijs Koning <gijs-koning@live.nl>
2022-06-28 13:43:15 +02:00
Gijs Koning
fdc22554b8 Update rednose: use EKF_sym_pyx (#24978)
* Update rednose

* Update rednose

* cleanup
2022-06-28 11:32:51 +02:00
Willem Melching
b95e687782 split locationd and liblocationd tests (#24977)
* laikad: use cython version of gnss kf

* fix import error

* test liblocationd separate

* Revert "laikad: use cython version of gnss kf"

This reverts commit bdd769b9554e7e45e976dabd6595403943e864bb.
2022-06-27 21:31:54 +02:00
Willem Melching
de0c12e5af calibrationd: start faster by not waiting for carParams (#24976)
* calibrationd: start faster by not waiting for carParams

* fix process replay

* update ref
2022-06-27 15:34:36 +02:00
Gijs Koning
b854e67e91 Laikad: minor refactor (#24956)
extract code to get_est_pos func
2022-06-24 17:56:33 +02:00
Gijs Koning
1c4b145aa4 Improve laikad cpu usage. Less pos fix. Less local imports (#24887)
* Improve laikad cpu usage. Less pos fix. Not local imports

* Add laika to files_common

* Add laika to dockerfile sim

* Fix

* Fix

* undo
2022-06-20 14:24:11 +02:00
Gijs Koning
d4886b2c29 Cast gpstimeofweek to int 2022-06-16 19:41:51 +02: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
Gijs Koning
5958e78037 Laikad: More logging and use last_pos_fix for correcting (#24868)
Use last available pos_fix for correcting measurements.
Improve logging measurements
2022-06-16 06:21:33 -07:00