Commit Graph

330 Commits

Author SHA1 Message Date
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
Willem Melching
fa4f017bbe 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>
2022-06-15 18:03:15 +02:00
Gijs Koning
9e3d0e3c9c Laikad: Remove bearingDeg from message (#24864)
* Remove bearingDeg from message.

* Push cereal

* Commit cereal
2022-06-15 05:00:27 -07:00
Gijs Koning
c3fa9151f3 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
2022-06-15 02:32:07 -07:00
Gijs Koning
a2d2378ee1 Laikad: process executor to fetch orbits (#24843)
* Use ProcessPoolExecutor to fetch orbits

* update laika repo

* Minor
2022-06-13 05:02:31 -07:00
Gijs Koning
724b322909 Laikad: Use filter for correcting measurements (#24824)
* Update laikad.

* Update log error
2022-06-13 02:45:35 -07: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
Gijs Koning
a9bdc792a1 LaikaD: Fix offline handling (#24781)
* Test handling no internet correctly.

* Clean

* Comment

* remove del
2022-06-08 07:33:05 -07:00
Gijs Koning
45c43f9c87 Laikad: kill process correctly. Fixes CI (#24780)
Kill process correctly
2022-06-08 03:32:22 -07:00
Gijs Koning
e7234e22b4 Laikad: Use process for parsing orbits (#24769)
* Use Process instead of Thread to fetch orbits

* small refactor

* Cleanup
2022-06-07 20:55:39 +02:00
Gijs Koning
8d8055f00f 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
2022-06-07 03:25:58 -07:00
Gijs Koning
7df54792d8 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
2022-06-04 09:25:20 +02:00
Gijs Koning
ad04585c35 Fix test_laikad in master (#24734)
* Use Livelocationkalman measurement struct

* Revert laika repo and fix time gap
2022-06-03 03:12:31 -07:00
Gijs Koning
b5aed2bf67 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>
2022-05-30 15:25:07 +02:00
Gijs Koning
65056b77c2 Remove scipy usage from laikad (#24652)
Remove scipy
2022-05-25 17:15:22 +02:00
Gijs Koning
a51aaaf197 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
2022-05-25 06:26:58 -07:00
Shane Smiskol
e6da217813 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
2022-05-20 15:00:28 -07:00
Gijs Koning
ef97329c0e 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
2022-05-20 03:21:17 -07:00
Adeeb Shihadeh
cb8885cffb Merge common/ and selfdrive/common (#24556)
* Merge common/ and selfdrive/common

* fix that

* fix version

* fix unit tests
2022-05-18 14:11:57 -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
grekiki
17e33978cd Mypy fixes for --check-untyped-defs (#24372)
more type fixes
2022-05-12 14:08:11 +02:00