Commit Graph

116 Commits

Author SHA1 Message Date
Lee Jong Mun
89e5ee45ca cleanup remnants of LQR and INDI tuning (#29860)
* not use 'indi' cleanup

* bump cereal

* rm more

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 238f9d65db
2023-09-10 16:30:13 -07:00
Adeeb Shihadeh
0d4beff6a0 process replay: parallel by default (#29633)
* process replay: parallel by default

* more is helpful
old-commit-hash: 4d6bb32df2
2023-08-25 14:41:43 -07:00
Adeeb Shihadeh
16ec56398c add openpilot prefix to imports (#29498)
* add openpilot prefix to imports

* more

* more

* fix docs

* fix linter

* bump submodules

* fix patched tests

* update dynamic imports

* debug

* Revert "debug"

This reverts commit db5e13b9911cc74438bee123bc3430da6c31b24b.

* fix pm test
old-commit-hash: a9626f95b6
2023-08-20 20:49:55 -07:00
Harald Schäfer
92d1e3fabb Proc replay: field tolerance unused (#29479)
field tolerance unused
old-commit-hash: 1dea20e574
2023-08-20 13:05:18 -07:00
Justin Newberry
3ee0786de3 CI: Pylint to ruff (#29294)
* pylint to riff

* pylint to riff

* pylint to riff

* revert more

* undo exclude removal

* exclude tinygrad

* set line length

* pylint exclusions to ruff

* same excludes as old linter

* fix tools QA

* remove unrequired check

* revert linting third_party

* ignore e402
old-commit-hash: 7fdd9fc37c
2023-08-09 13:26:54 -07:00
Justin Newberry
ff96892511 Revert "CI: pylint to ruff (#29276)" (#29284)
This reverts commit ffad7279cbad3c4f2ea786287b4624d3a3aa18d7.
old-commit-hash: a91764954b
2023-08-08 14:24:04 -07:00
Justin Newberry
99006365a3 CI: pylint to ruff (#29276)
* pylint to riff

* pylint to riff

* pylint to riff

* revert more

* undo exclude removal

* exclude tinygrad
old-commit-hash: cb31a53d8a
2023-08-08 13:41:30 -07:00
Kacper Rączy
4c6efa638c process_replay: support for replaying multiple processes simultaneously (#28829)
* first working ProcessContainer and _replay_multi_process implementation

* Setup controlsd config_callback

* Add vision ipc support

* Remove old code

* add todo

* Update estimated processing times

* Use deepcopy when getting configs

* Rework the API to support passing multiple names or configs

* Add get_custom_params_from_lr

* Add more typing

* Enable simulation for controlsd

* Fix typing issues

* Regen refactor

* Fix linter issues

* Make wideRoadCameraState optional

* Move DummySocket to helpers

* Improve typing in regen

* Minor improvements

* Maintain sort order of internal_pub_queue using heapq

* Move ProcessContainer elsewhere

* Fix internal heap

* Change comment

* Remove subtest_name from ProcessConfig

* Update cereal

* Add newline
old-commit-hash: b2d0f74ec3
2023-07-18 14:56:24 -07:00
Kacper Rączy
1fa42d0b97 process_replay: modeld and dmonitoringmodeld support (#28463)
* vipc support. modeld and dmonitoringmodeld configs

* Update cereal

* Add vision meta

* Use vision meta in process replay

* Exclude modeld and dmonitoringmodeld from test_processes

* Refactor other pieces of code to use vision meta

* remove unnecessary imports

* Add MAX_FRAMES_PER_SEGMENT

* cameraState migration

* Move camera state migration to migration module

* model_replay refactor

* Fix lint issues

* Reduce number of vipc buffers to 2

* Update spinner message

* Update model replay ref

* Support the new log order

* Replace CameraFrameSizes with dict. Add encode_index field

* Migrate camera states based on encode indices

* Refactor process replay

* Refactor model replay

* Remove unnecessary print

* Update model replay ref

* Make camera state migration optional

* Remove unused import

* Add ignore_alive_pubs field

* Add assertion for carParams inside fingerprinting callback

* Remove WideCameraOnly param setup

* Refactor ModeldCameraSyncRcvCallback

* Update model replay ref commit

* Fix camera state migration

* Only migrate camera states when process has vision pubs

* Refactor model replay again

* Fix linter issues

* One more linter fix

* Update model replay ref commit
old-commit-hash: 2c617e0c7a
2023-06-22 17:36:25 -07:00
Kacper Rączy
d3a3c73b0c process_replay: progress bar support (#28447)
* Add support for tqdm progress bar

* Fix argument name
old-commit-hash: a2e75fdea6
2023-06-07 16:23:40 -07:00
Kacper Rączy
2edd65ad4e process_replay: helpers (#28367)
* process_replay helper

* Refactor

* refactor check_enabled uses

* fix __init__

* noqa in __init__ imports

* Move compare_logs outside of process_replay

* Move save_logs to tools.lib.helpers

* Remove save_log from compare_logs

* fix lint issues
old-commit-hash: 64377a88f9
2023-06-06 10:31:13 -07:00
Harald Schäfer
5ddceb553d Calibrationd: make recalibrating alert (#28149)
* Initial

* fixes

* not an int anymore

* elif

* revert ref

* update ref

* fix alert text

* regen refs

* update ref

* add recalibration unit test

* set into recalibration state

* fix words

* recalib

* text

* Update selfdrive/controls/lib/events.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 598343aad1
2023-05-15 09:29:57 -07:00
Cameron Clough
e7a8c65f21 test Ford in process replay (#28112)
old-commit-hash: 51d41a3336
2023-05-04 14:47:39 -07:00
Shane Smiskol
e56c2f6ee4 Ford: remove from dashcam (#28103)
* no dashcam 🎉

* update docs

* not these

* update refs

* bump panda
old-commit-hash: d05d9dac04
2023-05-04 06:55:09 +00:00
Harald Schäfer
08be43fe49 New process_replay segment with latest ublox logs (#28038)
* Add new segment

* Update ref_commit
old-commit-hash: 06756f4533
2023-04-30 18:24:20 -07:00
Bruce Wayne
a6b4940c8b Revert "LaikaD: new proc_replay segment and no internet laikad (#28029)"
This reverts commit 1341b59160ffa9db29d589f3fe4dd38691361165.

old-commit-hash: 613bbcd626
2023-04-26 19:20:05 -07:00
Harald Schäfer
bd9b02915f LaikaD: new proc_replay segment and no internet laikad (#28029)
* no internet in CI

* add new segment

* new ref
old-commit-hash: fbb7dcb19c
2023-04-26 16:01:39 -07:00
Adeeb Shihadeh
c2fc5175fc process replay: prep for laikad subsock + QCOM GPS (#27632)
* process replay: prep for laikad subsock

* cleanup

* fix for qcomGnss

* detect ublox

* more debug info in err

* wip

* cleanup
old-commit-hash: 7319afbd51
2023-03-21 16:43:40 -07:00
Shane Smiskol
71fed2384d Remove dashcam override param (#27509)
* remove dashcam override

* sort

* remove ford from segments
old-commit-hash: e729f5b763
2023-03-06 15:36:39 -08:00
Adeeb Shihadeh
caaa104d64 Chrysler: revert torque tuning (#27327)
* Chrysler: revert torque tuning

* update refs

* update refs + route
old-commit-hash: e3de6b8834
2023-02-13 16:15:59 -08:00
Adeeb Shihadeh
7279f7d615 update chrysler test segment with new flag
old-commit-hash: ed52916d55
2023-02-10 23:47:47 -08:00
Shane Smiskol
c24e101383 process replay: add Ford Bronco Sport segment (#27112)
* Add Ford segment to process replay

* fix dashcam cars

* clean up

* fix NotImplementedError

* Update refs
old-commit-hash: cb62a5397e
2023-01-27 14:14:04 -08:00
Shane Smiskol
f36d799198 Hyundai: bump safety params (#26407)
* bump panda

* bump panda

* bump panda

* update refs

* bump panda

* bump panda
old-commit-hash: e971bb11c2
2022-11-07 22:14:47 -08:00
Shane Smiskol
e135d07018 process replay: test Bolt EUV (camera-ACC platform) (#26270)
ADD BOLT TO PROCESS REPLAY
old-commit-hash: 995c74a994
2022-10-27 14:36:47 -07:00
Shane Smiskol
b0f435e710 Hyundai HDA2 detection: use ADAS ECU (#26130)
* use adas ecu

* new route

* update refs

* new route

* update refs

* new test routes

* bump
old-commit-hash: f6416e7769
2022-10-19 14:21:03 -07:00
Adeeb Shihadeh
f6803bc8df Hyundai: share panda flags with CAN-FD platform (#26058)
* Hyundai: share panda flags with CAN-FD platform

* move that

* only set bit

* bump panda

* panda master

* regen + update refs for new param
old-commit-hash: c782380fc1
2022-10-12 21:54:08 -07:00
Shane Smiskol
ae2f2add1d Longitudinal planner: clip a_desired to cruise limits (#25928)
* Clip a_desired to cruise limits

* Update selfdrive/controls/lib/longitudinal_planner.py

* fix

* update refs

* explicit
old-commit-hash: 4bd146ee7a
2022-09-30 15:43:04 -07:00
Shane Smiskol
220c7ea7c3 process replay: rename second HYUNDAI entry
old-commit-hash: 75735675bd
2022-09-30 14:49:27 -07:00
Kurt Nistelberger
8a828af454 Sensor events regen (#25903)
old-commit-hash: 96ed5aa581
2022-09-27 20:33:45 -07:00
Vivek Aithal
51d25b2011 Live torque (#25456)
* wip torqued

* add basic logic

* setup in manager

* check sanity and publish msg

* add first order filter to outputs

* wire up controlsd, and update gains

* rename intercept to offset

* add cloudlog, live values are not updated

* fix bugs, do not reset points for now

* fix crashes

* rename to main

* fix bugs, works offline

* fix float in cereal bug

* add latacc filter

* randomly choose points, approx for iid

* add variable decay

* local param to capnp instead of dict

* verify works in replay

* use torqued output in controlsd

* use in controlsd; use points from past routes

* controlsd bugfix

* filter before updating gains, needs to be replaced

* save all points to ensure smooth transition across routes, revert friction factor to 1.5

* add filters to prevent noisy low-speed data points; improve fit sanity

* add engaged buffer

* revert lat_acc thresh

* use paramsd realtime process config

* make latacc-to-torque generic, and overrideable

* move freq to 4Hz, avoid storing in np.array, don't publish points in the message

* float instead of np

* remove constant while storing pts

* rename slope, offset to lat_accet_factor, offset

* resolve issues

* use camelcase in all capnp params

* use camelcase everywhere

* reduce latacc threshold or sanity, add car_sane todo, save points properly

* add and check tag

* write param to disk at end of route

* remove args

* rebase op, cereal

* save on exit

* restore default handler

* cpu usage check

* add to process replay

* handle reset better, reduce unnecessary computation

* always publish raw values - useful for debug

* regen routes

* update refs

* checks on cache restore

* check tuning vals too

* clean that up

* reduce cpu usage

* reduce cpu usage by 75%

* cleanup

* optimize further

* handle reset condition better, don't put points in init, use only in corolla

* bump cereal after rebasing

* update refs

* Update common/params.cc

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* remove unnecessary checks

* Update RELEASES.md

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 4fa62f1464
2022-09-19 15:19:26 -07:00
Vivek Aithal
5a097b3235 regenerate replay segments for torqued (#25805)
* update segments in test_processes

* bump cereal

* update refs
old-commit-hash: b133a4c9a8
2022-09-15 20:15:57 -07:00
Jason Wen
79dfc5293a Hyundai: Car Port for Tucson Hybrid 2022 (#25276)
* Hyundai: Car Port for Tucson Hybrid 2022

* Update RELEASES.md

* Init gear_msg at the top

* FW versions from script

* Button send attempt

* start with some cleanup

* Send button fixed bits

* Define all bytes and only send PAUSE/RESUME

* Use CRUISE_INFO to cancel cruise and resume

* 8-bit counter

* Cleanup ish

* 8 bit counter

* Send at 20ms

* Disengage bits

* Revert bump submodules

* Allow tx on 0x1a0

* Fix byte counts

* Send LFA and HDA icons based on engageability

* Send cruise buttons only on HDA2 cars for now

* Add comments

* Add FLAG_HYUNDAI_CANFD_HDA2 flag

* Update interface.py

* Update carstate.py

* Update carstate.py

* Update carstate.py

* Bump submodules

* Bump panda

* Bump opendbc

* Allow tx with CRUISE_INACTIVE

* GEAR has 24 bytes only

* Generate car docs

* Fix CRUISE_INFO copy

* Remove unused class

* Add CAN-FD busses to unit test

* Bump opendbc

* Revert "Add CAN-FD busses to unit test"

This reverts commit 2f751640408a7f73a9100947cbd95ea13fbb8a48.

* Remove duplicate

* New tune based on data

* Panda safety cleanup

* Include bus 0 in rx checks

* Missed one

* bus 6 check

* Remove redundant check

* Add comments

* Bump opendbc

* Sync with DBC

* Hide LFA icon when disengaged

* Little endian

* fix comment

* more conditions in carcontroller

* update pedal signal

* update tuning

* cleanup carcontroller

* bump panda

* fix mismatch

* alt buttons

* little more cleanup

* update refs for EV6 new safety param

* bump panda

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: bd5e28909f
2022-08-19 20:14:30 -07:00
Shane Smiskol
28a60fb42e process replay: initialize controlsState with original route (#25461)
* push

* do process replay

* commit

* update refs

* clean up

* clean up controlsd

* clean up controlsd

* Add assert

* debubuggier param name

* can be peristent

* Revert "can be peristent"

This reverts commit 6e6d3f6423c26a202623cef728e038259e9e46cd.

* Update selfdrive/test/process_replay/process_replay.py
old-commit-hash: 87ca42e993
2022-08-16 22:02:03 -07:00
Shane Smiskol
5e393a41a4 process replay: show errors when updating refs (#25460)
* Update test_processes.py

* Apply suggestions from code review
old-commit-hash: d7095d0d43
2022-08-16 19:39:11 -07:00
Jason Young
b1590ae851 VW PQ: Volkswagen Passat NMS (#24768)
* VW PQ: Volkswagen Passat NMS

* regen CARS.md

* vEgo from Bremse_1 vehicle speed

* sync opendbc to master

* handle checksums and counters in opendbc

* LDW HUD message handling

* GRA_Neu_Zaehler -> COUNTER

* bump opendbc

* stub in till we find platform ACC standstill

* bump opendbc

* bump opendbc

* placeholder lateral accel data

* regen CARS.md

* counters now directly supported in opendbc

* additional door-open signals

* add trunk lid state

* add doors and trunk lid to signals list

* LDW_Status updates and passthrough

* bump opendbc for typo fix

* update AWV comment

* another comment update

* regen CARS.md with PQ in dashcam only

* don't show NMS footnotes while still in dashcam

* polish

* add stubbed-out dashcamOnly prep

* VW MQB: Cleanup stock ACC button handling

* bump opendbc and panda

* use controls resume output as trigger

* these can wait until taco bell

* bump opendbc

* pass through of previously fixed value

* retry CI

* checks already done in carcontroller

* don't need these anymore

* reduce diff for now

* slightly better abstraction

* more engine and trans FW

* turn signal is instantaneous stalk position

* weak sauce :(

* better clarity

* try torque tune

* add test route references

* bump opendbc and panda for OP long

* don't show steering faults for 3 seconds after start

* longitudinal control senders

* a little more torque

* test hax to torque control

* test a little more delay

* allow use of manufacturer ramp-up rate

* soften wheel-touch threshold

* Revert "test hax to torque control"

This reverts commit d1af459c29e36264aae406f72b8fcbc9ef22b9e0.

* punch it Chewie

* better ACC state and mainswitch handling

* a little more

* tweak max accel gradient

* oops

* also oops

* stuff

* srsly

* that's not how this works

* regen CARS.md

* footnotes now properly excluded for dashcam cars

* this wasn't a problem

* update network location detection

* bump submodules for ACC main switch

* clean up DBC references and long flag

* bump one more time

* one more time

* follow CANPacker counter refactor

* bump opendbc

* sync opendbc to master

* bump panda to fix Subaru tests

* DBC handling cleanup

* fix

* model-year stretch

* cleanup and rate bugfixes

* better abstractions

* simplify create_lka_hud_control

* volkswagencan -> mqbcan

* bump panda

* fix doc data bug, regen CARS.md

* style updates; diff reduction

* use common button enable logic

* not needed anymore

* refactor TSK and HUD enum values

* make common button events function

* consistency

* bump panda

* bump panda

* dashcam only

* don't need process_replay yet

* regen CARS.md with Passat NMS in dashcam

* can't handle dashcam-orphaned footnotes yet

* remove outdated standstill handling

* editor tried to be too helpful at some point

* don't need to import this anymore

* Apply suggestions from code review

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* follow parkingBrake refactor

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: c27d7913f2
2022-08-16 14:32:59 -07:00
Shane Smiskol
64195b3c99 process replay: print correct ref path (#25448)
* fix log paths ref printing in process replay

* rm that

* this is easier to read

* fix model_replay
old-commit-hash: 4602e5a8f9
2022-08-16 00:32:42 -07:00
Adeeb Shihadeh
5263356958 remove CS.steeringRateLimited (#25251)
* remove CS.steeringRateLimited

* bump cereal

* update refs
old-commit-hash: d462a08056
2022-07-24 14:56:55 -07:00
Adeeb Shihadeh
b73f02bf45 controlsd: handle radar missing + cleanup system error handling (#25179)
* controlsd: handle radar missing + cleanup system erorr handling

* fix carla

* update refs
old-commit-hash: 505bbce29d
2022-07-14 19:55:18 -07:00
Adeeb Shihadeh
ef758e24b6 process replay: fix string failures after #25127
old-commit-hash: 780c60324b
2022-07-12 11:12:35 -07:00
Gijs Koning
7de5c548c4 Replay: Fix --upload-only (#25127)
Add checking for list back
old-commit-hash: f0b5ff5c1a
2022-07-12 05:03:35 -07:00
Gijs Koning
a1143bafc8 Replay: tolerances per field (#25116)
* tolerances per field in replay

* refactor

* Remove laikad parameters

* Small comment change
old-commit-hash: 4d7b7483d7
2022-07-12 03:36:57 -07:00
Adeeb Shihadeh
f3ddb32649 process replay: ensure enabled for significant amount of time (#25121)
* process replay: ensure enabled for significant amount of time

* update refs

* 10s is reasonable
old-commit-hash: 2ae52e9b22
2022-07-11 17:20:56 -07:00
Adeeb Shihadeh
2f7b2ce4d0 Ship EV6 (#25095)
* Ship EV6

* bump opendbc
old-commit-hash: d08a231774
2022-07-08 22:46:20 -07:00
Adeeb Shihadeh
733cacdd8f process replay: add Ram route (#25063)
old-commit-hash: 8d98d8c657
2022-07-07 10:28:55 -07:00
Gijs Koning
2a11354d28 Process replay: Fix subtest diff (#25054)
Fix subtest diff
old-commit-hash: edf170103e
2022-07-07 02:14:31 -07:00
Shane Smiskol
4eabd3b9d9 FW fingerprinting: log all FW versions (#25042)
* get_fw_versions returns all fw versions with request's brand

* keep track of everything received

* debug

* need to regen or write a hack in build_fw_dict

* to be safe, still replace old responses within same brands (hyundai responds to two queries, can fix later)

to be safe, still replace old responses within same brands (hyundai responds to two queries, can fix later)

* update test_fw_query_on_routes

* clean up

* better name

* slightly cleaner

* fix test_startup unit test

del

* fix imports

* fix test_fw_fingerprint

fix test_fw_fingerprint

fix

* fingerprint on all FW_VERSIONS, not just brands with requests

* support old routes in test_fw_query_on_routes

* regen and update refs

* similar function style to before

* better comment

* space

switch name

* try to exact match first

* useless else

* fix debug script

* simpler dictionary

* bump cereal to master
old-commit-hash: ea241bf3dc
2022-07-06 19:42:58 -07:00
Gijs Koning
76aaef497b Add laikadOffline subtest to process replay. (#24995)
* Add subtests to process replay.
Adds laikadOffline subtest

* Update cpp.

* Update ref

* Update ref again

* Update ref again

* update ref

* Fix disabling fetching orbits

* Add proc name to event exception

* update ref

* Update setup_env

* Fix offline test and update refs
old-commit-hash: c49f997be5
2022-06-30 08:39:12 -07:00
Shane Smiskol
fda3609f6a process replay: clean up common code (#24855)
* regen and process replay clean up

* test_fuzzy actually uses fingerprint hardcoding

fix

* revert

* revert

* this can be a url or path so just print full variable
old-commit-hash: 170ed3d761
2022-06-14 12:03:30 -07:00
Adeeb Shihadeh
3c48bc47b7 Move a bunch of stuff to system/ part 3 (#24829)
* move swaglog.py

* timezoned

* logmessaged

* version.py

* fix linter
old-commit-hash: 0fce5d9045
2022-06-11 23:19:27 -07:00
Lukas Petersson
35f277516e process replay: upload-only bug (#24722)
dont look for lr with upload only
old-commit-hash: 50a8b30580
2022-06-02 17:25:44 -07:00