Commit Graph

346 Commits

Author SHA1 Message Date
Gijs Koning 954559f01d Laikad: Fix getting covariances for pos and velocity (#25084)
* Fix getting covariances for pos and velocity

* ref commit
old-commit-hash: cf862b6576a8b3f66e26d38080a1c8eec00f0793
2022-07-08 10:03:42 -07:00
Willem Melching 1c8af02e54 laikad: add residual threshold for pos_fix (#25082)
* laikad: add residual threshold for pos_fix

* update ref

* update test
old-commit-hash: 7a4c33795a12eefff4c3e5c311f40eae2cf3506b
2022-07-08 09:20:16 -07:00
Gijs Koning c64a61e652 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
old-commit-hash: eaf7eb42784732136e52cd031035e9c5ab520e6e
2022-07-07 04:06:51 -07:00
Gijs Koning 6e0a530bae laikad: Filter unwanted pseudoranges (#25051)
Filter unwanted pseudoranges
old-commit-hash: b88d7c89fae448068aeaca65706d99aa145c8a74
2022-07-06 10:01:19 -07:00
Gijs Koning 27e8adbbce Laikad: Allow fetching orbits every minute (#25016)
* Allow fetching orbits every minute

* Small cleanup
old-commit-hash: 8d6799d95a0a0ab9b2b0bc4ed6998abf6cabf266
2022-07-01 08:44:10 -07:00
Gijs Koning 518524641f Laikad: dont log when filter is not initialized
old-commit-hash: f10283072e4519ad95566dd0d54dbc7f52566f6d
2022-07-01 16:51:07 +02:00
Gijs Koning 02ee2fd12d 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
old-commit-hash: 20ccfed9c1d75de2a589294a5407e15304fd3f4a
2022-07-01 07:43:36 -07:00
HaraldSchafer fa85de9f8b Full localizer: Use standard naming conventions (#25007)
Use standard naming conventions
old-commit-hash: dd43ae2856e144ec13eff462556d8e681aa57789
2022-06-30 14:49:17 -07:00
Gijs Koning 76aaef497b 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
old-commit-hash: c49f997be505760a18e85a241e6d45b98952c894
2022-06-30 08:39:12 -07:00
Willem Melching a643c2f597 laikad: use cython filter (#24983)
use cython filter
old-commit-hash: 005bc44df692acb3389924d362f5b761987c7c9d
2022-06-28 14:29:41 +02:00
Willem Melching 0071d28b7b 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>
old-commit-hash: 3823f55476b56fd3db0afe686b1d2f3d508817bc
2022-06-28 13:43:15 +02:00
Gijs Koning 6a83611df2 Update rednose: use EKF_sym_pyx (#24978)
* Update rednose

* Update rednose

* cleanup
old-commit-hash: fdc22554b8c2a2e4b9e0df91beddf469d735b399
2022-06-28 11:32:51 +02:00
Willem Melching 88a90035cf 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.
old-commit-hash: b95e68778271cccf558452686e022ae57f25a701
2022-06-27 21:31:54 +02:00
Willem Melching e7eeeea0f0 calibrationd: start faster by not waiting for carParams (#24976)
* calibrationd: start faster by not waiting for carParams

* fix process replay

* update ref
old-commit-hash: de0c12e5af0e550c194510a19253dd9100b1a9f7
2022-06-27 15:34:36 +02:00
Gijs Koning a5fa349427 Laikad: minor refactor (#24956)
extract code to get_est_pos func
old-commit-hash: b854e67e91105da7301936aab8fd55f94dd46fbb
2022-06-24 17:56:33 +02:00
Gijs Koning 5494622601 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
old-commit-hash: 1c4b145aa4d85b7107254be6618592781ff7323e
2022-06-20 14:24:11 +02:00
Gijs Koning fc062222d4 Cast gpstimeofweek to int
old-commit-hash: d4886b2c2995db88d9bc9f7d7cf3f7cb9def5b12
2022-06-16 19:41:51 +02: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: dc98511b7a7092e969237655b6e08e4fa857106d
2022-06-16 17:45:08 +02:00
Gijs Koning 4b338d69db Laikad: More logging and use last_pos_fix for correcting (#24868)
Use last available pos_fix for correcting measurements.
Improve logging measurements
old-commit-hash: 5958e78037e468795e0db8d42d5209e1e41aec18
2022-06-16 06:21:33 -07:00
Willem Melching c9e3c42e6c laikad: calc_pos_fix numpy implementation (#24865)
* Replace posfix with gauss newton method

* Cleanup

* Check if glonass is in the list

* Fix

* also return residual

* Add residuals

* Update selfdrive/locationd/laikad.py

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

* Cleanup

Co-authored-by: Gijs Koning <gijs-koning@live.nl>
old-commit-hash: fa4f017bbe6c117913ec2327e9129c70b3e47223
2022-06-15 18:03:15 +02:00
Gijs Koning 36c48c1683 Laikad: Remove bearingDeg from message (#24864)
* Remove bearingDeg from message.

* Push cereal

* Commit cereal
old-commit-hash: 9e3d0e3c9cea4dcf2da10801aad041b1dd65cccb
2022-06-15 05:00:27 -07:00
Gijs Koning 61dcb8729c Laikad: Cache orbit and nav data (#24831)
* Cache orbit and nav data

* Cleanup

* Cleanup

* Use ProcessPoolExecutor to fetch orbits

* update laika repo

* Minor

* Create json de/serializers
Save cache only 1 minute at max

* Update laika repo

* Speed up json by caching json in ephemeris class

* Update laika

* Fix test

* Use constant
old-commit-hash: c3fa9151f39994984b60a19cdd7425dba73ec2fc
2022-06-15 02:32:07 -07:00
Gijs Koning e03eddea87 Laikad: process executor to fetch orbits (#24843)
* Use ProcessPoolExecutor to fetch orbits

* update laika repo

* Minor
old-commit-hash: a2d2378ee147f2db59aecd3401677cb2427d1ced
2022-06-13 05:02:31 -07:00
Gijs Koning 11033eba53 Laikad: Use filter for correcting measurements (#24824)
* Update laikad.

* Update log error
old-commit-hash: 724b322909152d58f626b6e76fd34d7d03d67250
2022-06-13 02:45:35 -07: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: 0fce5d90459b77bf2cfa70f55f322f0e1fb8d01c
2022-06-11 23:19:27 -07:00
Gijs Koning 735a7770dc LaikaD: Fix offline handling (#24781)
* Test handling no internet correctly.

* Clean

* Comment

* remove del
old-commit-hash: a9bdc792a184d191824d2ec089658eb3a96f1e45
2022-06-08 07:33:05 -07:00
Gijs Koning 8bbdb79626 Laikad: kill process correctly. Fixes CI (#24780)
Kill process correctly
old-commit-hash: 45c43f9c8719efc300a0cb373f1dc57e0abe3ece
2022-06-08 03:32:22 -07:00
Gijs Koning 2fabc9d509 Laikad: Use process for parsing orbits (#24769)
* Use Process instead of Thread to fetch orbits

* small refactor

* Cleanup
old-commit-hash: e7234e22b4d11cc8f349d02855df9b3414096c0d
2022-06-07 20:55:39 +02:00
Gijs Koning 7bf243b61e Laikad: cleanup fetching orbits (#24759)
* Seperate prediction orbits from regular observation orbits and download them efficient

* Cleanup

* clean and update laika

* Fix test

* Fix test

* Fix checking pos fix

* space
old-commit-hash: 8d8055f00f11fcdf0a8a235de5218d9c2fd2f5ad
2022-06-07 03:25:58 -07:00
Gijs Koning 9771eebb62 Laikad: Fetch orbit data in thread (#24654)
* Add fetching orbits thread

* Use ephemeris type enum. Send list of std floats.
Speed up parsing orbit data by skipping redundant old data

* Remove Glonass from supported constellation for now

* Fix latest time msg

* Add small laika update

* Fix
old-commit-hash: 7df54792d8c04d842d44536723edb7b8370c47a1
2022-06-04 09:25:20 +02:00
Gijs Koning 22e1157a5a Fix test_laikad in master (#24734)
* Use Livelocationkalman measurement struct

* Revert laika repo and fix time gap
old-commit-hash: ad04585c35afdc885ca3c24c066e5801c25d2bc7
2022-06-03 03:12:31 -07:00
Gijs Koning 6a53db981b Simulator: Speed up process by removing second camera (#24679)
* simulator: support running wide camera only

* proper frame id

* use param name that makes more sense

* do some cleanup

* Update tools/sim/bridge.py

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: b5aed2bf6781cd4d74d28f6f44d24737ec08f0db
2022-05-30 15:25:07 +02:00
Gijs Koning 807803afbe Remove scipy usage from laikad (#24652)
Remove scipy
old-commit-hash: 65056b77c22334b4be727151732bf2a76f9b780d
2022-05-25 17:15:22 +02:00
Gijs Koning 8976820211 Add ephemeris parsing to laikad (#24642)
* Always send valid messages

* Use ephemeris and move astrodog in laikad

* improve test

* Always correct measurements

* Cleanup

* Fix test

* Update laika
old-commit-hash: a51aaaf1970fa864a8a2de7c59abd1db277c123a
2022-05-25 06:26:58 -07:00
Shane Smiskol cb11e4b43b SubMaster: support for polling in C++ (#24602)
* poll when sm.update isn't 0

* bump cereal

* poll modelV2 in UI

* fix driverview

* need to update here

* empty list means poll all

revert

* Revert "poll modelV2 in UI"

This reverts commit 82aac96a1ffc64eb79b07817451b76e6924a9812.

* Revert "fix driverview"

This reverts commit 074ee10f177cf7c99f8201a85904e01d40adbe6d.

* poll all
old-commit-hash: e6da217813ecc58bedd3f92d1c905e13409ea79a
2022-05-20 15:00:28 -07:00
Gijs Koning e72a8d9330 Add gnss kalman filter to laikad (#24578)
* Add gnss kalman filter to laikad

* Fix analysis

* Fix analysis

* Update laika

* Refactor a bit

* cleanup, improve unit test

* Also commit test

* fix

* Always return messages. Use Measurement struct that contains std and valid keys

* Push cereal

* Change prints to cloudlog

* Always send valid messages

* Only send gnssMeasurement msg when measurementReport type
old-commit-hash: ef97329c0e825d477577bf27cbaf772753f077ca
2022-05-20 03:21:17 -07:00
Adeeb Shihadeh f4675fc260 Merge common/ and selfdrive/common (#24556)
* Merge common/ and selfdrive/common

* fix that

* fix version

* fix unit tests
old-commit-hash: cb8885cffb313bea258c012c3026461a22bf8135
2022-05-18 14:11:57 -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: d2eef1955c777ef6110c7a74d2a9ca9e4e1d958c
2022-05-12 14:59:00 +02:00
grekiki 7cd23af9b1 Mypy fixes for --check-untyped-defs (#24372)
more type fixes
old-commit-hash: 17e33978cdd9322918e9d5d388f7fa47aa30e9b7
2022-05-12 14:08:11 +02:00
Gijs Koning d849330ca1 Bump laika (#24454)
* Fix after laika repo changes

* Update laika
old-commit-hash: f7c2eefad9897830bf7bce290dec1dfc7d97e1d2
2022-05-09 04:05:08 -07:00
Gijs Koning 0010b565f5 Test gnssUblox message processing (#24404)
* Add simple test for processing ublox messages

* Add simple test for processing ublox messages

* Update selfdrive/locationd/test/test_ublox_processing.py

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

* Update

* Push laika ref

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: e6f9f12d1c9faae8f718306bcd2862278a083351
2022-05-06 06:44:38 -07:00
Gijs Koning c082f26d63 Laikad: the basics for ublox msg processing (#24359)
* Add laikad that receives ublox messages and publishes corrected measurements and position fix

* types

* cleanup

* laikad version 1 with uncorrected measurements

* push

* Fix glonass frequency and delete redundant test

* Update after cereal and cleanup

* Add test, fix laikad and remove process replay for now

* update laika

* add hatanaka to packages. Used to decompress orbit data

* Fix pip
old-commit-hash: b64fe6e339c8b8b3f5016a9c58b553c91abc5bdf
2022-05-06 04:41:14 -07:00
Adeeb Shihadeh 9b9d332a54 paramsd: fix variable cpu usage (#24281)
* paramsd: fix variable cpu usage

* fix that

* increase that a bit
old-commit-hash: f7c2b8b46e87f9f32eaeb5a11d20d3df24fe96e4
2022-04-20 14:08:52 -07:00
Adeeb Shihadeh b57808e650 paramsd: use real logMonoTime (#24279)
old-commit-hash: 4c9020863f156e98702adf073a018b3ca71f4dbe
2022-04-20 13:57:15 -07:00
HaraldSchafer 6bd1706b52 Offline localizer: accept addition camera (#24266)
* Offline localizer: add option for additional camera

* add names

* fix some bugs

* Wide ORB features are less accurate

* add comment
old-commit-hash: a762567de9de52aa6e98818b44a140de6123e6fc
2022-04-19 22:45:35 -07:00
HaraldSchafer b0444b39d2 Body cleanup + 100Hz locationd (#24168)
* use PID

* 100hz on the branch

* Better defaults

* fix int clip

* More cleanup

* Fix pid comments

* only notcar gets 100hz

* cleanup

* fix tests

* ignore

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: f54e724b5dd8b95e03dd4f46676c5e854bafaea6
2022-04-09 15:22:29 -07:00
Willem Melching 871ecc451b commIssueAvgFreq: separate alert for avg freq check (#24150)
* commIssueAvgFreq: separate alert for avg freq check

* bump cereal

* bump cereal

* bump cereal

* freq_ok separate from alive

* bump cereal to master

* update_ref

* fix profiler
old-commit-hash: eaa581921161b2643b10ad72da0708dff14367aa
2022-04-06 16:43:32 -07:00
Adeeb Shihadeh 56bfed0c15 calibrationd: support for not cars (#24115)
* calibrationd: support for not cars

* update refs
old-commit-hash: 7dffd0ac0bd05379edd56dcdde1ac976ffa17137
2022-04-04 17:04:15 -07:00
Adeeb Shihadeh bd71c594a2 pylint: enforce indentation (W0311) (#24039)
* pylint: enforce indentation (W0311)

* few more
old-commit-hash: 8af20af66ddaa6bc06d7f72f9134aa9afeed3ed8
2022-03-24 23:23:29 -07:00
Dylan Herman c6f626d116 calibrationd: add function typing (#24018)
old-commit-hash: 9f1c663ae222a8e2f9e0c7c83d04a59ae4b46918
2022-03-23 00:28:36 -07:00