Commit Graph

457 Commits

Author SHA1 Message Date
Kurt Nistelberger
683096e309 update replay refs 2022-09-28 21:38:31 -07:00
HaraldSchafer
1007df874f Minor ACC fixes (#25911)
* Change cruise accel limits

* Long tuning script looks good

* Cap cruise slowdown aggression in e2e mode

* Revert atau change

* Cleanup

* Update ref

* fix ref
2022-09-28 13:27:07 -07:00
Kurt Nistelberger
96ed5aa581 Sensor events regen (#25903) 2022-09-27 20:33:45 -07:00
Adeeb Shihadeh
4693a9d358 update refs 2022-09-22 10:40:23 -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
85ed5c4cb5 Torque Refactor (#25822)
* add torque gains refactor

* update refs

* avoid dict, use cereal struct

* bugfix

* no as_builder

* address final comments
2022-09-17 00:07:54 -07:00
Willem Melching
f73b041d43 Hyundai: match ego speed on dash (#25235)
* hyundai: match speed on dash

* still needs conversion to m/s

* always use CF_Clu_VehicleSpeed2

* clean up, like honda

* experiment

* to the source

* works pretty well on optima (matches exactly on Sonata)

* could be 0.5

* clean up test

* revert test_moedls

revert test_moedls

* woops

* woops.

* .

* fix hyst

* only CF_Clu_VehicleSpeed

* omgomgomg

* add all this mess because it always takes a while

* set vEgoCluster

* fix all rounding errors

* stash

* clean up

* clean up

* fix metric conversion

* only calculate when updated

* try to filter (didn't look great from plots)

* Revert "try to filter (didn't look great from plots)"

This reverts commit 7e9876c237341d07163985b0718fd9c553372e72.

* clean up

* update refs

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2022-09-16 17:33:38 -07:00
Shane Smiskol
b7dc1968cd GM minSteerSpeed: add some tolerance for Volt (#25809)
* add some tolerance for volts

* add comment

* update refs
2022-09-15 21:21:10 -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
Adeeb Shihadeh
a9f88503fe update refs 2022-09-15 13:55:36 -07:00
Shane Smiskol
d57e07eec0 HKG: lower torque rate limits for CAN-FD cars (#25770)
* Change ramp limits to 2/2 for CANFD cars

* Only the high torque CANFD cars

* comment

* Update selfdrive/car/hyundai/values.py

* Better to do 2/3 and for all cars

* bump to master

* update refs
2022-09-15 11:28:49 -07:00
Willem Melching
e699b0994c Honda: match current speed on dash (#25232)
* Honda Bosch: match speed on dash

* present on all cars

* all honda

* more explicit switching

* hyst

* hyst

* clean up

* Update ref_commit

* no bitwise

no bitwise

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2022-09-14 15:40:36 -07:00
Shane Smiskol
992707c172 controls: enter overriding state for steering override (#25617)
* lateral overriding is overriding

* Update test

* remove

* also could do something like this and only have one OVERRIDE ET

* Revert "also could do something like this and only have one OVERRIDE ET"

This reverts commit 5c381641c08961676a56a9718fbdaa84989ac249.

* full names

* bump cereal

* test every event type

* update refs
2022-09-13 23:20:45 -07:00
Shane Smiskol
973ea7440c Car docs: CAN-FD cars do not yet have op long (#25707)
* CAN-FD cars do not yet have op long

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-09-08 11:41:29 -07:00
HaraldSchafer
da6c7311a3 Improve Hyundai long control, and conform to longcontrol API boundaries (#25696)
* Variety of experimental improvements

* fix start accel

* typo

* No jerk, no go

* Set jerk limit lower

* Update ref
2022-09-07 19:09:37 -07:00
Adeeb Shihadeh
655a64b603 single longitudinal toggle for e2e and disable radar (#25688)
* single longitudinal toggle for e2e and disable radar

* write disable radar param

* rename

* better param name

* clean that up

* update refs

* update translations

* not live for experimental

* write it out

* vanish
2022-09-07 17:12:49 -07:00
HaraldSchafer
210a6163ac Let planner decide stopping state (#25643)
* Let planner decide stopping

* Refactor stop/start state machine

* Stay stoppe condition

* 1sec from target

* Add starting state

* Add starting state logic

* Undo some changes

* Update ref
2022-09-06 21:30:10 -07:00
Shane Smiskol
80533d6c03 Toyota: match dash set speed (#25649)
* toyota: match set speed from dash

* Use unit bit

* Use RSA2

* flip this

* Universal unit signal, set vEgoCluster

* remove this and bump opendbc

* detect if car interface sets cluster fields

* revert

* needs to be cp

* UI_SPEED is actually always in kph?

* forgot to actually convert it

* same in onroad

* try conv factor only for imperial

* Seems like UI_SPEED is not the UI speed at all

* the dash might floor it

* same openpilot behavior

* bump

* ego speed factor is dynamic across speeds, handle Lexus exceptions with
diff msg

* remove test, bump opendbc

* secret formula

* secret formula v2

* 1.03 is sufficient

* try short press

* bump opendbc

* surely this can be cleaned up

surely this can be cleaned up

* use filter

* redo factors

* try UI_SPEED again with a factor

try UI_SPEED again with a factor

* dash applies hysteresis to speed. this matches pretty well, but not exactly

* match only set speed

* clean up

* clean up

clean up

* Update ref_commit

* update refs

Co-authored-by: Willem Melching <willem.melching@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-09-05 13:57:07 -07:00
HaraldSchafer
2eff6d0ebd Remove lane planning code (#25651)
* Remove all lane planning logic

* Revert "Update ref"

This reverts commit 8dcb08ebccbb5641443459ac40601a95cf605682.

* bump cereal

* Update ref
2022-09-04 13:07:51 -07:00
HaraldSchafer
593dfd0aed Faster a_ego filter (#25646)
* Faster a_ego filter

* :x
Update ref

* typo

* update ref
2022-09-02 16:19:06 -07:00
Shane Smiskol
3b602e2844 GM: update minimum steer speed (#25618)
* EUV is 10 kph

* Update ref_commit

* temp

* Revert "temp"

This reverts commit 90ce28b06ba623e7bd1252798af3c285b465e0ec.
2022-09-02 13:41:58 -07:00
Shane Smiskol
452d5e42ec Car docs: add auto-resume column (#25572)
* Move auto resume in sng to car interface

* Update docs

* shorter name, star

* order

* resumes?

* add hidden detail sentence

* good to know this works, but revert

* VW auto resume

* bump cereal to master

* Update ref_commit

* match cereal

* try this

* ?

?

* like this
2022-08-30 17:54:40 -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
e5bb55ccd6 Toyota: remove STEERING_LKA frequency check (#25490)
* remove STEERING_LKA frequency check

* bump to master

* Update ref_commit
2022-08-18 22:23:39 -07:00
Shane Smiskol
5ed587ebef controls: block resume if cruise not previously engaged (#25402)
* see if this works at all

* can revert this

* think adding a no entry conditionally is nicer

* then we can revert this

* 0 makes more sense

* Revert "0 makes more sense"

This reverts commit efc89e8a2389ef58fbc0cec0a2872d24db524867.

* gm CC uses > 70

* bump cereal

* comment

* test on Honda

* whoops

* works

* add exception with todo

* moved button enable events to controlsd

* get rid of that

get rid of that

* different values for now

* car interfaces add enable event, controlsd can block it

* Regen and update refs

* delete if not set

* One place

one place

* regen routes are uninitialized first few frames

* Trim start of segment so it's like original segment

* stash

* regen

* not working

* clean up

* more cleanup

* revert

* bump ceral

* actually check resume button

* whoops

* pcmCruise cars don't use setSpeed, so we're good

* engage correctly in sim

* Update ref_commit

* Update refs
2022-08-17 18:03:33 -07:00
Adeeb Shihadeh
e0e0aad144 Chrysler: ensure control bit is high before torque cmd (#25465)
* Chrysler: ensure control bit is high before torque cmd

* move that & update refs

* check control bit too
2022-08-17 15:20:18 -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
f341df006a GM: move set speed scaling to DBC (#25422)
* Move scaling into DBC for GM cruise setpoint

* bump opendbc

* no int

* Update refs

* Update ref_commit
2022-08-15 02:13:09 -07:00
Jason Young
1f0a435763 VW: Additional PQ / long control prep (#25427)
* VW: Longitudinal support prep

* minimize diffs

* make common button events function

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-08-13 11:45:23 -07:00
Robbe Derks
24645c92da Use steeringAngleDeg for angle control saturation warnings (#25404)
* use steeringAngleDeg for angle control cars

* update refs
2022-08-12 11:30:19 +02:00
HaraldSchafer
041458f632 Falcon Punch Model: turn cutting improvements (#25413)
* simplified change to mpc dynamics

* add jerk pts

* increase jerk cost

* increase jerk pts multipler to master value

* Add final commit

* 1456d261-d232-4654-8885-4d9fde883894/440 ac1a6744-85b0-4ec6-8ba7-608d0717b8f1/750

* some copies are useful

* update model replay ref

* less frames in model replay onnx cpu

* 1456d261-d232-4654-8885-4d9fde883894/440 264b67f5-3f52-4b58-b11f-58dd8aaf08bf/950

* 1456d261-d232-4654-8885-4d9fde883894/440 236fc556-fba3-4255-8ccf-684b22637160/950

* c9d10c64-bea4-41ec-8ca3-d8c886fda172/440 26d73dd2-862a-44ae-bbdd-32cc4f397ad7/900

* Fix couple tests

* Update ref

* Unused for now

* Add lateral factor comment

* Unused variable

Co-authored-by: nuwandavek <vivekaithal44@gmail.com>
Co-authored-by: Bruce Wayne <yassine@comma.ai>
Co-authored-by: Yassine Yousfi <yyousfi1@binghamton.edu>
Co-authored-by: Bruce Wayne <batman@gpu06.internal>
2022-08-12 00:47:59 -07:00
cydia2020
88e034a2a3 Toyota: Send ACC_HUD immediately on fcw (#25348)
* Send ACC_HUD immediately on fcw

* update refs

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2022-08-04 23:24:20 -07:00
Jason Shuler
4bfbd7ced8 GM: parse low and manumatic gears (#24764)
* Switch to ECMPRDNL2 for GM gear

* Removing manumatic gear #

* formatting

* update refs

* update refs

* line

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2022-08-03 15:52:12 -07:00
HaraldSchafer
772b748689 Cleanup calibration code (#25119)
* First attempt

* worksish

* tests pass

* cleanup

* get rid of garbahe

* fix name

* Still used in xx

* add debug functions

* used

* Revert "used"

This reverts commit 276e8ebab06d2d4f0e9927ba32b7d8aca2bf88c3.

* Update ref
2022-08-01 20:35:14 -07:00
Adeeb Shihadeh
9eb27259c7 Subaru: set cruiseState.standstill (#25320)
* Subaru: set cruiseState.standstill

* only global
2022-08-01 09:48:03 -07:00
Adeeb Shihadeh
efa326e208 Subaru: 2020 Outback support (#25248)
* Subaru: 2020 Outback support

* bump panda

* bump panda

* update refs

* update refs
2022-07-31 12:43:27 -07:00
ZwX1616
22408781f7 Remove RHD toggle: determine by driver side instead (#24802)
* driverview

* auto choose

* useless

* remove

* modeld not use toggle

* remove from params

* should have commissue anyway

* delete icon file

* deal with init more elegantly and prohibit switching when engaged

* nonblock save when not unstable

* filter very low speeds

* a few more secs dont harm

* draw icon

* match

* radius

* use const

* ref commit

* new transs

* put_bool_nonblocking

* 5k route tune

* ref comm

Co-authored-by: Comma Device <device@comma.ai>
2022-07-29 13:52:24 -07:00
Adeeb Shihadeh
7fee45ad6c Subaru: log EPS torque (#25304)
* Subaru: log EPS torque

* update refs
2022-07-28 16:42:42 -07:00
Adeeb Shihadeh
5101a7cf88 Chrylser: some Ram 1500 can steer to 0 (#25279) 2022-07-25 15:21:58 -07:00
Adeeb Shihadeh
347455325e Mazda: use torque controller (#25265)
* Mazda: use torque controller

* update refs

* update refs
2022-07-25 15:16:38 -07:00
Adeeb Shihadeh
49bd53549d Chrysler: increase steering angle resolution (#25278) 2022-07-25 14:46:21 -07:00
Jason Young
0574b8504f VW MQB: Cleanup stock ACC button handling (#25168)
* VW MQB: Cleanup stock ACC button handling

* use controls resume output as trigger

* these can wait until taco bell

* pass through of previously fixed value

* retry CI

* checks already done in carcontroller

* don't need these anymore

* reduce diff for now

* remove parenthesis

* update refs

* fix packer exception

* update refs

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2022-07-25 14:15:14 -07:00
Adeeb Shihadeh
d462a08056 remove CS.steeringRateLimited (#25251)
* remove CS.steeringRateLimited

* bump cereal

* update refs
2022-07-24 14:56:55 -07:00
Willem Melching
f0d494b752 Nissan: cleanup set speed (#25233)
* Nissan: cleanup set speed

* update ref
2022-07-22 16:25:06 +02:00
Adeeb Shihadeh
0ca62bf7df let can packer handle counter (#25240)
* let can packer handle counter

* diff is expected

* update refs

* clean that up

* bump opendbc

* fix sim
2022-07-21 20:54:53 -07:00
Willem Melching
c3e95d5e19 prereq for matching speeds shown on cars dash (#25222)
* prereq for matching speeds shown on cars dash

* also handle fallback in the ui for replay

* update translations

* update ref
2022-07-21 14:48:08 +02: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
d5719913a9 Chrysler: never drop control bit on older models (#25159)
* Chrysler: never drop control bit on older models

* update refs
2022-07-13 13:22:30 -07:00
Adeeb Shihadeh
97d7ee369b Chrysler: send LKAS control bit while above minSteerSpeed (#25150)
* Chrysler: send LKAS control bit while above minSteerSpeed

* update refs

* rework that a bit

* little more

* update refs
2022-07-12 23:11:55 -07:00
Adeeb Shihadeh
44c6ca7eb4 EV6: reject fake cruise engagements (#25143)
* EV6: reject fake cruise engagements

* bump panda

* raise to 8

* update refs

* bump panda

Co-authored-by: Comma Device <device@comma.ai>
2022-07-12 18:23:48 -07:00