Commit Graph

35 Commits

Author SHA1 Message Date
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
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
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
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
Vivek Aithal
f1546e6552 expose filter internal states and stds (#22564) 2021-10-14 19:44:31 -07:00
Vivek Aithal
d22f57e36d remove confusing logic in live_kf, move to locationd (#22558) 2021-10-14 11:57:50 -07:00
Vivek Aithal
3778592f50 locationd: modify factor for measurement STDEV in gps update (#22262)
* modify factor for measurement STDEV in gps update

* add new ref_commit
2021-09-17 22:33:46 -07:00
HaraldSchafer
e0087fc313 Fix orientation in map (#21863)
* fix calibrated orientation

* update ref

* cleaner

* update ref

* master

* update again

* update ref again again

* actually compiled this tim,e
2021-08-05 21:06:46 -07:00
Harald Schafer
e63d94d8d2 Revert "nav: use calibrated orientation (#21853)"
This reverts commit 4b209f31a1.
2021-08-04 10:41:49 -07:00
HaraldSchafer
4b209f31a1 nav: use calibrated orientation (#21853)
* calibrate map

* msg added
2021-08-04 09:58:04 -07:00
HaraldSchafer
049a1bca34 Better localizer unstable alert (#21660)
* use canonical language

* filter out when gps signal is flaky

* Update selfdrive/locationd/locationd.cc

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

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-07-20 19:20:00 -07:00
Willem Melching
6feafc0042 tici: use LSM6DS3 (#21496) 2021-07-06 23:02:54 +02:00
Adeeb Shihadeh
f01ebc5680 make locationd and paramsd RT (#21264) 2021-06-17 14:19:24 -07:00
HaraldSchafer
9a2306e008 gps can be bad in cities (#21270) 2021-06-15 10:17:20 -07:00
Dean Lee
e4e669bb0f add space after function name and if statement (#21225) 2021-06-11 10:17:52 +02:00
Adeeb Shihadeh
9e94fb17cf fix qcom and qcom2 builds 2021-06-08 16:44:05 -07:00
Dean Lee
c53cb5d570 Use C++ header files instead of C header files. (#21192)
* use cstring instead of string.h

* use cstdio instead of stdio.h

* remove inttypes.h

* use cstdlib instead of stdlib.h

* use cstdint instead of stdint.h

* #include <cstddef>

* cstdlib

* use cmath

* remove stddef.h

* use cassert

* use csignal

* use ctime

* use cerror

* rebase master
2021-06-08 13:46:22 -07:00
HaraldSchafer
1c926d23da Many localizer resets alert (#21116)
* add excessive reset

* add alert

* add event
2021-06-03 09:26:53 -07:00
HaraldSchafer
2f80775b50 Filter only initialized if up for 1sec (#20940)
* add time since reset check

* fix time since reset

* update ref

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-05-18 11:12:02 -07:00
Willem Melching
65ab98a6c8 locationd: ignore empty sensorEvents (#20887) 2021-05-12 16:47:52 +02: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
c62bb10640 Locationd input sanity checks (#20845)
* Add first sanity checks on inputs

* more gps checks

* make sure test values pass sanity checks

* this localizer supports cannonball runs

Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
2021-05-06 13:39:50 -07:00
Willem Melching
fc3da5eaf9 Use standstill flag in locationd (#20838) 2021-05-06 13:13: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
d96edb6817 C++ Process replay improvements - Part 1 (#20828)
* C++ Process replay improvements

* revert that change

* create publisher before subscribers

* dont block forever, print warning

* add comment

* create sockets after process init

* try once more to receive the message

* SIMULATION env variable

* print message num when no response
2021-05-05 17:14:29 +02:00
Adeeb Shihadeh
ec414e2eb1 set nice values for non RT processes (#20812)
* set nice values for non RT processes

* builds

* fix qcom build

Co-authored-by: Comma Device <device@comma.ai>
2021-05-04 22:00:11 -07:00
HaraldSchafer
daecf4247b Revert "Locationd 100hz (#20759)" (#20797)
* Revert "Locationd 100hz (#20759)"

This reverts commit 333313cf0e.

* new ref
2021-05-02 15:06:34 -07:00
HaraldSchafer
333313cf0e Locationd 100hz (#20759)
* 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
2021-04-28 15:29:14 -07:00
Joost Wooning
d2a2ccfee4 compare carspeed float to epsilon instead of zero (#20714)
* compare carspeed float to epsilon instead of zero

* update ref

* add ref commit again

Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
2021-04-22 17:55:41 -07:00
Joost Wooning
ed8acfa284 params put in locationd async (#20713)
* params put in locationd async

* remove reference in thread call
2021-04-20 16:02:57 +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