Commit Graph

304 Commits

Author SHA1 Message Date
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
Dylan Herman f8b18e134d calibrationd: remove unused arg in function (#24004)
old-commit-hash: 604fefa9b1c0f473d73a2608217c302df8c088d6
2022-03-21 20:03:32 -07:00
Vivek Aithal 069fe1a749 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
old-commit-hash: dfc12926144df063fb6bd20a97bb4390a4f5a4ef
2022-03-15 14:40:29 -07:00
Adeeb Shihadeh ec47e0fef0 break up selfdrive.config (#23959)
* break up selfdrive.config

* add to release files

* fix import order
old-commit-hash: 5c3f3e44bc7b25c9ce502419bcd0261c12ec2b0d
2022-03-13 21:42:39 -07:00
Willem Melching 3c3db89b68 locationd: fix writing LastGPSPosition interval (#23895)
old-commit-hash: f4c822e8c658df69589601bdd3e2095cd9e54e66
2022-03-02 15:16:19 +01:00
Vivek Aithal 5bad0f4400 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
old-commit-hash: 7e6903b58f141b94d645f25c5e0ce15825b60075
2022-03-02 01:01:29 -08:00
Vivek Aithal 1eb13fdc65 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
old-commit-hash: 8a2cbfe00bffa82c7bd70a2b13c1ccf66f7271e0
2022-02-09 17:37:28 -08:00
Adeeb Shihadeh c8dc3909f4 give calibrationd rt priority (#23725)
old-commit-hash: 8a0fc850b43f851d2ac7d8d87e54d557b537de91
2022-02-07 21:05:55 -08:00
Vivek Aithal e4c2c2cf2e 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>
old-commit-hash: f808b174afbcc1fc6924d49fb0c32da5c02aad33
2022-01-12 21:37:09 -08:00
Dean Lee f112aef5a7 calibrationd: Don't repeatedly call get_valid_idxs() (#23473)
* optimize

* rpy_init should be np.array

* rename to rpys
old-commit-hash: e5f9af4a6ecc33e7e2d7774d40fe1614293dc319
2022-01-12 15:34:17 -08:00
Dean Lee 2bb2545d57 calibrationd: fix indentation (#23502)
old-commit-hash: de572c3755729ee61d257f794d2854845a796872
2022-01-12 14:40:02 -08:00
Willem Melching 2543a0bc62 boardd: remove ublox timestamp logging (#23498)
* boardd: remove ublox timestamp logging

* more cleanup

* add cmath
old-commit-hash: 79577e4dcaed6a4a2d4b55aabb5208ebdb2c191f
2022-01-12 15:00:46 +01:00
Willem Melching fec321a178 calibrationd: convert existing calibration to numpy (#23494)
* calibrationd: convert existing calibration to numpy

* use numpy functions
old-commit-hash: 8444f8267da10aaf52789d03f6d46d6b90be13ab
2022-01-11 15:25:01 +01:00
Dean Lee 55233b753b use ndarray.tolist to convert numpy array to float (#23485)
old-commit-hash: 35ec6ac1cb98f7d671edcb928a2b97d749a1edde
2022-01-11 14:34:47 +01:00
Dean Lee 38144fa83b calibrationd: remove extra comma (#23472)
old-commit-hash: f6c6e34ea34f61b2e8d32523a6414dc58b6419e4
2022-01-09 14:32:33 -08:00
Adeeb Shihadeh 1d324e09c4 skip falling device test
old-commit-hash: 1a6881edc6318bf30d2ba451d75eeb7d1b53389d
2022-01-06 14:05:13 -08:00
Adeeb Shihadeh 305a8eac79 locationd: disable falling device detector (#23431)
old-commit-hash: ef225e3e3515c449ba9f69d6e28c02912f1579c3
2022-01-06 12:01:14 -08:00
Dean Lee 179a685894 paramsd: follow capnp best practices (#23399)
old-commit-hash: df7126b982d6663d7016b6ad28c10af94dc00b19
2022-01-04 15:57:38 -08:00
George Hotz 86a39e838b 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>
old-commit-hash: dc96d4bee7b898172a6a15de4799af0e2d35605e
2021-12-28 18:07:00 +01:00
Ewout ter Hoeven f206ebd054 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>
old-commit-hash: 332f568a8241fba9459cb70c76840b9670e6993a
2021-12-24 11:18:39 -08:00
HaraldSchafer f64c2974b4 Road Roll Compensation Rebased (#23251)
* first commit

* update refs
old-commit-hash: cf466222f623df5fac325b86b71dc4e181b40d55
2021-12-16 17:34:12 -08:00
HaraldSchafer 4de7b45d40 Calibrationd: check size of valid_blocks without current (#23223)
old-commit-hash: cd190dc85d3b917137bd3d7efa8032fe3045dc84
2021-12-14 15:14:14 -08:00
HaraldSchafer 22ec491d1f Calibrationd: don't use noisy current block (#23222)
old-commit-hash: 40dcc6382343df687f8304fe48a27d60c09f5d11
2021-12-14 14:09:38 -08:00
HaraldSchafer 4708268c7d Revert "Dont use erratic current block (#23211)" (#23221)
This reverts commit 5c76900f565c8e55f5738efb8fdf5d6a846dbe0e.
old-commit-hash: 837823ff58b57d49bc079a5d7f9ea8db55dc7d76
2021-12-14 13:59:39 -08:00
HaraldSchafer 6a7849aea3 Dont use erratic current block (#23211)
old-commit-hash: 19335bb6a48f0e3558c837557a1ae7c66b8b8587
2021-12-14 13:58:42 -08:00
Dean Lee 3e72a81dac Use std::unique_ptr to manage memory (#23168)
* use unique_ptr

* trigger ci

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

* remove dead states in live_kf
old-commit-hash: 64eb5b0da4d624ecc03f8a45b73296871ae726ff
2021-12-01 00:09:00 -08:00
Vivek Aithal b2ddfb3719 add a note in loc_kf (#23082)
old-commit-hash: b57f55088e4a4054ba4b86d7cce9b2a20704db61
2021-11-30 10:51:32 -08:00
Vivek Aithal 87f37d73a3 Mesh3D: Add accelerometer bias to loc_kf (#22880)
* add accel-bias to mesh3d

* remove acc scale
old-commit-hash: 5040427cb739fad364319070a0f87ab03031cd99
2021-11-29 19:30:14 -08:00
Vivek Aithal d537897e9a 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
old-commit-hash: 8b6a14758329eb977beb5cba73403dd113495aeb
2021-11-24 15:24:25 -08:00
Vivek Aithal 16d9fcbd80 Revert ecef std until real fix (#22982)
* too low

* update refs

Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
old-commit-hash: 94d59314e28c484c8a4a9fb36c8ab659ea79da57
2021-11-19 12:49:32 -08:00
Vivek Aithal 27a6dc0c08 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
old-commit-hash: 534bf697eeb3b72643abc713649ce2eef5f75820
2021-11-12 15:55:16 -08:00
Vivek Aithal d49fbbfbed 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>
old-commit-hash: c7be73b826b21947197f24c6a60fc5a7098e42af
2021-11-11 21:34:17 -08:00
Vivek Aithal 6bc1c7b502 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
old-commit-hash: 5c810a45b0e7614bfbd7a1b6898547df499964e0
2021-11-09 14:45:47 -08:00
Mayfield 43e1903073 enable wshadow (#22756)
* enable wshadow (#22714)

* fix replay

* more build fixes

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 5246f0231e6bfa572c0dd89c60e538910817faa2
2021-11-02 17:08:53 +01:00
Vivek Aithal b150ceffa4 locationd: Gyro bias initial covariance (#22622)
* reduce cam odo std multiplier

* increase gyro obs noise

* increase initial cov for gyro bias
old-commit-hash: 2006aa412e9eeac59036805dee1dde65d4e9522e
2021-10-22 21:00:01 -07:00
Vivek Aithal 80600a77dc expose filter internal states and stds (#22564)
old-commit-hash: f1546e6552fdf51b99cb44eafff5f88b1de536f1
2021-10-14 19:44:31 -07:00
Vivek Aithal 0bc7ccfbaa remove confusing logic in live_kf, move to locationd (#22558)
old-commit-hash: d22f57e36db00f1e6873e3a50f22b8ab2fa94232
2021-10-14 11:57:50 -07:00
Vivek Aithal 9f96d63520 paramsd: Sort messages in each update iteration before processing (#22403)
* sort livelocationKalman and carState messages in each update iteration before processing

* update refs

* update refs

* update refs

* update again

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 83a53618b3a04377ee55561da7460a6f5da7d8d1
2021-10-07 18:21:11 -07:00
Vivek Aithal c0ff654602 Add paramsd Stdev to message (#22443)
* add STD to message

* use modified names for car_kf state stdev atttributes

* update refs

* add modofied cereal

* update refs
old-commit-hash: 244fbde56e90a937c887b3a24edce7da2ee5c699
2021-10-06 16:22:18 -07:00