Commit Graph

282 Commits

Author SHA1 Message Date
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
Gijs Koning
f7c2eefad9 Bump laika (#24454)
* Fix after laika repo changes

* Update laika
2022-05-09 04:05:08 -07:00
Gijs Koning
e6f9f12d1c 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>
2022-05-06 06:44:38 -07:00
Gijs Koning
b64fe6e339 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
2022-05-06 04:41:14 -07:00
Adeeb Shihadeh
f7c2b8b46e paramsd: fix variable cpu usage (#24281)
* paramsd: fix variable cpu usage

* fix that

* increase that a bit
2022-04-20 14:08:52 -07:00
Adeeb Shihadeh
4c9020863f paramsd: use real logMonoTime (#24279) 2022-04-20 13:57:15 -07:00
HaraldSchafer
a762567de9 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
2022-04-19 22:45:35 -07:00
HaraldSchafer
f54e724b5d 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>
2022-04-09 15:22:29 -07:00
Willem Melching
eaa5819211 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
2022-04-06 16:43:32 -07:00
Adeeb Shihadeh
7dffd0ac0b calibrationd: support for not cars (#24115)
* calibrationd: support for not cars

* update refs
2022-04-04 17:04:15 -07:00
Adeeb Shihadeh
8af20af66d pylint: enforce indentation (W0311) (#24039)
* pylint: enforce indentation (W0311)

* few more
2022-03-24 23:23:29 -07:00
Dylan Herman
9f1c663ae2 calibrationd: add function typing (#24018) 2022-03-23 00:28:36 -07:00
Dylan Herman
604fefa9b1 calibrationd: remove unused arg in function (#24004) 2022-03-21 20:03:32 -07:00
Vivek Aithal
dfc1292614 locationd: Commissue fix (#23951)
* check allAliveAndValid only at filter init

* revert cereal and bugfix test

* rename filterValid to filterInitialized

* bump cereal

* correct err

* update refs
2022-03-15 14:40:29 -07:00
Adeeb Shihadeh
5c3f3e44bc break up selfdrive.config (#23959)
* break up selfdrive.config

* add to release files

* fix import order
2022-03-13 21:42:39 -07:00
Willem Melching
f4c822e8c6 locationd: fix writing LastGPSPosition interval (#23895) 2022-03-02 15:16:19 +01:00
Vivek Aithal
7e6903b58f locationd, paramsd: Check conditions before updating kalman filters (#23789)
* update filters only when all messages are alivbe and valid

* update message valid and fix unit test

* update refs

* move check outside loop

* modify fake message fn in test

* deprecate inputsOK and resolve PR comments

* avoid double looped list comprehension

* follow import conventions

* modify paramsd valid to only be invalid in case of commIssue

* update refs
2022-03-02 01:01:29 -08:00
Vivek Aithal
8a2cbfe00b paramsd: fix VehicleModelInvalid errors (#23726)
* bound steerratio, stiffness std

* remove start steer_ratio limits after looking at data

* reduce sf obs noise

* update refs

* update refs

* add comment explaining change
2022-02-09 17:37:28 -08:00
Adeeb Shihadeh
8a0fc850b4 give calibrationd rt priority (#23725) 2022-02-07 21:05:55 -08:00
Vivek Aithal
f808b174af use roll std from locationd (#23449)
* use roll std from locationd

* cleaner

* add todo

* new ref

Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
2022-01-12 21:37:09 -08:00
Dean Lee
e5f9af4a6e calibrationd: Don't repeatedly call get_valid_idxs() (#23473)
* optimize

* rpy_init should be np.array

* rename to rpys
2022-01-12 15:34:17 -08:00
Dean Lee
de572c3755 calibrationd: fix indentation (#23502) 2022-01-12 14:40:02 -08:00
Willem Melching
79577e4dca boardd: remove ublox timestamp logging (#23498)
* boardd: remove ublox timestamp logging

* more cleanup

* add cmath
2022-01-12 15:00:46 +01:00
Willem Melching
8444f8267d calibrationd: convert existing calibration to numpy (#23494)
* calibrationd: convert existing calibration to numpy

* use numpy functions
2022-01-11 15:25:01 +01:00
Dean Lee
35ec6ac1cb use ndarray.tolist to convert numpy array to float (#23485) 2022-01-11 14:34:47 +01:00
Dean Lee
f6c6e34ea3 calibrationd: remove extra comma (#23472) 2022-01-09 14:32:33 -08:00
Adeeb Shihadeh
1a6881edc6 skip falling device test 2022-01-06 14:05:13 -08:00
Adeeb Shihadeh
ef225e3e35 locationd: disable falling device detector (#23431) 2022-01-06 12:01:14 -08:00
Dean Lee
df7126b982 paramsd: follow capnp best practices (#23399) 2022-01-04 15:57:38 -08:00
George Hotz
dc96d4bee7 Add More Types for mypy (#23268)
* mypy passes

* a few more

* a few in manager

* more types, will lint

* more

* simple types

* events type

* Update selfdrive/thermald/thermald.py

* Apply suggestions from code review

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-12-28 18:07:00 +01:00
Ewout ter Hoeven
332f568a82 Pyupgrade 3.6: Update syntax with Python 3.6+ features (#23305)
Updated Python code with Python 3.6+ features:
- utf-8 encoding is now the default (PEP 3120)
- Replace list comprehensions by Generator Expressions (PEP 289)
- Replace yield loop by yield from (PEP 380)
- Remove the (object) subclass when defining a class
- Replace the IOError alias by OSError (PEP 3151)
- Define sets with curly braces {} instead of set()
- Remove "r" parameter from open function, which is default

Co-Authored-By: Adeeb Shihadeh <8762862+adeebshihadeh@users.noreply.github.com>
Co-Authored-By: GregorKikelj <96022003+GregorKikelj@users.noreply.github.com>

Co-authored-by: Adeeb Shihadeh <8762862+adeebshihadeh@users.noreply.github.com>
Co-authored-by: GregorKikelj <96022003+GregorKikelj@users.noreply.github.com>
2021-12-24 11:18:39 -08:00
HaraldSchafer
cf466222f6 Road Roll Compensation Rebased (#23251)
* first commit

* update refs
2021-12-16 17:34:12 -08:00
HaraldSchafer
cd190dc85d Calibrationd: check size of valid_blocks without current (#23223) 2021-12-14 15:14:14 -08:00
HaraldSchafer
40dcc63823 Calibrationd: don't use noisy current block (#23222) 2021-12-14 14:09:38 -08:00
HaraldSchafer
837823ff58 Revert "Dont use erratic current block (#23211)" (#23221)
This reverts commit 19335bb6a4.
2021-12-14 13:59:39 -08:00
HaraldSchafer
19335bb6a4 Dont use erratic current block (#23211) 2021-12-14 13:58:42 -08:00
Dean Lee
4aa291c406 Use std::unique_ptr to manage memory (#23168)
* use unique_ptr

* trigger ci

* move down loggerdstate
2021-12-13 14:16:53 +01:00
Dean Lee
9decd3d8a2 util: move all functions into util namespace (#23203) 2021-12-12 14:42:23 -08:00
Dean Lee
48963d4b24 locationd_thread: fix possible dangling reference to params (#23156) 2021-12-08 17:46:18 +01:00
Robbe Derks
bb7208f4c3 add check for restoring almanac, and clear like suggested in the datasheet (#23153)
Co-authored-by: Comma Device <device@comma.ai>
2021-12-08 14:13:56 +01:00
Vivek Aithal
64eb5b0da4 locationd: cleanup (#23088)
* remove dead code, avoid indexing by value in locationd

* remove dead states in live_kf
2021-12-01 00:09:00 -08:00
Vivek Aithal
b57f55088e add a note in loc_kf (#23082) 2021-11-30 10:51:32 -08:00
Vivek Aithal
5040427cb7 Mesh3D: Add accelerometer bias to loc_kf (#22880)
* add accel-bias to mesh3d

* remove acc scale
2021-11-29 19:30:14 -08:00
Vivek Aithal
8b6a147583 locationd: Fix Nav localization reliability (#22959)
* modify reset logic

* remove debug statements

* use ecef pos and vel covariances during reset

* reset orientations initialized to 0,0,GPSbearing

* refactor nav fix

* add fake gps observations to control ecef pos and ecef vel std

* replace fake_P with individual fake cov

* set gps mode flag

* add gps invalid flag names

* update refs

* more accurate gps accuracy check + update refs
2021-11-24 15:24:25 -08:00
Vivek Aithal
94d59314e2 Revert ecef std until real fix (#22982)
* too low

* update refs

Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
2021-11-19 12:49:32 -08:00
Vivek Aithal
534bf697ee locationd : Acceleration Bias in locationd (#22879)
* add accel bias to filter for offline calculation

* bugfix acc bias in live_kf

* add no_accel obsertvation

* increase initial certainty of acc-bias and reduce PN

* increase initial certainty of acc-bias and reduce PN

* increase accel bias PN

* increase obs noise for no_accel observation

* style fixes

* update refs
2021-11-12 15:55:16 -08:00
Vivek Aithal
c7be73b826 locationd: Set ECEF_POS valid flag to false if in no-gps mode (#22857)
* set ECEF_POS valid flag to false if in no-gps mode

* modify valid flag for all ecef states before gps

* add calibrated valid when no gps

* update refs

* remove extra whitespace

* add invalid flag to all NED values pre gps

* update refs

* update correct refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-11-11 21:34:17 -08:00
Vivek Aithal
5c810a45b0 locationd: Make live_kf robust to no GPS (#22774)
* add no gps observations

* use correct ecef_location, orientation vals and stds for nogps states

* remove earth radius obs

* move initial loc to the ocean

* remove unnecessary changes

* update refs
2021-11-09 14:45:47 -08:00
Mayfield
5246f0231e enable wshadow (#22756)
* enable wshadow (#22714)

* fix replay

* more build fixes

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-11-02 17:08:53 +01:00