Commit Graph

123 Commits

Author SHA1 Message Date
Justin Newberry
7b5d4d031a Revert "Process Replay: move to pytest (#30260)" (#30687)
This reverts commit 90c873ab1d.
2023-12-11 14:46:56 -08:00
Shane Smiskol
97da129e11 ruff: check newline (#30668)
* check newline

* nothing catches this
2023-12-09 13:24:18 -08:00
Justin Newberry
31c682d407 Pytest: load by group by default (#30466)
* wip

* use a class marker

* this one should be grouped too
2023-11-14 17:33:47 -08:00
Justin Newberry
90c873ab1d Process Replay: move to pytest (#30260)
* process replay pytest

* enable long diff

* readd job name

* make it executable

* cleanup imports

* retrigger
2023-11-13 13:50:23 -08:00
YassineYousfi
4c2bd853e4 (New) Lemon Pie Model 🍋 (#30209)
* 6f6e3749-1b7c-42e8-a33b-03929b7fc476/700

* oops deleted too much

* 1b4308b7-a659-4ebd-b4c6-c81c1c3890f8/700

* 1be192f3-f407-4217-9757-78b9ad92750a/700

* remove some todos

* more cleanup in lat planner

* vego > min_speed

* regen and update process replay refs

* update model replay ref

* update model replay ref commit again

* Revert "update model replay ref commit again"

This reverts commit 922cb796b8dfe264b0cce7a18206bb898b18bcb3.

* update again

* bump cereal
2023-11-02 14:01:00 -07:00
Kacper Rączy
e5eea7276f regen: update refs with dummy dcamera (#30347)
Update refs
2023-10-30 15:33:17 -07:00
Justin Newberry
def2b93895 compare_logs: better names for short/long diffs (#30263)
* better names

* dont need that

* those too
2023-10-16 17:04:14 -07:00
Justin Newberry
d23f5d2ec5 test_processes: assert that mazda is tested (#30258)
mazda left dashcam mode
2023-10-16 12:18:25 -07:00
Shane Smiskol
a1ca5dc484 scripts: format diff when comparing logs (#30174)
* move format diff to compare_logs to pretty print

* smaller
2023-10-04 22:59:03 -07:00
Lee Jong Mun
238f9d65db cleanup remnants of LQR and INDI tuning (#29860)
* not use 'indi' cleanup

* bump cereal

* rm more

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-09-10 16:30:13 -07:00
Adeeb Shihadeh
4d6bb32df2 process replay: parallel by default (#29633)
* process replay: parallel by default

* more is helpful
2023-08-25 14:41:43 -07:00
Adeeb Shihadeh
a9626f95b6 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
2023-08-20 20:49:55 -07:00
Harald Schäfer
1dea20e574 Proc replay: field tolerance unused (#29479)
field tolerance unused
2023-08-20 13:05:18 -07:00
Justin Newberry
7fdd9fc37c 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
2023-08-09 13:26:54 -07:00
Justin Newberry
a91764954b Revert "CI: pylint to ruff (#29276)" (#29284)
This reverts commit cb31a53d8a.
2023-08-08 14:24:04 -07:00
Justin Newberry
cb31a53d8a CI: pylint to ruff (#29276)
* pylint to riff

* pylint to riff

* pylint to riff

* revert more

* undo exclude removal

* exclude tinygrad
2023-08-08 13:41:30 -07:00
Kacper Rączy
b2d0f74ec3 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
2023-07-18 14:56:24 -07:00
Kacper Rączy
2c617e0c7a 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
2023-06-22 17:36:25 -07:00
Kacper Rączy
a2e75fdea6 process_replay: progress bar support (#28447)
* Add support for tqdm progress bar

* Fix argument name
2023-06-07 16:23:40 -07:00
Kacper Rączy
64377a88f9 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
2023-06-06 10:31:13 -07:00
Harald Schäfer
598343aad1 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>
2023-05-15 09:29:57 -07:00
Cameron Clough
51d41a3336 test Ford in process replay (#28112) 2023-05-04 14:47:39 -07:00
Shane Smiskol
d05d9dac04 Ford: remove from dashcam (#28103)
* no dashcam 🎉

* update docs

* not these

* update refs

* bump panda
2023-05-04 06:55:09 +00:00
Harald Schäfer
06756f4533 New process_replay segment with latest ublox logs (#28038)
* Add new segment

* Update ref_commit
2023-04-30 18:24:20 -07:00
Bruce Wayne
613bbcd626 Revert "LaikaD: new proc_replay segment and no internet laikad (#28029)"
This reverts commit fbb7dcb19c.
2023-04-26 19:20:05 -07:00
Harald Schäfer
fbb7dcb19c LaikaD: new proc_replay segment and no internet laikad (#28029)
* no internet in CI

* add new segment

* new ref
2023-04-26 16:01:39 -07:00
Adeeb Shihadeh
7319afbd51 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
2023-03-21 16:43:40 -07:00
Shane Smiskol
e729f5b763 Remove dashcam override param (#27509)
* remove dashcam override

* sort

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

* update refs

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

* fix dashcam cars

* clean up

* fix NotImplementedError

* Update refs
2023-01-27 14:14:04 -08:00
Shane Smiskol
e971bb11c2 Hyundai: bump safety params (#26407)
* bump panda

* bump panda

* bump panda

* update refs

* bump panda

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

* new route

* update refs

* new route

* update refs

* new test routes

* bump
2022-10-19 14:21:03 -07:00
Adeeb Shihadeh
c782380fc1 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
2022-10-12 21:54:08 -07:00
Shane Smiskol
4bd146ee7a 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
2022-09-30 15:43:04 -07:00
Shane Smiskol
75735675bd process replay: rename second HYUNDAI entry 2022-09-30 14:49:27 -07:00
Kurt Nistelberger
96ed5aa581 Sensor events regen (#25903) 2022-09-27 20:33:45 -07:00
Vivek Aithal
4fa62f1464 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>
2022-09-19 15:19:26 -07:00
Vivek Aithal
b133a4c9a8 regenerate replay segments for torqued (#25805)
* update segments in test_processes

* bump cereal

* update refs
2022-09-15 20:15:57 -07:00
Jason Wen
bd5e28909f 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>
2022-08-19 20:14:30 -07:00
Shane Smiskol
87ca42e993 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
2022-08-16 22:02:03 -07:00
Shane Smiskol
d7095d0d43 process replay: show errors when updating refs (#25460)
* Update test_processes.py

* Apply suggestions from code review
2022-08-16 19:39:11 -07:00
Jason Young
c27d7913f2 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>
2022-08-16 14:32:59 -07:00
Shane Smiskol
4602e5a8f9 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
2022-08-16 00:32:42 -07:00
Adeeb Shihadeh
d462a08056 remove CS.steeringRateLimited (#25251)
* remove CS.steeringRateLimited

* bump cereal

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

* fix carla

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

* refactor

* Remove laikad parameters

* Small comment change
2022-07-12 03:36:57 -07:00