Commit Graph

9 Commits

Author SHA1 Message Date
Shane Smiskol
75b6ec68c6 Add lagd calibration percentage (#35511)
* lagd: publish calibration percentage

* Refine lagd calibration progress

* stash

* cleanup (match calibrationd calculation logic)

* no no no

* nor

* two lines
2025-06-09 22:10:47 -07:00
Shane Smiskol
6f6adc10a8 lagd: disable in release (#35426)
* disable in release

* pass

* one liner

* Update selfdrive/locationd/lagd.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* test

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-02 21:29:05 -07:00
Shane Smiskol
1a84b05bde lagd: make method static 2025-06-02 20:53:11 -07:00
Kacper Rączy
312658756d lagd: handle ambiguous cases (#35257)
* Mechanism to handle ambiguous estimates

* Use it

* Fix static

* Fix

* Comment

* Comment v2

* Use quantile instead

* Fix

* Make it better

* Make it confidence

* Make it a constant

* min_confidence as arg

* Make the test signal more like the real one

* Relax sample requirements

* Use constant

* Reduce confidence
2025-05-23 01:33:55 +00:00
Kacper Rączy
f242b1e88a lagd: remove saved param if mismatch (#35217)
Remove LiveDelay on mismatch
2025-05-14 03:18:14 +00:00
Kacper Rączy
15326c2d30 lagd: check for validity of the estimate when restoring state (#35034)
Do not restore if invalid
2025-04-18 01:37:48 +00:00
Kacper Rączy
06a9483a24 lagd: estimate std (#35009)
* Std

* Fix static

* Refactor

* Assert std zero
2025-04-17 23:49:30 +00:00
Kacper Rączy
60da5dd39a lagd: check sensors valid (#35027)
* Check if sensors valid

* Fix test

* Fix static

* Constants

* time buffer for pose valid

* Fix static
2025-04-17 09:35:30 +02:00
Kacper Rączy
f237649a7a Reapply "Online lateral lag learning" (#34975)
* Online lateral lag learning (#34974)

This reverts commit b4cc9e68d1.

* pad to the best size for fft

* Fix static analysis

* Add typing

* Fix typing

* MAX_LAG

* Calculate cross correlation regardless if the points are valid

* Back to lagd

* Add lagd to process_config

* Lagd in test onroad

* Move lag estimator for lagd

* Remove duplicate entry from test_onroad

* Update process replay

* pre-fill the data

* Update cpu usage

* 25sec window

* Change the meaning of lateralDelayEstimate

* No newline

* Fix typing

* Prefill

* Update ref commit

* Add a unit test

* Fix static issues

* Time limit

* Or timeout

* Use mocker

* Update estimate every time

* empty test

* DT const

* enable RIVIAN again

* Update ref commit

* Update that again

* Improve the tests

* Fix static

* Add masking test

* Increase timeout

* Add liveDelay to selfdrived

* Add liveDelay to selfdrived in process_replay

* Fix block_avg restore after num_blocks

* regen most

* Update bolt

* Update ref commit

* Change the key name

* Add assert

* True weighted average
2025-04-09 22:31:07 +00:00