Commit Graph

55 Commits

Author SHA1 Message Date
Kacper Rączy
490c53e2dc locationd: make pose_kf inherit from KalmanFilter (#34982)
* Read message not json for initial state

* Delete lines

* Fix param
2025-04-05 05:48:34 +00:00
Shane Smiskol
0789877cd3 paramsd: fix unbounded yaw rate while calibrating (#34806)
* rm

* comments

* default values when yaw rate invalid

* clean up

Revert "default values when yaw rate invalid"

This reverts commit e983abb3b009f15a57ebdfbadd4f616aba5b266e.

do the same for yaw rate we do for roll

and

* 1 is fine

* update refs

---------

Co-authored-by: Kacper Rączy <gfw.kra@gmail.com>
2025-03-06 22:44:09 -08:00
Kacper Rączy
a8b829167d locationd: use cloudlog (#34508)
* Use cloudlog instead of print

* Changes
2025-01-30 22:36:20 +00:00
Kacper Rączy
93a8a18b6d locationd: frequency based bad observation resiliance and recovery (#34476)
* Improve it

* Fix static

* Fix test_consistent_timing_spikes test

* Fix tests

* Comment

* Remove crap
2025-01-25 05:38:20 +00:00
Kacper Rączy
eccdf8d880 locationd: timing spikes resiliance (#34080)
* Locationd scenario for timing spike

* Add test for consistent timing spike

* Resiliance to bad timing

* Test update

* Refactor test

* fix comment

* Decay based on frequency

* Fix

* Update comment

* Only for critical services

* Fix tests
2024-11-25 20:46:05 -08:00
Dean Lee
7a11d0180b locationd: improve circular buffer handling with np.roll (#33470)
improve circular buffer handling
2024-09-19 13:09:41 -07:00
Dean Lee
aca0ee3eea locationd: replaced the loop and setattr with direct attribute assignment (#33466)
replaced the loop and setattr with direct attribute assignment
2024-09-18 22:19:57 -07:00
Kacper Rączy
236dffe400 locationd no GPS (#33029)
* Pose kf draft

old-commit-hash: 17dd4d576e597792f0e18826498c00076739f92b

* Fix it

old-commit-hash: 13ac120affe58fd22e871586ea5f4d335b3e9d2b

* Add translation noise

old-commit-hash: 166529cb612858c4ce80649367ac35b2b6007e1d

* Add gravity to acc

old-commit-hash: 8fcfed544b8e090ccc86b189c13bc03c6c190613

* Use pyx

old-commit-hash: 8e69e0baa0a4c43b4d0c22535711f296f05420aa

* Indent

old-commit-hash: 25b19a73644cdcb571ccf1a1d8acb88a0d066c67

* Reset function

old-commit-hash: ca5d2736da15e4fd6539f7268133320735b7c9cc

* Add device_from_ned and ned_from_device transformations

old-commit-hash: a60d25da0edc311e583549dc015fa595749fd4ae

* Fix rotations

old-commit-hash: d6d582f7f6d19a2bc2308dbcb0c9f81363e325b6

* kms

old-commit-hash: 681bc4e50374795ccc61422c3ce4ffb51389fce2

* Centripetal acceleration

old-commit-hash: 6e574506d27e5b76a04b2097d94efa4ca91ead71

* Rewrite draft

old-commit-hash: 4a2aad0146267460e5d30036c8cdb2bef94d1d7c

* Remove old locationd stuff

old-commit-hash: c2be9f7dbf22fb5cd29e437cd7891a7d52266fba

* Python process now

old-commit-hash: 83fac85f28c0b546b6965aafe1dd8a089e67f5b3

* Process replay fix

old-commit-hash: c44f9de98583c49dad0b22497869b3bb0266fcd9

* Add checks for timing and validity

old-commit-hash: aed4fbe2d00ca620e01a0e0ee99a4871c939de36

* Fixes

old-commit-hash: 3f052c658c16984a34915f38afdfbfd0fb19a267

* Process replay config fixes

old-commit-hash: 1c56690ee7ceb3c23c9ec2b2713352191212716e

* static analysis fixes

old-commit-hash: 6145e2c140ea9aa97e75069c3ddd82172cadc866

* lp in latcontrol

old-commit-hash: 9abf7359d68e794c69052724f3aca14b04dd3cca

* Fix SensorEvent name for acceleration

old-commit-hash: 91a1ad6c604727c9c898ba4aefe9478022b167fd

* Ignore sensor readings from segments with multiple imus

old-commit-hash: 1f05af63d6cc605ea98d7da0d727a5bd8d7819b0

* Update shebang

old-commit-hash: e3f2f5c10df3a4ba698421335bfeffc63d1a8797

* Replace llk with lp

old-commit-hash: 99b6c7ba08de6b703708fef0b8fd2d8cb24b92c0

* Refactor locationd scenario test

old-commit-hash: 7f5f788f071b7647e36f854df927cc5b6f819a84

* Add more debugging tools

old-commit-hash: 8d4e364867e143ea35f4bfd00d8212aaf170a1d1

* Param name update

old-commit-hash: 5151e8f5520f067e7808e3f0baa628fbf8fb7337

* Fix expected observations

old-commit-hash: d6a0d4c1a96c438fb6893e8b6ff43becf6061b75

* Handle invalid measurements

old-commit-hash: 549362571e74ad1e7ec9368f6026378c54a29adf

* Fix spelling

old-commit-hash: eefd7c4c92fb486452e9b83c7121d2599811852b

* Include observations in debug info too

old-commit-hash: 625806d1110b3bffe249cd1d03416f2a3f2c1868

* Store error instead of expected observation

old-commit-hash: 1cb7a799b67e56af4eddc6608d5b0e295f2d888c

* Renames

old-commit-hash: a7eec74640fc5cc7a5e86172d2087b66cb93d17d

* Zero the yaw

old-commit-hash: 96150779590fcb8ac50e8ffe8f8df03105983179

* New state_dot for orientation

old-commit-hash: c1456bf3a0c5af2f888aa6ff0b5ffc2e5516ddf7

* Fix the state transformations

old-commit-hash: 7cb9b91e2f99caa4ac3fb748c7f23bb8bf9f65db

* Update process in test_onroad

old-commit-hash: 854afab7c39ca7dec2b42974cecbb5310b82b617

* Test polling on cameraOdometry

old-commit-hash: a78e8b7d61618177f15c9892e2fa1e51620deca8

* Keep the copy of x and P returned from predict

old-commit-hash: 3c4159a6a7d7383265a99f3f78f8805d2fcfc8cd

* Remove polling again

old-commit-hash: f7228675c5fd2de5f879c4786859f1abcec27d68

* Remove locationd.cc

old-commit-hash: d7005599b2b178e688c3bd1959d6b69357d3a663

* Optim in _finite_check

old-commit-hash: 58ad6a06b9380960e9f69eb98663ddb97461e8d5

* Access .t once

old-commit-hash: d03252e75ed4cbdb49291a60c904568e6a3d3399

* Move the timing check to cam odo code path

old-commit-hash: 6a1c26f8c201e1feb601753f0cb7299cf981b47e

* Call all_checks only once

old-commit-hash: 373809cebf8d9db89d1ab00f4c8c933f33038e78

* Do not sort

old-commit-hash: 2984cd02c0ab76827b8c7e32f7e637b261425025

* Check sm.updated

old-commit-hash: 11c48de3f0802eb4783899f6a37737078dbf2da4

* Remove test_params_gps

old-commit-hash: 82db4fd1a876cc2402702edc74eba0a8ac5da858

* Increase tolerance

old-commit-hash: 927d6f05249d2c8ec40b32e2a0dcde8e1a469fb3

* Fix static

old-commit-hash: 2d86d62c74d5ac0ad56ec3855a126e00a26cd490

* Try separate sockets for sensors

old-commit-hash: 5dade63947ab237f0b4555f45d941a8851449ab1

* sensor_all_checks

old-commit-hash: e25f40dd6b37ee76cd9cc2b19be552baf1355ec3

* Fix static

old-commit-hash: 328cf1ad86079746b4f3fde55539e4acb92d285e

* Set the cpu limit to 25

old-commit-hash: 7ba696ff54c5d3bfa42e42624d124f2a1914a96d

* Make it prettier

old-commit-hash: cd6270dec80d8b9dac784ddd4767a1a46bcff4b7

* Prettier

old-commit-hash: 1b17931d23d37f299dad54139eaf283a89592bf5

* Increase the cpu budget to 260

old-commit-hash: 20173afb937a2609c8a9905aee0b2b093cb8bba4

* Change trans std mult. 2 works better

* Update ref commit

* Update ref commit
2024-09-04 11:54:57 +02:00
Joost Wooning
c0ac9bb63c 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
old-commit-hash: 3420707ad5
2021-04-20 11:56:43 +02:00
Willem Melching
7483953935 disable GC for locationd and paramsd (#20680)
old-commit-hash: fc478ff920
2021-04-14 23:59:29 -07:00
Willem Melching
99a8e9222e Add list for average frequency ignore (#20624)
* add list for averge frequency ignore

* typo
old-commit-hash: c1075037ba
2021-04-08 18:04:16 +02:00
HaraldSchafer
cf6c7cb2b8 Update locationd (#20410)
* this was too extreme

* unused import

* capnp wants bools

* update refs
old-commit-hash: 8bddaa7607
2021-03-19 17:12:34 -07:00
Adeeb Shihadeh
05eb44115e cereal cleanup part 2 (#20092)
* car stuff

* thermal

* Revert "car stuff"

This reverts commit 77fd1c65ebd01abfa8493ae12c9e6b14f7ada976.

* panda state

* camera stuff

* start deg

* most is building

* builds

* planner + controls run

* fix up paramsd

* cleanup

* process replay passes

* fix webcam build

* camerad

* no more frame

* thermald

* ui

* paramsd

* camera replay

* fix long tests

* fix camerad tests

* maxSteeringAngle

* bump cereal

* more frame

* cereal master
old-commit-hash: 312b681a46
2021-02-16 21:39:32 -08:00
HaraldSchafer
0e6e652521 fix timestamps (#20029)
* fix timestamps

* nanoseconds

* update refs
old-commit-hash: b3a868103a
2021-02-08 22:15:05 -08:00
Willem Melching
17d5446650 Timezoned (#19960)
* untested code

* add to manager

* whitespace

* only save on fix

* cleanup

* fix typo

* add to ignored processes

* import tici

* fix param name

* cleanup

* only run offroad

* use itertools

* wait for thermald

* simpler

* fall back to api call

* add param to override timezone

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 4c04e220a1
2021-02-06 11:07:37 +01:00
HaraldSchafer
c4d50c0bf0 preinit locationd filter (#2569)
* preinit

* update ref commit
old-commit-hash: 9f5dfb74f9
2020-11-19 15:14:35 -08:00
Willem Melching
03b2a6a137 LSM6DS3 (#2268)
* add initial lsm6ds3 setup

* accel works

* ignore lsm6ds3 in locationd

* add gyro

* add temp

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: e51da619c1
2020-10-05 16:16:25 +02:00
HaraldSchafer
e85d1f0044 persist falling until message sent (#1982)
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 85a7ceaf07
2020-08-06 14:46:19 -07:00
Harald Schafer
3705a2209f wrong units
old-commit-hash: 687afa9687
2020-08-05 13:45:58 -07:00
Harald Schafer
daf9176711 Revert "persist falling test"
This reverts commit 273f745ad5d1ce7e92ce24e8fa3b08895977dd5c.

old-commit-hash: 7032a40717
2020-08-05 10:46:26 -07:00
Harald Schafer
d252db9da9 persist falling test
old-commit-hash: 8cad9375d3
2020-08-05 10:44:40 -07:00
HaraldSchafer
122118ccd4 add fall filter and less FP on posenet (#1971)
* add fall filter and less FP on posenet

* add alert

* list

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 490ee52687
2020-08-03 15:51:56 -07:00
Adeeb Shihadeh
f8e08fad90 Cleanup locationd msg building (#1972)
* cleanup locationd msg building

* remove that
old-commit-hash: 1208ac424d
2020-08-03 14:58:15 -07:00
HaraldSchafer
bc3b340694 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>
old-commit-hash: 8e2d344135
2020-07-30 15:33:22 -07:00
Willem Melching
08fa4c4691 Locationd: only process valid log messages (#1761)
old-commit-hash: bfeefb6fd3
2020-06-22 14:41:15 -07:00
Willem Melching
6dc1c6e58e cleanup no sensor data alert (#1760)
old-commit-hash: 264015c584
2020-06-22 14:27:07 -07:00
HaraldSchafer
c26f15d608 need to do something about the valid (#1713)
old-commit-hash: 2afe224813
2020-06-15 17:20:31 -07:00
Willem Melching
76a465e0ec Write orientation & transform in C++ (#1637)
* locationd at 20hz

* update ref

* bump cereal

* dont modify global state

* add scons files

* ecef2geodetic and geodetic2ecef

* Finish local coords class

* Add header file

* Add orientation.cc

* cleanup

* Add functions to header file

* Add cython wrapper

* y u no work?

* This passes the tests

* test rot2quat and quat2rot

* Teste euler2rot and rot2euler

* rot_matrix

* test ecef_euler_from_ned and ned_euler_from_ecef

* add benchmark

* Add test

* Consistent newlines

* no more radians supported in geodetic

* test localcoord single

* test localcoord single

* all tests pass

* Unused import

* Add alternate namings

* Add source for formulas

* no explicit tests needed

* remove benchmark

* Add release files

* Typo

* Remove print statement

* no access to raw transform matrix

* temporarily add tolerance

* handcode quat2euler

* update ref
old-commit-hash: c18e7da3c2
2020-06-09 16:44:26 -07:00
Adeeb
9027018368 Update Flake8 config (#1624)
* update flake8 checks

* add E502

* no whitespace warnings

* fix violations

* no W391

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

* cleanup in progress

* done cleaning up

* no opendbc
old-commit-hash: 843a64c72f
2020-06-02 16:29:32 -07:00
Adeeb Shihadeh
9823f1164c enable flake8 E303: too many blank lines
old-commit-hash: f3dcf861c7
2020-05-31 17:21:11 -07:00
Adeeb Shihadeh
be0b43f339 enable flake8 E231: missing whitespace after comma
old-commit-hash: efd5dffb1e
2020-05-31 12:49:11 -07:00
Willem Melching
03a268fd0b add gpsOK flag to liveLocationKalman
old-commit-hash: 8ea8f405db
2020-05-27 15:14:13 -07:00
Willem Melching
47c5f52067 Locationd fixes
old-commit-hash: 8f3e932f96
2020-05-20 14:18:28 -07:00
Willem Melching
6e41973c3c Handle posenet and sensor alerts in locationd (#1541)
* handle posenet and senor alerts in locationd

* defaults now set in capnp file

* Cleanup c++ version of params learner

* update ref commit
old-commit-hash: d099e09fb7
2020-05-19 16:45:20 -07:00
HaraldSchafer
e21bbf8bbd 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
old-commit-hash: 81686547cc
2020-05-17 20:59:53 -07:00
Harald Schafer
99d9c3651c xRevert "way cleaner"
This reverts commit b8d13b1b44c6d33cb8209aac7fa65a269d8892b9.

old-commit-hash: 273e81715a
2020-05-15 14:29:34 -07:00
Harald Schafer
696fd01f9d way cleaner
old-commit-hash: a4ffd8c226
2020-05-15 14:24:11 -07:00
Willem Melching
8f71de0dbe 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
old-commit-hash: 28bf5d1dd8
2020-05-14 15:36:56 -07:00
George Hotz
6fbcde48e5 Using lgtm.com and fixing found alerts (#1452)
* lgtm in readme, and mac nui fixes

* call super inits in radars

* unused imports, dup lines

* more radars, more unused imports

* pass CP into RadarInterfaceBase

* more fixups

* unused imports

* delete unused lines

* ugh, new unused import

Co-authored-by: George Hotz <geohot@gmail.com>
old-commit-hash: 1295cfe06c
2020-05-02 12:07:34 -07:00
Willem Melching
8a23af0dce Refactor locationd message building
old-commit-hash: 12af1f9175
2020-04-21 17:13:54 -07:00
Harald Schafer
6f97b0c21e better nothing than wrong
old-commit-hash: cc5b9b32bf
2020-03-24 11:01:41 -07:00
Harald Schafer
afe66c742e correctness is expensive
old-commit-hash: 82f316732a
2020-03-23 18:02:59 -07:00
Harald Schafer
83ea66cbfb need sqrtsd
old-commit-hash: bcbcd96d92
2020-03-18 15:23:59 -07:00
Shane Smiskol
682c866a55 initialize all messages in 1 line (#1206)
old-commit-hash: 6ff881f789
2020-03-05 17:32:52 -08:00
HaraldSchafer
b038c1f93b Locationd packet (#1204)
* initial

* add desire

* initial

* some progress

* fill in, untests

* add timestamping

* fixes

* unix timestamp

* no debug print

* cleanre

* normal syntax

* no laika

old-commit-hash: 24eeec4e0b
2020-03-05 15:59:49 -08:00
Willem Melching
e7a1ece98f Run locationd online (#1089)
* add locationd to manager

* add to release files and make linter happy

* Don't ship all models

* Also add locationd.py

* Remove unused import

* Fix import in kalman helpers

old-commit-hash: ff91c6f9d4
2020-02-17 18:07:23 -08:00
Comma Device
6be9fa3287 more decimation
old-commit-hash: 76b3dca208
2020-02-13 23:54:45 +00:00
Harald Schafer
fd44a0f698 better packet info
old-commit-hash: 4470407729
2020-02-13 11:12:16 -08:00
Harald Schafer
0f8201cd91 no delay buffer for now
old-commit-hash: 579a9714da
2020-02-12 10:31:15 -08:00