Skip to content

Commit

Permalink
Masteryota
Browse files Browse the repository at this point in the history
Masteryota

Masteryota

This reverts commit 916f2de.

1.8 accel max

1.25 follow

Copied Sport vals from SA-Eco

3 hours off / saves your 12v battery

Testing if the deadzone is causing the delay

Or maybe it's the high ki values. Testing old known values from previous versions of OP. No deadzone

Toyota logo instead of comma

1.2 follow

Fork mods

Fork mods

lower gain, higher prediction, stiffer wheel, higher steer ratio

Fork mods

commit 5c673b6399737b3e0b9d9d54e0b830e0cb04b185
Author: cfranhonda <46506059+cfranhonda@users.noreply.github.com>
Date:   Wed Jul 28 15:47:27 2021 -0700

Fix steer max and make ki a bit higher.

commit 039cf40ab0ac72ced1c19de6854b7761a109d4e6
Author: Casey Francis <@cfranhonda>
Date:   Tue Jul 27 23:19:30 2021 -0700

add LQR for other bosch kids

commit 95efde9a50bc4ca38a81e5cfdb86d1307db41f3c
Author: Casey Francis <@cfranhonda>
Date:   Tue Jul 27 22:34:51 2021 -0700

add LQR tune

Fork mods

commit 9b45eb1
Author: Daehyuk Ahn <daehyuk@live.com>
Date:   Mon May 24 23:14:34 2021 -0700

Add EnableGasPedal (toggle menu)

commit 4e9ac3b
Author: Casey Francis <@cfranhonda>
Date:   Sat Aug 21 17:36:22 2021 -0700

full speed fan

commit 152dec1
Author: Casey Francis <@cfranhonda>
Date:   Sat Aug 21 07:45:17 2021 -0700

add vision/ disable radar toggle

commit 5c48f3e
Author: Casey Francis <@cfranhonda>
Date:   Sat Aug 21 07:35:54 2021 -0700

vaggy hack to stop jerk

commit 87328dd
Author: cfranhonda <46506059+cfranhonda@users.noreply.github.com>
Date:   Mon Aug 23 07:15:05 2021 -0700

eps mod / gasmax adjust

commit baffaee
Author: Vehicle Researcher <user@comma.ai>
Date:   Sun Aug 22 22:13:11 2021 -0700

openpilot v0.8.8 release

adding "," fws for modded people

Update thermald.py

No sound for Saturated steering

remove no gps alert

Update power_monitoring.py

Update interface.py

green instead of red path

LQR toggle

add LQR toggle for select Honda's

add LQR toggle for modded Civic's & CRV

Revert "Universal LQR tune"

This reverts commit c10adf7.

add LQR toggle

change description

Universal LQR tune

Universal LQR tune

This tune taken from the Toyota Rav4 has shown to be a great
alternative to the standard PID tune. It's worked very well on eps mod
multipliers of 2, 2.5, 3.5, 4x. It climbs the torque scale much
smoother and doesn't "jitter" like PID does sometimes.

fix LQR for RDX

kf under PID only.

add Accord to LQR toggle

Conflicts:
	selfdrive/boardd/boardd.cc
	selfdrive/controls/lib/events.py
	selfdrive/ui/qt/offroad/settings.cc

LQR toggle

lower ff

+25% Cruise max

add to release notes

paramsd cpu usage has been increasing

boardd: connect to all pandas if none specified (commaai#23805)

Refactor convolutions (commaai#23807)

* one conv with defines

* add conv

* building works on C3

* this is num_outputs too, process replay is so useful

cleanup import chaining of T_IDXS (commaai#23806)

bump panda

ui.py: fix model lead plotting

Param to allow upload over cellular (commaai#23811)

* param to allow upload over cellular

* brackets to be consistent

* move outside loop

* fix tests

longitudinal planner: disable change cost when stopped. not engaged or gas pressed (commaai#23639)

* disable change cost completely on standstill and gas press

* cleanup

* set accel to zero

* clean up logic around standstill

* update ref

onroad_test: increase camerad cpu usage after debayer changes

Update raw_logger/framereader to new new ffmpeg api (commaai#23799)

* Update raw_logger/framereader to new new ffmpeg api

* Can be removed now

* Handled by avcodec_free_context

* handle EAGAIN and clean up

thneed: a few asserts in the optimizer for cases it will fail

docs: fix title typo

cabana for your terminal

Fix tici bigmodel (commaai#23817)

* Fix bigmodel on tici: cam intrinsics arent static

* Give TICI route own name for import

* Make function useable in offline test

* typo

* change tici ecam focal to trained focal

* No shadow variable

* Fixed ref

* Force update this time

* Update model replay ref commit

2022 Hyundai Elantra firmware versions (commaai#23818)

Added 2022 Hyundai Elantra fwdCamera, transmission, and engine fingerprints.

CARS.md add 2022 elantra

hyundai: custom fw version for sonata eps (commaai#23816)

* hyundai: custom fw version for sonata eps

* another comment

HKG: Kia Sorento FPv2 (commaai#23815)

* Replace Kia Sorento FPv1 with FPv2

* keep old fingerprint

Subaru: add FW for Impreza Limited UDM 2017 (commaai#23802)

* FPv2: Add Subaru Impreza Limited USM 2017

* test_fw_query_on_routes.py: add subaru support

Fix unmetered upload over cell (fix commaai#23811) (commaai#23820)

omx encoder: move writing into thread (commaai#23771)

* omx encoder: move writing to separate thread

* fix include

* pop

* log buffers sizes

* split copy and write

adjust comma two model timing thresholds after bigmodel

Toyota: fix flaky EV detection (commaai#23825)

script to clear DTCs

move lock clearing to uploader (commaai#23826)

* move lock clearing to uploader

* test case

Honda: revert to button enable on Nidec (commaai#23828)

* Honda: revert to button enable on Nidec

* fix test

* bump panda

Added (Ecu.eps) fingerprint for Hyundai Ioniq EV 2017 (commaai#23823)

fix mac_setup w/ tools+plotjuggler (commaai#23552)

* fix pycurl issue:
* use newer curl backend for pip install
* update lib paths based on brew prefix
* fix cert issue when using pycurl using certifi
* make output setup nicer

* fix linter

* typo

* dont need that actually

* revert

* pipenv in brew

* forgot this

* make brew available on fresh install

* undo

* more undo

* oops

* use sytem curl, but homebrew openssl

replay: use QCoreApplication (commaai#23831)

scons: use correct brew prefix (commaai#23833)

replay: use VideoToolbox HW decoder on Mac (commaai#23832)

* replay: support VideoToolbox HW decoding

* rename flag

* remove debug assert

Fix watch3 on mac (commaai#23834)

this seems to about what my car converges to (commaai#23836)

boardd: handle missing pandas

Subaru: remove Impreza CAN fingerprints (commaai#23841)

* Subaru: remove Impreza CAN fingerprints

* fix process replay

* update refs

Toyota: remove outdated comment (commaai#23844)

Remove unused MPC_COST_LONG class (commaai#23843)

Faster cruise max

Update interface.py

sport

torque for everyone

torq boi suggestions

torque for everyone

Update settings.cc

Update interface.py

fix prius/camry tune

torque for everyone

add torque to hondas

Update interface.py

Fix Honda rename MAX_LAT_ACCEL

Rename to MAX_LAT_ACCEL

Try more chill tune

Revert: That was too chill

Update interface.py

NEOS 20

add hkg to max lat accel and import params

add hkg to max lat accel and import params

Classic comma spinner

'2' boot logo

smaller '2'

Revert "smaller '2'"

This reverts commit 629267e.

i think its fixed now

Update interface.py

Update interface.py

Update interface.py

Update interface.py

chart vals

Legacy Comma engage/disengage sounds

tuned by spektor

add rav4 to torque controller

Latcontrol torque: integrator need not be reset (commaai#24606)

slow integrators need not be reset

rename Honda MAX_LAT_ACCEL

rename HKG to MAX_LAT_ACCEL

fix logic for non modded users

Update interface.py

Co-Authored-By: Comma Device <device@comma.ai>
Co-Authored-By: Willem Melching <willem.melching@gmail.com>
  • Loading branch information
3 people committed Jun 22, 2022
1 parent 4bcd01f commit 982178e
Show file tree
Hide file tree
Showing 17 changed files with 350 additions and 76 deletions.
4 changes: 4 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Version 0.8.14 (2022-0X-XX)
* Toyota Alphard Hybrid 2021 support
* Toyota Avalon Hybrid 2022 support

Version 0.8.13.1 (2022-04-27)
========================
* NEOS 20: improved reliability

Version 0.8.13 (2022-02-18)
========================
* Improved driver monitoring
Expand Down
2 changes: 1 addition & 1 deletion launch_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export OPENBLAS_NUM_THREADS=1
export VECLIB_MAXIMUM_THREADS=1

if [ -z "$REQUIRED_NEOS_VERSION" ]; then
export REQUIRED_NEOS_VERSION="19.1"
export REQUIRED_NEOS_VERSION="20"
fi

if [ -z "$AGNOS_VERSION" ]; then
Expand Down
Binary file modified selfdrive/assets/img_chffr_wheel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified selfdrive/assets/sounds/disengage.wav
Binary file not shown.
Binary file modified selfdrive/assets/sounds/engage.wav
Binary file not shown.
105 changes: 77 additions & 28 deletions selfdrive/car/honda/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from panda import Panda
from common.conversions import Conversions as CV
from common.numpy_fast import interp
from common.params import Params
from selfdrive.car.honda.values import CarControllerParams, CruiseButtons, HondaFlags, CAR, HONDA_BOSCH, HONDA_NIDEC_ALT_SCM_MESSAGES, HONDA_BOSCH_ALT_BRAKE_SIGNAL
from selfdrive.car import STD_CARGO_KG, CivicParams, scale_rot_inertia, scale_tire_stiffness, gen_empty_fingerprint, get_safety_config
from selfdrive.car.interfaces import CarInterfaceBase
Expand Down Expand Up @@ -88,18 +89,23 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=[], disabl
ret.wheelbase = CivicParams.WHEELBASE
ret.centerToFront = CivicParams.CENTER_TO_FRONT
ret.steerRatio = 15.38 # 10.93 is end-to-end spec
if eps_modified:
# stock request input values: 0x0000, 0x00DE, 0x014D, 0x01EF, 0x0290, 0x0377, 0x0454, 0x0610, 0x06EE
# stock request output values: 0x0000, 0x0917, 0x0DC5, 0x1017, 0x119F, 0x140B, 0x1680, 0x1680, 0x1680
# modified request output values: 0x0000, 0x0917, 0x0DC5, 0x1017, 0x119F, 0x140B, 0x1680, 0x2880, 0x3180
# stock filter output values: 0x009F, 0x0108, 0x0108, 0x0108, 0x0108, 0x0108, 0x0108, 0x0108, 0x0108
# modified filter output values: 0x009F, 0x0108, 0x0108, 0x0108, 0x0108, 0x0108, 0x0108, 0x0400, 0x0480
# note: max request allowed is 4096, but request is capped at 3840 in firmware, so modifications result in 2x max
ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 2560, 8000], [0, 2560, 3840]]
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.3], [0.1]]
if Params().get_bool('Torque'):
MAX_LAT_ACCEL = 1.7
friction = 0.087112

ret.lateralTuning.init('torque')
ret.lateralTuning.torque.useSteeringAngle = True
ret.lateralTuning.torque.kp = 1.0 / MAX_LAT_ACCEL
ret.lateralTuning.torque.kf = 1.0 / MAX_LAT_ACCEL
ret.lateralTuning.torque.ki = 0.1 / MAX_LAT_ACCEL
ret.lateralTuning.torque.friction = friction
else:
ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 2560], [0, 2560]]
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[1.1], [0.33]]
if eps_modified:
ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 2560, 8000], [0, 2560, 3840]]
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.3], [0.1]]
else:
ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 2560], [0, 2560]]
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[1.1], [0.33]]
tire_stiffness_factor = 1.

elif candidate in (CAR.CIVIC_BOSCH, CAR.CIVIC_BOSCH_DIESEL):
Expand All @@ -108,9 +114,24 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=[], disabl
ret.wheelbase = CivicParams.WHEELBASE
ret.centerToFront = CivicParams.CENTER_TO_FRONT
ret.steerRatio = 15.38 # 10.93 is end-to-end spec
ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 4096], [0, 4096]] # TODO: determine if there is a dead zone at the top end
if Params().get_bool('Torque'):
MAX_LAT_ACCEL = 2.0 if eps_modified else 1.0
friction = 0.04 if eps_modified else 0.1

ret.lateralTuning.init('torque')
ret.lateralTuning.torque.useSteeringAngle = True
ret.lateralTuning.torque.kp = 1.0 / MAX_LAT_ACCEL
ret.lateralTuning.torque.kf = 1.0 / MAX_LAT_ACCEL
ret.lateralTuning.torque.ki = 0.1 / MAX_LAT_ACCEL
ret.lateralTuning.torque.friction = friction
else:
if eps_modified:
ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 2564, 8000], [0, 2564, 3840]]
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.36], [0.108]] #minus 10% from 0.4, 0.12
else:
ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 4096], [0, 4096]] # TODO: determine if there is a dead zone at the top end
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.8], [0.24]]
tire_stiffness_factor = 1.
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.8], [0.24]]

elif candidate in (CAR.ACCORD, CAR.ACCORDH):
stop_and_go = True
Expand All @@ -119,13 +140,20 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=[], disabl
ret.centerToFront = ret.wheelbase * 0.39
ret.steerRatio = 16.33 # 11.82 is spec end-to-end
ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 4096], [0, 4096]] # TODO: determine if there is a dead zone at the top end
tire_stiffness_factor = 0.8467

if eps_modified:
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.3], [0.09]]
if Params().get_bool('Torque'):
MAX_LAT_ACCEL = 2.0 if eps_modified else 1.0
friction = 0.05 if eps_modified else 0.1

ret.lateralTuning.init('torque')
ret.lateralTuning.torque.useSteeringAngle = True
ret.lateralTuning.torque.kp = 1.0 / MAX_LAT_ACCEL
ret.lateralTuning.torque.kf = 1.0 / MAX_LAT_ACCEL
ret.lateralTuning.torque.ki = 0.1 / MAX_LAT_ACCEL
ret.lateralTuning.torque.friction = friction
else:
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.6], [0.18]]

tire_stiffness_factor = 0.8467

elif candidate == CAR.ACURA_ILX:
stop_and_go = False
ret.mass = 3095. * CV.LB_TO_KG + STD_CARGO_KG
Expand Down Expand Up @@ -153,15 +181,23 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=[], disabl
ret.wheelbase = 2.66
ret.centerToFront = ret.wheelbase * 0.41
ret.steerRatio = 16.0 # 12.3 is spec end-to-end
if eps_modified:
# stock request input values: 0x0000, 0x00DB, 0x01BB, 0x0296, 0x0377, 0x0454, 0x0532, 0x0610, 0x067F
# stock request output values: 0x0000, 0x0500, 0x0A15, 0x0E6D, 0x1100, 0x1200, 0x129A, 0x134D, 0x1400
# modified request output values: 0x0000, 0x0500, 0x0A15, 0x0E6D, 0x1100, 0x1200, 0x1ACD, 0x239A, 0x2800
ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 2560, 10000], [0, 2560, 3840]]
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.21], [0.07]]
if Params().get_bool('Torque'):
MAX_LAT_ACCEL = 3.3 if eps_modified else 1.0
friction = 0.046 if eps_modified else 0.1

ret.lateralTuning.init('torque')
ret.lateralTuning.torque.useSteeringAngle = True
ret.lateralTuning.torque.kp = 1.0 / MAX_LAT_ACCEL
ret.lateralTuning.torque.kf = 1.0 / MAX_LAT_ACCEL
ret.lateralTuning.torque.ki = 0.1 / MAX_LAT_ACCEL
ret.lateralTuning.torque.friction = friction
else:
ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 3840], [0, 3840]]
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.64], [0.192]]
if eps_modified:
ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 2560, 10000], [0, 2560, 3840]]
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.21], [0.07]]
else:
ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 3840], [0, 3840]]
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.64], [0.192]]
tire_stiffness_factor = 0.677
ret.wheelSpeedFactor = 1.025

Expand Down Expand Up @@ -223,11 +259,24 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=[], disabl
ret.mass = 4068. * CV.LB_TO_KG + STD_CARGO_KG
ret.wheelbase = 2.75
ret.centerToFront = ret.wheelbase * 0.41
ret.steerRatio = 11.95 # as spec
ret.steerRatio = 16.0 #11.95 is spec
ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 3840], [0, 3840]]
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.2], [0.06]]
if Params().get_bool('Torque'):
MAX_LAT_ACCEL = 1.0
friction = 0.1

ret.lateralTuning.init('torque')
ret.lateralTuning.torque.useSteeringAngle = True
ret.lateralTuning.torque.kp = 1.0 / MAX_LAT_ACCEL
ret.lateralTuning.torque.kf = 1.0 / MAX_LAT_ACCEL
ret.lateralTuning.torque.ki = 0.1 / MAX_LAT_ACCEL
ret.lateralTuning.torque.friction = friction
else:
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.2], [0.06]]
ret.lateralTuning.pid.kf = 0.00007818594
tire_stiffness_factor = 0.677


elif candidate == CAR.ODYSSEY:
stop_and_go = False
ret.mass = 4471. * CV.LB_TO_KG + STD_CARGO_KG
Expand Down
9 changes: 9 additions & 0 deletions selfdrive/car/honda/values.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,15 @@ class Footnote(Enum):
b'39990-TGG-J510\x00\x00',
b'39990-TGL-E130\x00\x00',
b'39990-TGN-E120\x00\x00',
b'39990-TBA,C020\x00\x00',
b'39990-TBA,C120\x00\x00',
b'39990-TEA,T820\x00\x00',
b'39990-TEZ,T020\x00\x00',
b'39990-TGG,A020\x00\x00',
b'39990-TGG,A120\x00\x00',
b'39990-TGG,J510\x00\x00',
b'39990-TGL,E130\x00\x00',
b'39990-TGN,E120\x00\x00',
],
(Ecu.srs, 0x18da53f1, None): [
b'77959-TBA-A060\x00\x00',
Expand Down
Loading

0 comments on commit 982178e

Please sign in to comment.