Commit Graph

43 Commits

Author SHA1 Message Date
HaraldSchafer
cf466222f6 Road Roll Compensation Rebased (#23251)
* first commit

* update refs
2021-12-16 17:34:12 -08: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
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
Vivek Aithal
2006aa412e locationd: Gyro bias initial covariance (#22622)
* reduce cam odo std multiplier

* increase gyro obs noise

* increase initial cov for gyro bias
2021-10-22 21:00:01 -07:00
Vivek Aithal
d22f57e36d remove confusing logic in live_kf, move to locationd (#22558) 2021-10-14 11:57:50 -07:00
HaraldSchafer
a3071bf15b Update car_kf.py 2021-06-18 17:57:42 -07:00
HaraldSchafer
62e22e7eac time checks in locationd (#20880)
* time checks

* no debug print

* correct timestamps in test

* non nan
2021-05-11 15:57:13 -07:00
Willem Melching
e9db5723ef Locationd 100 Hz (#20816)
* fix std transform

* 100Hz

* new ref

* no more decimation

* clean up confusing maths

* static typing

* Revert "static typing"

This reverts commit 23d87337de648e629fbd35dd8c04a740bbefca47.

* 100Hz costs more

* move normalization into core

* add quat idxs

* add big eps

* this is not safe in the filter

* more sensible

* updates to rednose

* not tested

* normalize in python too

* update rednose

* nan check

* check for infs too

* all should be finite

* update ref

* rednose pr now in master

Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
2021-05-06 11:01:58 +02:00
Willem Melching
b27bad8776 Remove sympy import from paramsd at runtime (#20710) 2021-04-20 14:29:37 +02:00
Joost Wooning
3420707ad5 convert locationd to c++ (#20622)
* live_kf to c++

* first locationd code

* Running in process_replay

* locationd handle cam_odo and live_calib

* log event handlers

* working message receiving

* compiling message sending

* correctly sending some messages

* correct receiving and sending

* update ref_commit with some all_alive_and_valid being false, minor fixes

* fix std abs

* linking on device fix

* fix cpu usage test

* generate kf constants and defines

* fix replay test

* replay without acks, cleanup

* operate on bytearray messages

* cleanup

* send msg fix

* small sleep, less flaky test

* remove python locationd

* review feedback

* bump rednose
2021-04-20 11:56:43 +02:00
Joost Wooning
e6a8157916 locationd and paramsd using cython version of ekfsym (#20610)
* Locationd live_kf using c++ kalman filter

* use both cpp and python live_kf to compare

* Locationd using ekfsym cpp

* Paramsd using c++ ekf_sym

* Other building method

* Cleanup

* cleanup

* Single sconscript for rednose and locationd/models

* CI

* CI

* CI fix

* renamed scons config

* Fix lib loading

* bump rednose

* update cpu usage test
2021-04-08 13:09:11 +02:00
HaraldSchafer
8bddaa7607 Update locationd (#20410)
* this was too extreme

* unused import

* capnp wants bools

* update refs
2021-03-19 17:12:34 -07:00
Willem Melching
d9c1561d37 pass cloudlog to EKF_sym 2021-03-15 13:27:12 +01:00
HaraldSchafer
9e746c6dd8 Locationd process noise typo (#20085) 2021-02-16 11:41:21 +01:00
Adeeb Shihadeh
4096f86e21 lgtm fixes (#19610)
* pass matrices by reference

* suppress that

* destructor

* that's wrong, suppress it
2020-12-28 20:36:23 -08:00
Harald Schafer
4fafdee9e4 use name 2020-12-03 13:29:58 -08:00
HaraldSchafer
8e2d344135 Misc locationd improvements (#1714)
* I like this more

* rewind less

* bump rednose

* falling off windshield detectopr

* adjust thresholds

* this is a soft disable now

* move that

* process replay fixes

* update refs

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-07-30 15:33:22 -07:00
HaraldSchafer
87bbbd4100 Clean mesh3d 2 (#1618)
* seems overkill

* not too extreme

* make linter happy

* try adding accel scale

* some tweaks

* Revert "some tweaks"

This reverts commit 58cec365da650fa653dee91c7a5cbe37b8289908.

* Revert "Revert "some tweaks""

This reverts commit 517108b5b676b4ab31bba92a9eb59afa1b3d3faf.

* stability concerns

* this works

* still works

* ugh sympy is weird, still may be not correct

* comment clean

* comment

* clarify

* fix

* unused
2020-06-10 17:25:48 -07:00
Adeeb
367155168a Update Flake8 config (#1624)
* update flake8 checks

* add E502

* no whitespace warnings

* fix violations

* no W391

Co-authored-by: Jason Young <jason@comma.ai>
2020-06-03 16:13:34 -07:00
Willem Melching
843a64c72f Make pylint more strict (#1626)
* make pylint more strict

* cleanup in progress

* done cleaning up

* no opendbc
2020-06-02 16:29:32 -07:00
Adeeb Shihadeh
f3dcf861c7 enable flake8 E303: too many blank lines 2020-05-31 17:21:11 -07:00
Adeeb Shihadeh
efd5dffb1e enable flake8 E231: missing whitespace after comma 2020-05-31 12:49:11 -07:00
Willem Melching
3d08dcc3b2 Run mypy commit hook (#1591)
* run mypy commit hook

* fix mypy errors
2020-05-28 15:05:04 -07:00
Willem Melching
29aaa44740 flake8 in pre-commit(#1583) 2020-05-27 20:33:05 -07:00
Willem Melching
bd06434243 pre-commit pylint (#1580)
* "The commit-hook project sounds interesting though. I would definitely merge something that runs flake8 and pylint on the modified files!"
-  pd0wm, https://github.com/commaai/openpilot/pull/1575#issuecomment-634974344

* add pylint to pre-commit and make everything pass

* Remove uncommented stuff

Co-authored-by: J <user@4800.lan>
2020-05-27 20:00:14 -07:00
Harald Schafer
5a841c2856 Revert "better values"
This reverts commit 109ba298b1.
2020-05-27 17:11:27 -07:00
Harald Schafer
109ba298b1 better values 2020-05-27 12:16:05 -07:00
HaraldSchafer
7c8d6cbdef pure init (#1569) 2020-05-26 20:49:14 -07:00
Harald Schafer
00e05bc7d8 needed for stability 2020-05-21 17:47:05 -07:00
Willem Melching
44484102db Paramsd handle liveLocation not valid and add alerts 2020-05-19 17:00:30 -07:00
HaraldSchafer
81686547cc Locationd cleanup (#1517)
* way cleaner take 2

* cleanup

* be more relaxed

* just let it be

* don't drive backwards or upside down

* do this more

* vNED sometyimes invalid

* use reasonble stds

* stability in nonlinear zone

* previous metrics were without publishing
2020-05-17 20:59:53 -07:00
Willem Melching
896bd1b5c7 use base class in car_kf 2020-05-15 15:48:48 -07:00
Harald Schafer
273e81715a xRevert "way cleaner"
This reverts commit a4ffd8c226.
2020-05-15 14:29:34 -07:00
Harald Schafer
a4ffd8c226 way cleaner 2020-05-15 14:24:11 -07:00
Willem Melching
2cc218e144 lane kf was not built 2020-05-15 14:22:36 -07:00
Bruce Wayne
f8a0eb0f7a make linter happy 2020-05-14 17:38:52 -07:00
Harald Schafer
013e49bf90 too complex 2020-05-14 16:30:00 -07:00
Willem Melching
28bf5d1dd8 Rednose (#1503)
* add rednose

* update rednose

* This compiles

* Add rednose to release

* cleanup

* Extract generated dir as argument

* Add constants.py to release

* Add rednose to dockerfile

* Fix that
2020-05-14 15:36:56 -07:00