Commit Graph

92 Commits

Author SHA1 Message Date
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
Adeeb Shihadeh
2ae52e9b22 process replay: ensure enabled for significant amount of time (#25121)
* process replay: ensure enabled for significant amount of time

* update refs

* 10s is reasonable
2022-07-11 17:20:56 -07:00
Adeeb Shihadeh
d08a231774 Ship EV6 (#25095)
* Ship EV6

* bump opendbc
2022-07-08 22:46:20 -07:00
Adeeb Shihadeh
8d98d8c657 process replay: add Ram route (#25063) 2022-07-07 10:28:55 -07:00
Gijs Koning
edf170103e Process replay: Fix subtest diff (#25054)
Fix subtest diff
2022-07-07 02:14:31 -07:00
Shane Smiskol
ea241bf3dc 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
2022-07-06 19:42:58 -07:00
Gijs Koning
c49f997be5 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
2022-06-30 08:39:12 -07:00
Shane Smiskol
170ed3d761 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
2022-06-14 12:03:30 -07:00
Adeeb Shihadeh
0fce5d9045 Move a bunch of stuff to system/ part 3 (#24829)
* move swaglog.py

* timezoned

* logmessaged

* version.py

* fix linter
2022-06-11 23:19:27 -07:00
Lukas Petersson
50a8b30580 process replay: upload-only bug (#24722)
dont look for lr with upload only
2022-06-02 17:25:44 -07:00
Shane Smiskol
6a21cc83ff process replay: fix tested_cars 2022-06-02 14:20:19 -07:00
Shane Smiskol
90af436a12 process replay: fix updating refs (#24716)
fix updating refs
2022-06-02 13:49:21 -07:00
Lukas Petersson
86f73a507e process replay: logreader as bytes (#24610)
* willem's changes

* classmethod for bytes

* submodules

* submodules

* Update tools/lib/logreader.py

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

* add back files

* little cleanup

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-06-01 22:02:42 -07:00
ClockeNessMnstr
3fb22c0289 process replay: only download used logs (#24661)
* only download wanted logs

* cleanup

* cache as an option

* cleanup

* Readme

* Revert "cache as an option"

This reverts commit 060ed4ade548696505e3185fc7d20f1897072ded.

* cleanup

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-06-01 21:46:45 -07:00
Shane Smiskol
dff70876c3 process replay: fix updating refs after regen (#24656)
* fix updating refs after regen

* match spacing

* same as before

* fix

* minimize diff

* update

* not used
2022-05-26 00:39:33 -07:00
Lukas Petersson
3e975eb3aa process replay: update regen body route (#24648)
update to a preserved route
2022-05-24 17:07:10 -07:00
Lukas Petersson
444d265821 process replay: support running in parallel (#24534)
* prefix params

* set env

* prefix in manager

* filesystem except

* dont delete manager folder

* Update selfdrive/common/params.h

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

* debug same path

* remove cleanup + same default

* dont use filesystem lib

* param symlink path

* prefix helpers

* path

* dont delete d

* parallel loop

* refactor loop

* msgq

* clean msgs

* spelling

* nestable pool

* spelling

* logreaders in parallel

* bugfix

* assert msgq

* Update selfdrive/test/process_replay/test_processes.py

Co-authored-by: Shane Smiskol <shane@smiskol.com>

* Update selfdrive/test/process_replay/test_processes.py

Co-authored-by: Shane Smiskol <shane@smiskol.com>

* assert in cereal

* folder exists

* create dirs in test

* bump cereal

* Update selfdrive/test/process_replay/process_replay.py

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

* PR feedback

* params path in basedir

* ref commit

* param path

* bugfix

* upload_only

* param path

* Update selfdrive/test/process_replay/process_replay.py

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

* msgq path name

* python concurrency.features

* progress bar

* remove progress bar from compare logs

* Update selfdrive/test/process_replay/test_processes.py

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

* Update selfdrive/test/process_replay/test_processes.py

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

* defaultdict

* context manager

* update refs

* dont get logs if upload only

* upload refs in parallel

* cleanup

* Update selfdrive/test/process_replay/test_processes.py

Co-authored-by: Shane Smiskol <shane@smiskol.com>

* cleanup

* text

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
2022-05-18 19:59:30 -07:00
Shane Smiskol
d686f9e527 process replay: save logs to folder (#24509)
* save logs to folder for proc replay

* use fakedata dir

* fix

* only once and where needed
2022-05-12 19:19:47 -07:00
Shane Smiskol
934bc1e6fb process replay: don't print diff when only uploading (#24514)
when only uploading no need to print success status or update diff

don't print succeed/fail when only uploading
2022-05-12 17:05:22 -07:00
grekiki
17e33978cd Mypy fixes for --check-untyped-defs (#24372)
more type fixes
2022-05-12 14:08:11 +02:00
Shane Smiskol
d2d3b7b823 process replay: automatically push refs on fail (#24414)
* test failure()

* let's just change a tune here

* debug

revert

* debug

* use current commit, not ref_commit

fix

* need to figure out better place for this

* quick test

* test without upload

* temp

* use azure token

* fixes

* shouldn't need this

* debug

* debug

* not getting anything?

* does this mean nothing gets envvars?

* add azure token to docker environment variables

* quote

* move back

* clean up a bit

* more clean up

* like this sorting better

* replace flags with CI and clean up

* test FULL_TEST and minimalize diff a bit

* now test all

* revert tests comments

* remove flags

* revert this

revert this

* now make it fail

* now update ref_commit to last commit (make sure we can re-start this test if we commit before last one finishes uploading)

* fix

fix

fix

fix

* bad commit

* why is it not throwing an exception?

* debug

* URLFile returns empty bytes if using cache and remote file doesn't exist

* we always need to download anyway

* debug...

* duh, wrong file. but neither should have it

* add that back and just check explicitly

* check both

* clean up and make a diff

* stylize

* see if this is a better diff on files changed

* update refs

* revert changes

* only for owners or members

* if we have token access

* if we have token access

* if we have token access

* move up

* clean up

* revert

* move update refs to test_processes

* clean up

* update messages

* update msg

* update README and delete update_refs

* this isn't possible to reach anymore

* fix readme

* better help message

better help message

better help message

* only show basename when uploading, only if failed to find

* test diff

* fix printing old ref commit

* change to using

* update refs

* Revert "update refs"

This reverts commit 2e352a736a6de68e2c7064daa4e2e9409ce77686.

* revert

* ref refers to reference commit/logs, cur refers to current logs/commit (future ref)

* like for better

* Apply suggestions from code review

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

* Update selfdrive/test/process_replay/test_processes.py

* every time lol

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-05-11 15:03:05 -07:00
Shane Smiskol
4190d2608a Change safetyParam to uint16_t (#24376)
* bump panda & cereal

* bump panda

* rest of references

* regen TOYOTA with safety param 578, TOYOTA2 with 329

* regen rest of routes

* update ref

* bump cereal
2022-05-02 13:34:31 -07:00
Shane Smiskol
c1caca104f Support RAV4 Hybrid 2022 with stock longitudinal (#23969)
* add panda flag for toyota stock long with camera

* clean up

* Add 2022 RAV4 Hybrid from Philly

* fix wrong fw in interface, did this ever work?

* Must be a hybrid

* no radar parsing

* fix can error

* move to own platform

* generate docs

* fix

* Add 2022 Rav4 XSE Australia fingerprint parameters (#24303)

* Update values.py

Add 2022 Rav4 XSE Australia

* add commas

Co-authored-by: Shane Smiskol <shane@smiskol.com>

* bump panda

* wait, the camera doesn't even send 0x343, right?

* use a set instead, more obvious

* don't test without a parser

* bump panda

* flip panda flag

* bump panda

* add commas

* regen and update refs

* set to none by default

* revert parenthesis

* update comment

* bump panda

* regen and update refs

* add test models and update readme

* bump to master

Co-authored-by: BrettLynch123 <34538435+BrettLynch123@users.noreply.github.com>
2022-04-28 22:37:46 -07:00
Shane Smiskol
66dd8f934c safety param: make uint16_t (#24362)
* only use half of the available bytes

* move to set_safety_model

* regen and update refs

* last two

* bump to master
2022-04-28 17:56:34 -07:00
Adeeb Shihadeh
3e098c9ba5 Toyota: add safety param flag for alt brake message (#24341)
* Toyota: add safety param flag for alt brake message

* update refs

* update refs

* bump panda
2022-04-27 12:08:11 -07:00
Shane Smiskol
6e62df65d7 Make safetyParam unsigned (#24160)
* bump panda & cereal

* make unsigned in boardd

* update health packet version

bump panda

* fix definition

* bump

* regen TOYOTA2 route

* upload route

* oh, ndog param wasn't being set

* regenerate routes with non-zero safety params

* update refs

* regen routes and update refs

* bump panda

* update refs

* update refs

* bump submodules to master
2022-04-21 00:01:05 -07:00
Shane Smiskol
1a5ddfaedd regen: check if regenerated route is enabled (#24207)
* check if regenerated route is enabled

* elif

* initialize CUDA runner before all other processes

* Revert "initialize CUDA runner before all other processes"

This reverts commit 124e3dd4d3408b6649f40b3e6e7f217ca347f59f.

* add back fixes

* fix typo
2022-04-13 18:01:16 -07:00
Adeeb Shihadeh
6c5b0685da body: set fault state (#24125)
* body: set fault state

* fix that

* update refs
2022-04-04 23:05:40 -07:00
Adeeb Shihadeh
00ebd10b87 body: only control while engaged (#24114)
* body: only control while engaged

* bump panda

* remove that

* bump panda

* update refs

* update refs
2022-04-04 19:37:21 -07:00
Adeeb Shihadeh
e40c36f22b better support non-car robots (#24106)
* better support non-car robots

* bump cereal

* update refs
2022-04-01 20:03:20 -07:00
Igor Biletskyy
031f79ba88 car port: comma body (#24019)
* body FPv2

* ..

* ..

* ..

* Temp, REVERT!

* more cleanup

* typo

* ..

* del eyes

* should work?

* fix

* new dbc

* ..

* fixes

* static analysis

* cln balancing code

* no test route

* excluded_interfaces

* THE DOCS!

* comments on steer/speed mixin

* switch to bus 0

* less UDS

* FAKE bus 0 vin and fingerprint

* FAKE locationd

* Keep steady and remove handcoded offset

* Improve startup sequence, get closer to stock openpilot

* Forgot to define angle

* lowercase

* revert that

* little cleanup

* change safety model

* update refs

* body is gold

* handle no llk

* oops

* litte more

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-03-31 17:16:15 -07:00
Willem Melching
d3d10e014a Ensure controlsd can engage again in process replay (#23556)
* hacks to make process replay engage again

* dont change that

* enable engagement check again

* chmod +x

* first working regen

* proper logMonoTime

* fix video framerate consistency

* mpc is valid again

* proper alive checks

* revert loggerd change

* ensure engaged in regen, fix managerState, peripheralState

* ubloxRaw is unused

* add submaster config for gm

* regen all services we can run without HW

* fix loggerd

* loggerd: matroska without the extension

* update ref
2022-01-21 13:13:34 +01:00