Compare commits

..

25 Commits

Author SHA1 Message Date
FrogAi 235c1cab79 agnos 10.1.1 2025-07-05 12:59:50 -05:00
firestar5683 eb507d5ea8 Update interface.py 2025-07-05 11:35:11 -05:00
firestar5683 159ca85be2 Update tinygrad_modeld.py 2025-05-31 12:59:15 -05:00
FrogAi 40d8eb8a4e agnos 10.1.1 2025-05-26 20:47:53 -05:00
firestar5683 ebf77baf33 Vikander Model 2025-05-24 14:59:24 -05:00
firestar5683 7c2fa00aec Restore Sanity
AHHHHHHH
2025-05-18 13:19:38 -05:00
firestar5683 9bd0463c64 Update interface.py 2025-05-15 17:51:42 -05:00
firestar5683 e247249033 Update interface.py 2025-05-12 15:09:54 -05:00
firestar5683 ea48457d72 Update interface.py 2025-05-12 14:01:05 -05:00
firestar5683 8a4e817f6b Reapply "panda fix"
This reverts commit a8767be7b1.
2025-05-12 13:16:08 -05:00
firestar5683 a8767be7b1 Revert "panda fix"
This reverts commit 2d23f740cc.
2025-05-12 13:15:49 -05:00
firestar5683 0c249d253e Update interface.py 2025-05-12 01:53:59 -05:00
firestar5683 9bb9d6ed2c Panda fix 2025-05-12 00:19:48 -05:00
firestar5683 ceac092b67 Revert "panda fix"
This reverts commit 2d23f740cc.
2025-05-12 00:11:13 -05:00
firestar5683 2d23f740cc panda fix 2025-05-11 23:08:48 -05:00
firestar5683 80c20399f1 Panda Fix? 2025-05-11 18:08:54 -05:00
firestar5683 4f65f90567 Update interface.py 2025-05-11 01:33:49 -05:00
firestar5683 0a217baf18 Revert "Reapply "Tomb Raider 6""
This reverts commit f3de8169b9.
2025-05-11 01:33:48 -05:00
firestar5683 b81d6fb1eb StarPilot 2025-05-11 01:33:48 -05:00
firestar5683 944fc51f8a Reapply "Tomb Raider 6" 2025-05-11 01:33:48 -05:00
firestar5683 086570b29f Update carcontroller.py 2025-05-11 01:33:47 -05:00
firestar5683 8face05df0 Logging 2025-05-11 01:33:46 -05:00
firestar5683 7231aeb5ee TorqueTune/Paddle
panda
2025-05-11 01:33:46 -05:00
FrogAi d01cd48bee Compile FrogPilot 2025-04-20 15:12:33 -07:00
FrogAi 4eefdc3268 Update 2025-04-20 22:00:46 +00:00
94 changed files with 2178 additions and 3245 deletions
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
/data/themes/theme_packs/duck/colors /data/openpilot/openpilot/frogpilot/assets/holiday_themes/easter_week/colors
+1 -1
View File
@@ -1 +1 @@
/data/themes/theme_packs/frog-animated/distance_icons /data/openpilot/openpilot/frogpilot/assets/stock_theme/distance_icons
+1 -1
View File
@@ -1 +1 @@
/data/themes/theme_packs/duck/icons /data/openpilot/openpilot/frogpilot/assets/holiday_themes/easter_week/icons
+1 -1
View File
@@ -1 +1 @@
/data/themes/theme_packs/duck/signals /data/openpilot/openpilot/frogpilot/assets/holiday_themes/easter_week/signals
+1 -1
View File
@@ -1 +1 @@
/data/themes/theme_packs/duck/sounds /data/openpilot/openpilot/frogpilot/assets/holiday_themes/easter_week/sounds
@@ -1 +0,0 @@
/data/themes/steering_wheels/pedro.gif
@@ -0,0 +1 @@
/data/openpilot/openpilot/frogpilot/assets/holiday_themes/easter_week/steering_wheel/wheel.png
Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 61 KiB

@@ -1,44 +1,44 @@
{ {
"LaneLines": { "LaneLines": {
"red": 76, "red": 23,
"green": 150, "green": 134,
"blue": 255, "blue": 68,
"alpha": 255 "alpha": 242
}, },
"LeadMarker": { "LeadMarker": {
"red": 76, "red": 23,
"green": 150, "green": 134,
"blue": 255, "blue": 68,
"alpha": 255 "alpha": 242
}, },
"Path": { "Path": {
"red": 76, "red": 23,
"green": 150, "green": 134,
"blue": 255, "blue": 68,
"alpha": 255 "alpha": 242
}, },
"PathEdge": { "PathEdge": {
"red": 255, "red": 18,
"green": 32, "green": 107,
"blue": 32, "blue": 54,
"alpha": 255 "alpha": 242
}, },
"Sidebar1": { "Sidebar1": {
"red": 76, "red": 23,
"green": 150, "green": 134,
"blue": 255, "blue": 68,
"alpha": 255 "alpha": 242
}, },
"Sidebar2": { "Sidebar2": {
"red": 0, "red": 23,
"green": 255, "green": 134,
"blue": 102, "blue": 68,
"alpha": 255 "alpha": 242
}, },
"Sidebar3": { "Sidebar3": {
"red": 255, "red": 23,
"green": 32, "green": 134,
"blue": 32, "blue": 68,
"alpha": 255 "alpha": 242
} }
} }
Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 371 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 568 KiB

After

Width:  |  Height:  |  Size: 503 KiB

-1
View File
@@ -139,7 +139,6 @@ def frogpilot_boot_functions(build_metadata, params_cache):
params.put("DongleId", params.get("KonikDongleId", encoding="utf8")) params.put("DongleId", params.get("KonikDongleId", encoding="utf8"))
else: else:
params.put("KonikDongleId", register(show_spinner=True, register_konik=True)) params.put("KonikDongleId", register(show_spinner=True, register_konik=True))
HARDWARE.reboot()
elif params.get("StockDongleId", encoding="utf8") != None: elif params.get("StockDongleId", encoding="utf8") != None:
params.put("DongleId", params.get("StockDongleId", encoding="utf8")) params.put("DongleId", params.get("StockDongleId", encoding="utf8"))
+1 -2
View File
@@ -4,7 +4,6 @@ import math
import numpy as np import numpy as np
import requests import requests
import shutil import shutil
import signal
import subprocess import subprocess
import threading import threading
import time import time
@@ -174,7 +173,7 @@ def restart_processes(sm):
if not any(ps.ignitionLine or ps.ignitionCan for ps in sm["pandaStates"] if ps.pandaType != log.PandaState.PandaType.unknown): if not any(ps.ignitionLine or ps.ignitionCan for ps in sm["pandaStates"] if ps.pandaType != log.PandaState.PandaType.unknown):
for name in ["mapd", "ui"]: for name in ["mapd", "ui"]:
get_managed_processes()[name].stop(block=True, retry=True, sig=signal.SIGKILL) get_managed_processes()[name].stop(block=False, retry=False)
def run_cmd(cmd, success_message, fail_message, report=True): def run_cmd(cmd, success_message, fail_message, report=True):
try: try:
+6 -5
View File
@@ -64,7 +64,7 @@ DEFAULT_TINYGRAD_MODEL_VERSION = "v8"
EXCLUDED_KEYS = { EXCLUDED_KEYS = {
"AvailableModels", "AvailableModelNames", "CarParamsPersistent", "ExperimentalLongitudinalEnabled", "AvailableModels", "AvailableModelNames", "CarParamsPersistent", "ExperimentalLongitudinalEnabled",
"ExperimentalModels", "KonikMinutes", "ModelDrivesAndScores", "ModelVersions", "openpilotMinutes", "ExperimentalModels", "ModelDrivesAndScores", "ModelVersions", "openpilotMinutes",
"SpeedLimits", "UpdaterAvailableBranches" "SpeedLimits", "UpdaterAvailableBranches"
} }
@@ -187,7 +187,6 @@ frogpilot_default_params: list[tuple[str, str | bytes, int]] = [
("IsMetric", "0", 0), ("IsMetric", "0", 0),
("JerkInfo", "0", 3), ("JerkInfo", "0", 3),
("KonikDongleId", "", 3), ("KonikDongleId", "", 3),
("KonikMinutes", "0", 0),
("LaneChangeCustomizations", "0", 0), ("LaneChangeCustomizations", "0", 0),
("LaneChangeTime", "2.0", 0), ("LaneChangeTime", "2.0", 0),
("LaneDetectionWidth", "0", 2), ("LaneDetectionWidth", "0", 2),
@@ -393,8 +392,10 @@ class FrogPilotVariables:
self.frogpilot_toggles.frogs_go_moo = Path("/persist/frogsgomoo.py").is_file() self.frogpilot_toggles.frogs_go_moo = Path("/persist/frogsgomoo.py").is_file()
self.frogpilot_toggles.block_user = self.development_branch and not self.frogpilot_toggles.frogs_go_moo self.frogpilot_toggles.block_user = self.development_branch and not self.frogpilot_toggles.frogs_go_moo
self.not_vetted = False
self.frogpilot_toggles.use_konik_server = params.get_bool("UseKonikServer") self.frogpilot_toggles.use_konik_server = params.get_bool("UseKonikServer")
self.frogpilot_toggles.use_konik_server |= Path("/data/openpilot/not_vetted").is_file() self.frogpilot_toggles.use_konik_server |= self.not_vetted
if not KONIK_PATH.is_file() and self.frogpilot_toggles.use_konik_server: if not KONIK_PATH.is_file() and self.frogpilot_toggles.use_konik_server:
KONIK_PATH.touch() KONIK_PATH.touch()
@@ -632,8 +633,8 @@ class FrogPilotVariables:
toggle.device_shutdown_time = (device_shutdown_setting - 3) * 3600 if device_shutdown_setting >= 4 else device_shutdown_setting * (60 * 15) toggle.device_shutdown_time = (device_shutdown_setting - 3) * 3600 if device_shutdown_setting >= 4 else device_shutdown_setting * (60 * 15)
toggle.increase_thermal_limits = device_management and (params.get_bool("IncreaseThermalLimits") if tuning_level >= level["IncreaseThermalLimits"] else default.get_bool("IncreaseThermalLimits")) toggle.increase_thermal_limits = device_management and (params.get_bool("IncreaseThermalLimits") if tuning_level >= level["IncreaseThermalLimits"] else default.get_bool("IncreaseThermalLimits"))
toggle.low_voltage_shutdown = np.clip(params.get_float("LowVoltageShutdown"), VBATT_PAUSE_CHARGING, 12.5) if device_management and tuning_level >= level["LowVoltageShutdown"] else default.get_float("LowVoltageShutdown") toggle.low_voltage_shutdown = np.clip(params.get_float("LowVoltageShutdown"), VBATT_PAUSE_CHARGING, 12.5) if device_management and tuning_level >= level["LowVoltageShutdown"] else default.get_float("LowVoltageShutdown")
toggle.no_logging = (device_management and (params.get_bool("NoLogging") if tuning_level >= level["NoLogging"] else default.get_bool("NoLogging")) or self.development_branch) and not self.vetting_branch toggle.no_logging = (device_management and (params.get_bool("NoLogging") if tuning_level >= level["NoLogging"] else default.get_bool("NoLogging")) or self.development_branch or self.not_vetted) and not self.vetting_branch
toggle.no_uploads = (device_management and (params.get_bool("NoUploads") if tuning_level >= level["NoUploads"] else default.get_bool("NoUploads")) or self.development_branch) and not self.vetting_branch toggle.no_uploads = (device_management and (params.get_bool("NoUploads") if tuning_level >= level["NoUploads"] else default.get_bool("NoUploads")) or self.development_branch or self.not_vetted) and not self.vetting_branch
toggle.no_onroad_uploads = toggle.no_uploads and (params.get_bool("DisableOnroadUploads") if tuning_level >= level["DisableOnroadUploads"] else default.get_bool("DisableOnroadUploads")) toggle.no_onroad_uploads = toggle.no_uploads and (params.get_bool("DisableOnroadUploads") if tuning_level >= level["DisableOnroadUploads"] else default.get_bool("DisableOnroadUploads"))
toggle.offline_mode = device_management and (params.get_bool("OfflineMode") if tuning_level >= level["OfflineMode"] else default.get_bool("OfflineMode")) toggle.offline_mode = device_management and (params.get_bool("OfflineMode") if tuning_level >= level["OfflineMode"] else default.get_bool("OfflineMode"))
@@ -77,8 +77,8 @@ class FrogPilotFollowing:
distance_factor = max(lead_distance - (v_ego * self.t_follow), 1) distance_factor = max(lead_distance - (v_ego * self.t_follow), 1)
standstill_offset = max(STOP_DISTANCE - v_ego, 1) standstill_offset = max(STOP_DISTANCE - v_ego, 1)
acceleration_offset = float(np.clip((v_lead - v_ego) * standstill_offset - COMFORT_BRAKE, 1, distance_factor)) acceleration_offset = float(np.clip((v_lead - v_ego) * standstill_offset - COMFORT_BRAKE, 1, distance_factor))
self.acceleration_jerk /= standstill_offset self.acceleration_jerk /= acceleration_offset
self.speed_jerk /= standstill_offset self.speed_jerk /= acceleration_offset
self.t_follow /= acceleration_offset self.t_follow /= acceleration_offset
# Offset by FrogAi for FrogPilot for a more natural approach to a slower lead # Offset by FrogAi for FrogPilot for a more natural approach to a slower lead
Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 402 KiB

@@ -40,7 +40,7 @@
text-align: center; text-align: center;
} }
</style> </style>
<title>FrogPilot: {% block title %}{% endblock %}</title> <title>StarPilot: {% block title %}{% endblock %}</title>
</head> </head>
<body> <body>
<nav class="navbar navbar-fixed-top navbar-expand-sm navbar-dark bg-dark"> <nav class="navbar navbar-fixed-top navbar-expand-sm navbar-dark bg-dark">
+1
View File
@@ -1,5 +1,6 @@
#!/usr/bin/bash #!/usr/bin/bash
if [ -z "$BASEDIR" ]; then if [ -z "$BASEDIR" ]; then
BASEDIR="/data/openpilot" BASEDIR="/data/openpilot"
fi fi
View File
Binary file not shown.
+15 -3
View File
@@ -82,6 +82,12 @@ VAL_TABLE_ HandsOffSWDetectionMode 2 "Failed" 1 "Enabled" 0 "Disabled" ;
BO_ 189 EBCMRegenPaddle: 7 K17_EBCM BO_ 189 EBCMRegenPaddle: 7 K17_EBCM
SG_ RegenPaddle : 7|4@0+ (1,0) [0|0] "" NEO SG_ RegenPaddle : 7|4@0+ (1,0) [0|0] "" NEO
SG_ Byte1 : 8|8@1+ (1,0) [0|255] "" NEO
SG_ Byte2 : 16|8@1+ (1,0) [0|255] "" NEO
SG_ Byte3 : 24|8@1+ (1,0) [0|255] "" NEO
SG_ Byte4 : 32|8@1+ (1,0) [0|255] "" NEO
SG_ Byte5 : 40|8@1+ (1,0) [0|255] "" NEO
SG_ Byte6 : 48|8@1+ (1,0) [0|255] "" NEO
BO_ 190 ECMAcceleratorPos: 6 K20_ECM BO_ 190 ECMAcceleratorPos: 6 K20_ECM
SG_ BrakePedalPos : 15|8@0+ (1,0) [0|0] "sticky" NEO SG_ BrakePedalPos : 15|8@0+ (1,0) [0|0] "sticky" NEO
@@ -192,10 +198,15 @@ BO_ 500 SportMode: 6 XXX
SG_ SportMode : 15|1@0+ (1,0) [0|1] "" XXX SG_ SportMode : 15|1@0+ (1,0) [0|1] "" XXX
BO_ 501 ECMPRDNL2: 8 K20_ECM BO_ 501 ECMPRDNL2: 8 K20_ECM
SG_ TransmissionState : 48|4@1+ (1,0) [0|7] "" NEO SG_ Byte0 : 0|8@1+ (1,0) [0|255] "" NEO
SG_ Byte1 : 8|8@1+ (1,0) [0|255] "" NEO
SG_ Byte2 : 16|8@1+ (1,0) [0|255] "" NEO
SG_ PRNDL2 : 27|4@0+ (1,0) [0|255] "" NEO SG_ PRNDL2 : 27|4@0+ (1,0) [0|255] "" NEO
SG_ Byte4 : 32|8@1+ (1,0) [0|255] "" NEO
SG_ ManualMode : 41|1@0+ (1,0) [0|1] "" NEO SG_ ManualMode : 41|1@0+ (1,0) [0|1] "" NEO
SG_ TransmissionState : 48|4@1+ (1,0) [0|7] "" NEO
SG_ Byte7 : 56|8@1+ (1,0) [0|255] "" NEO
BO_ 532 BRAKE_RELATED: 6 XXX BO_ 532 BRAKE_RELATED: 6 XXX
SG_ UserBrakePressure : 0|9@0+ (1,0) [0|511] "" XXX SG_ UserBrakePressure : 0|9@0+ (1,0) [0|511] "" XXX
@@ -221,6 +232,7 @@ BO_ 715 ASCMGasRegenCmd: 8 K124_ASCM
SG_ GasRegenFullStopActive : 13|1@0+ (1,0) [0|0] "" NEO SG_ GasRegenFullStopActive : 13|1@0+ (1,0) [0|0] "" NEO
SG_ GasRegenCmdActive : 0|1@0+ (1,0) [0|0] "" NEO SG_ GasRegenCmdActive : 0|1@0+ (1,0) [0|0] "" NEO
SG_ RollingCounter : 7|2@0+ (1,0) [0|0] "" NEO SG_ RollingCounter : 7|2@0+ (1,0) [0|0] "" NEO
SG_ GasRegenAlwaysOne3 : 23|1@0+ (1,0) [0|1] "" NEO
SG_ GasRegenCmd : 8|14@0+ (1,0) [0|0] "" NEO SG_ GasRegenCmd : 8|14@0+ (1,0) [0|0] "" NEO
BO_ 717 ASCM_2CD: 5 K124_ASCM BO_ 717 ASCM_2CD: 5 K124_ASCM
@@ -369,6 +381,6 @@ VAL_ 715 GasRegenCmdActive 1 "Active" 0 "Inactive" ;
VAL_ 320 Intellibeam 1 "Active" 0 "Inactive" ; VAL_ 320 Intellibeam 1 "Active" 0 "Inactive" ;
VAL_ 320 HighBeamsActive 1 "Active" 0 "Inactive" ; VAL_ 320 HighBeamsActive 1 "Active" 0 "Inactive" ;
VAL_ 320 HighBeamsTemporary 1 "Active" 0 "Inactive" ; VAL_ 320 HighBeamsTemporary 1 "Active" 0 "Inactive" ;
VAL_ 501 PRNDL2 6 "L" 4 "D" 3 "N" 2 "R" 1 "P" 0 "Shifting"; VAL_ 501 PRNDL2 7 "L2" 6 "L" 5 "L3" 4 "D" 3 "N" 2 "R" 1 "P" 0 "Shifting";
VAL_ 501 TransmissionState 11 "Shifting" 10 "Reverse" 9 "Forward" 8 "Disengaged"; VAL_ 501 TransmissionState 11 "Shifting" 10 "Reverse" 9 "Forward" 8 "Disengaged";
VAL_ 501 ManualMode 1 "Active" 0 "Inactive" VAL_ 501 ManualMode 1 "Active" 0 "Inactive"
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

After

Width:  |  Height:  |  Size: 418 KiB

+23 -33
View File
@@ -1,4 +1,3 @@
import math
from cereal import car from cereal import car
from openpilot.common.conversions import Conversions as CV from openpilot.common.conversions import Conversions as CV
from openpilot.common.filter_simple import FirstOrderFilter from openpilot.common.filter_simple import FirstOrderFilter
@@ -49,12 +48,6 @@ class CarController(CarControllerBase):
self.params = CarControllerParams(self.CP) self.params = CarControllerParams(self.CP)
self.params_ = Params() self.params_ = Params()
self.mass = CP.mass
self.tireRadius = 0.075 * CP.wheelbase + 0.1453
self.frontalArea = 1.05 * CP.wheelbase + 0.0679
self.coeffDrag = 0.30
self.airDensity = 1.225
self.packer_pt = CANPacker(DBC[self.CP.carFingerprint]['pt']) self.packer_pt = CANPacker(DBC[self.CP.carFingerprint]['pt'])
self.packer_obj = CANPacker(DBC[self.CP.carFingerprint]['radar']) self.packer_obj = CANPacker(DBC[self.CP.carFingerprint]['radar'])
self.packer_ch = CANPacker(DBC[self.CP.carFingerprint]['chassis']) self.packer_ch = CANPacker(DBC[self.CP.carFingerprint]['chassis'])
@@ -67,13 +60,13 @@ class CarController(CarControllerBase):
def calc_pedal_command(accel: float, long_active: bool, car_velocity) -> float: def calc_pedal_command(accel: float, long_active: bool, car_velocity) -> float:
if not long_active: return 0. if not long_active: return 0.
zero = 0.15625 # 40/256
if accel < -0.5: if accel < -0.5:
pedal_gas = 0 pedal_gas = 0
else: else:
pedaloffset = interp(car_velocity, [0., 3, 6, 30], [0.10, 0.175, 0.240, 0.240]) pedaloffset = interp(car_velocity, [0., 3, 6, 30], [0.10, 0.175, 0.240, 0.240])
pedal_gas = clip((pedaloffset + accel * 0.6), 0.0, 1.0) pedal_gas = clip((pedaloffset + accel * 0.6), 0.0, 1.0)
return pedal_gas return pedal_gas
@@ -127,6 +120,14 @@ class CarController(CarControllerBase):
if self.frame % 4 == 0: if self.frame % 4 == 0:
stopping = actuators.longControlState == LongCtrlState.stopping stopping = actuators.longControlState == LongCtrlState.stopping
# Pitch compensated acceleration;
# TODO: include future pitch (sm['modelDataV2'].orientation.y) to account for long actuator delay
if frogpilot_toggles.long_pitch and len(CC.orientationNED) > 1:
self.pitch.update(CC.orientationNED[1])
self.accel_g = ACCELERATION_DUE_TO_GRAVITY * apply_deadzone(self.pitch.x, PITCH_DEADZONE) # driving uphill is positive pitch
accel += self.accel_g
brake_accel = actuators.accel + self.accel_g * interp(CS.out.vEgo, BRAKE_PITCH_FACTOR_BP, BRAKE_PITCH_FACTOR_V)
at_full_stop = CC.longActive and CS.out.standstill at_full_stop = CC.longActive and CS.out.standstill
near_stop = CC.longActive and (CS.out.vEgo < self.params.NEAR_STOP_BRAKE_PHASE) near_stop = CC.longActive and (CS.out.vEgo < self.params.NEAR_STOP_BRAKE_PHASE)
interceptor_gas_cmd = 0 interceptor_gas_cmd = 0
@@ -138,31 +139,20 @@ class CarController(CarControllerBase):
self.apply_gas = self.params.INACTIVE_REGEN self.apply_gas = self.params.INACTIVE_REGEN
self.apply_brake = int(min(-100 * self.CP.stopAccel, self.params.MAX_BRAKE)) self.apply_brake = int(min(-100 * self.CP.stopAccel, self.params.MAX_BRAKE))
else: else:
# Normal operation
if len(CC.orientationNED) == 3 and CS.out.vEgo > self.CP.vEgoStopping: if self.CP.carFingerprint in EV_CAR:
accel_due_to_pitch = math.sin(CC.orientationNED[1]) * ACCELERATION_DUE_TO_GRAVITY self.params.update_ev_gas_brake_threshold(CS.out.vEgo)
if frogpilot_toggles.sport_plus:
self.apply_gas = int(round(interp(accel, self.params.EV_GAS_LOOKUP_BP_PLUS, self.params.GAS_LOOKUP_V_PLUS)))
else:
self.apply_gas = int(round(interp(accel, self.params.EV_GAS_LOOKUP_BP, self.params.GAS_LOOKUP_V)))
self.apply_brake = int(round(interp(brake_accel, self.params.EV_BRAKE_LOOKUP_BP, self.params.BRAKE_LOOKUP_V)))
else: else:
accel_due_to_pitch = 0.0 if frogpilot_toggles.sport_plus:
self.apply_gas = int(round(interp(accel, self.params.GAS_LOOKUP_BP_PLUS, self.params.GAS_LOOKUP_V_PLUS)))
if frogpilot_toggles.sport_plus: else:
gas_max = self.params.MAX_GAS_PLUS self.apply_gas = int(round(interp(accel, self.params.GAS_LOOKUP_BP, self.params.GAS_LOOKUP_V)))
accel_max = self.params.ACCEL_MAX_PLUS self.apply_brake = int(round(interp(brake_accel, self.params.BRAKE_LOOKUP_BP, self.params.BRAKE_LOOKUP_V)))
else:
gas_max = self.params.MAX_GAS
accel_max = self.params.ACCEL_MAX
accel = clip(actuators.accel + accel_due_to_pitch, self.params.ACCEL_MIN, accel_max)
torque = self.tireRadius * ((self.mass*accel) + (0.5*self.coeffDrag*self.frontalArea*self.airDensity*CS.out.vEgo**2))
scaled_torque = torque + self.params.ZERO_GAS
apply_gas_torque = clip(scaled_torque, self.params.MAX_ACC_REGEN, gas_max)
BRAKE_SWITCH = int(round(interp(CS.out.vEgo, self.params.BRAKE_SWITCH_LOOKUP_BP, self.params.BRAKE_SWITCH_LOOKUP_V)))
brake_accel = min((scaled_torque - BRAKE_SWITCH)/(self.tireRadius*self.mass), 0)
self.apply_gas = int(round(apply_gas_torque))
self.apply_brake = int(round(interp(brake_accel, self.params.BRAKE_LOOKUP_BP, self.params.BRAKE_LOOKUP_V)))
if self.apply_brake > 0:
self.apply_gas = self.params.INACTIVE_REGEN
# Don't allow any gas above inactive regen while stopping # Don't allow any gas above inactive regen while stopping
# FIXME: brakes aren't applied immediately when enabling at a stop # FIXME: brakes aren't applied immediately when enabling at a stop
if stopping: if stopping:
+1 -1
View File
@@ -95,8 +95,8 @@ class CarState(CarStateBase):
self.single_pedal_mode = ( self.single_pedal_mode = (
ret.gearShifter == GearShifter.low ret.gearShifter == GearShifter.low
or pt_cp.vl["EVDriveMode"]["SinglePedalModeActive"] == 1 or pt_cp.vl["EVDriveMode"]["SinglePedalModeActive"] == 1
or pt_cp.vl["ECMPRDNL2"]["TransmissionState"] == 21
or (ret.regenBraking and GearShifter.manumatic) or (ret.regenBraking and GearShifter.manumatic)
or self.CP.carFingerprint in ["CHEVROLET_BOLT_EUV", "CHEVROLET_BOLT_CC"]
) )
if self.CP.enableGasInterceptor: if self.CP.enableGasInterceptor:
+1
View File
@@ -66,6 +66,7 @@ def create_gas_regen_command(packer, bus, throttle, idx, enabled, at_full_stop):
"GasRegenFullStopActive": at_full_stop, "GasRegenFullStopActive": at_full_stop,
"GasRegenAlwaysOne": 1, "GasRegenAlwaysOne": 1,
"GasRegenAlwaysOne2": 1, "GasRegenAlwaysOne2": 1,
"GasRegenAlwaysOne3": 1,
} }
dat = packer.make_can_msg("ASCMGasRegenCmd", bus, values)[2] dat = packer.make_can_msg("ASCMGasRegenCmd", bus, values)[2]
+10 -15
View File
@@ -12,8 +12,8 @@ from openpilot.selfdrive.car.gm.values import CAR, CruiseButtons, CarControllerP
from openpilot.selfdrive.car.interfaces import CarInterfaceBase, TorqueFromLateralAccelCallbackType, FRICTION_THRESHOLD, LatControlInputs, NanoFFModel from openpilot.selfdrive.car.interfaces import CarInterfaceBase, TorqueFromLateralAccelCallbackType, FRICTION_THRESHOLD, LatControlInputs, NanoFFModel
from openpilot.selfdrive.controls.lib.drive_helpers import get_friction from openpilot.selfdrive.controls.lib.drive_helpers import get_friction
from openpilot.common.params import Params from openpilot.frogpilot.common.frogpilot_variables import params
params = Params()
ButtonType = car.CarState.ButtonEvent.Type ButtonType = car.CarState.ButtonEvent.Type
FrogPilotButtonType = custom.FrogPilotCarState.ButtonEvent.Type FrogPilotButtonType = custom.FrogPilotCarState.ButtonEvent.Type
EventName = car.CarEvent.EventName EventName = car.CarEvent.EventName
@@ -29,8 +29,8 @@ CAM_MSG = 0x320 # AEBCmd
ACCELERATOR_POS_MSG = 0xbe ACCELERATOR_POS_MSG = 0xbe
NON_LINEAR_TORQUE_PARAMS = { NON_LINEAR_TORQUE_PARAMS = {
CAR.CHEVROLET_BOLT_EUV: [2.6531724862969748, 1.0, 0.1919764879840985, 0.009054123646805178], CAR.CHEVROLET_BOLT_EUV: [1.8, 1.1, 0.290, -0.045],
CAR.CHEVROLET_BOLT_CC: [2.6531724862969748, 1.0, 0.1919764879840985, 0.009054123646805178], CAR.CHEVROLET_BOLT_CC: [1.8, 1.1, 0.290, -0.045],
CAR.GMC_ACADIA: [4.78003305, 1.0, 0.3122, 0.05591772], CAR.GMC_ACADIA: [4.78003305, 1.0, 0.3122, 0.05591772],
CAR.CHEVROLET_SILVERADO: [3.29974374, 1.0, 0.25571356, 0.0465122] CAR.CHEVROLET_SILVERADO: [3.29974374, 1.0, 0.25571356, 0.0465122]
} }
@@ -74,8 +74,8 @@ class CarInterface(CarInterfaceBase):
# ToDo: To generalize to other GMs, explore tanh function as the nonlinear # ToDo: To generalize to other GMs, explore tanh function as the nonlinear
non_linear_torque_params = NON_LINEAR_TORQUE_PARAMS.get(self.CP.carFingerprint) non_linear_torque_params = NON_LINEAR_TORQUE_PARAMS.get(self.CP.carFingerprint)
assert non_linear_torque_params, "The params are not defined" assert non_linear_torque_params, "The params are not defined"
a, b, c, _ = non_linear_torque_params a, b, c, d = non_linear_torque_params
steer_torque = (sig(latcontrol_inputs.lateral_acceleration * a) * b) + (latcontrol_inputs.lateral_acceleration * c) steer_torque = (sig(latcontrol_inputs.lateral_acceleration * a) * b) + (latcontrol_inputs.lateral_acceleration * c) + d
return float(steer_torque) + friction return float(steer_torque) + friction
def torque_from_lateral_accel_neural(self, latcontrol_inputs: LatControlInputs, torque_params: car.CarParams.LateralTorqueTuning, lateral_accel_error: float, def torque_from_lateral_accel_neural(self, latcontrol_inputs: LatControlInputs, torque_params: car.CarParams.LateralTorqueTuning, lateral_accel_error: float,
@@ -87,13 +87,7 @@ class CarInterface(CarInterfaceBase):
return float(self.neural_ff_model.predict(inputs)) + friction return float(self.neural_ff_model.predict(inputs)) + friction
def torque_from_lateral_accel(self) -> TorqueFromLateralAccelCallbackType: def torque_from_lateral_accel(self) -> TorqueFromLateralAccelCallbackType:
if self.CP.carFingerprint in (CAR.CHEVROLET_BOLT_EUV, CAR.CHEVROLET_BOLT_CC):
self.neural_ff_model = NanoFFModel(NEURAL_PARAMS_PATH, self.CP.carFingerprint)
return self.torque_from_lateral_accel_neural
elif self.CP.carFingerprint in NON_LINEAR_TORQUE_PARAMS:
return self.torque_from_lateral_accel_siglin return self.torque_from_lateral_accel_siglin
else:
return self.torque_from_lateral_accel_linear
@staticmethod @staticmethod
def _get_params(ret, candidate, fingerprint, car_fw, experimental_long, docs, frogpilot_toggles): def _get_params(ret, candidate, fingerprint, car_fw, experimental_long, docs, frogpilot_toggles):
@@ -149,7 +143,7 @@ class CarInterface(CarInterfaceBase):
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_HW_SDGM ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_HW_SDGM
else: # ASCM, OBD-II harness else: # ASCM, OBD-II harness
ret.openpilotLongitudinalControl = not params.get_bool("DisableOpenpilotLongitudinal") ret.openpilotLongitudinalControl = not frogpilot_toggles.disable_openpilot_long
ret.networkLocation = NetworkLocation.gateway ret.networkLocation = NetworkLocation.gateway
ret.radarUnavailable = RADAR_HEADER_MSG not in fingerprint[CanBus.OBSTACLE] and not docs ret.radarUnavailable = RADAR_HEADER_MSG not in fingerprint[CanBus.OBSTACLE] and not docs
ret.pcmCruise = False # stock non-adaptive cruise control is kept off ret.pcmCruise = False # stock non-adaptive cruise control is kept off
@@ -271,7 +265,7 @@ class CarInterface(CarInterfaceBase):
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_HW_CAM ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_HW_CAM
ret.minEnableSpeed = -1 ret.minEnableSpeed = -1
ret.pcmCruise = False ret.pcmCruise = False
ret.openpilotLongitudinalControl = not params.get_bool("DisableOpenpilotLongitudinal") ret.openpilotLongitudinalControl = not frogpilot_toggles.disable_openpilot_long
ret.stoppingControl = True ret.stoppingControl = True
ret.autoResumeSng = True ret.autoResumeSng = True
@@ -295,8 +289,9 @@ class CarInterface(CarInterfaceBase):
ret.radarUnavailable = True ret.radarUnavailable = True
ret.experimentalLongitudinalAvailable = False ret.experimentalLongitudinalAvailable = False
ret.minEnableSpeed = 24 * CV.MPH_TO_MS ret.minEnableSpeed = 24 * CV.MPH_TO_MS
ret.openpilotLongitudinalControl = not params.get_bool("DisableOpenpilotLongitudinal") ret.openpilotLongitudinalControl = not frogpilot_toggles.disable_openpilot_long
ret.pcmCruise = False ret.pcmCruise = False
experimental_long = False
if not ret.enableGasInterceptor and candidate in CC_ONLY_CAR: #redneck tuning if not ret.enableGasInterceptor and candidate in CC_ONLY_CAR: #redneck tuning
ret.longitudinalTuning.kpBP = [10.7, 10.8, 28.] # 10.7 m/s == 24 mph ret.longitudinalTuning.kpBP = [10.7, 10.8, 28.] # 10.7 m/s == 24 mph
+8 -14
View File
@@ -38,7 +38,7 @@ class CarControllerParams:
def __init__(self, CP): def __init__(self, CP):
# Gas/brake lookups # Gas/brake lookups
self.ZERO_GAS = 6150 # Coasting self.ZERO_GAS = 6144 # Coasting
self.MAX_BRAKE = 400 # ~ -4.0 m/s^2 with regen self.MAX_BRAKE = 400 # ~ -4.0 m/s^2 with regen
if CP.carFingerprint in CAMERA_ACC_CAR and CP.carFingerprint not in CC_ONLY_CAR: if CP.carFingerprint in CAMERA_ACC_CAR and CP.carFingerprint not in CC_ONLY_CAR:
@@ -49,7 +49,6 @@ class CarControllerParams:
# Camera ACC vehicles have no regen while enabled. # Camera ACC vehicles have no regen while enabled.
# Camera transitions to MAX_ACC_REGEN from ZERO_GAS and uses friction brakes instantly # Camera transitions to MAX_ACC_REGEN from ZERO_GAS and uses friction brakes instantly
self.max_regen_acceleration = 0. self.max_regen_acceleration = 0.
self.BRAKE_SWITCH_MAX = self.MAX_ACC_REGEN if CP.carFingerprint in EV_CAR else self.ZERO_GAS
elif CP.carFingerprint in SDGM_CAR: elif CP.carFingerprint in SDGM_CAR:
self.MAX_GAS = 7496 self.MAX_GAS = 7496
@@ -57,7 +56,6 @@ class CarControllerParams:
self.MAX_ACC_REGEN = 5610 self.MAX_ACC_REGEN = 5610
self.INACTIVE_REGEN = 5650 self.INACTIVE_REGEN = 5650
self.max_regen_acceleration = 0. self.max_regen_acceleration = 0.
self.BRAKE_SWITCH = self.ZERO_GAS
else: else:
self.MAX_GAS = 7168 # Safety limit, not ACC max. Stock ACC >8192 from standstill. self.MAX_GAS = 7168 # Safety limit, not ACC max. Stock ACC >8192 from standstill.
@@ -67,19 +65,15 @@ class CarControllerParams:
# ICE has much less engine braking force compared to regen in EVs, # ICE has much less engine braking force compared to regen in EVs,
# lower threshold removes some braking deadzone # lower threshold removes some braking deadzone
self.max_regen_acceleration = -1. if CP.carFingerprint in EV_CAR else -0.1 self.max_regen_acceleration = -1. if CP.carFingerprint in EV_CAR else -0.1
self.BRAKE_SWITCH_MAX = self.MAX_ACC_REGEN if CP.carFingerprint in EV_CAR else self.ZERO_GAS
self.GAS_LOOKUP_BP = [self.max_regen_acceleration, 0., self.ACCEL_MAX] self.GAS_LOOKUP_BP = [self.max_regen_acceleration, 0., self.ACCEL_MAX]
self.GAS_LOOKUP_BP_PLUS = [self.max_regen_acceleration, 0., self.ACCEL_MAX_PLUS] self.GAS_LOOKUP_BP_PLUS = [self.max_regen_acceleration, 0., self.ACCEL_MAX_PLUS]
self.GAS_LOOKUP_V = [self.MAX_ACC_REGEN, self.ZERO_GAS, self.MAX_GAS] self.GAS_LOOKUP_V = [self.MAX_ACC_REGEN, self.ZERO_GAS, self.MAX_GAS]
self.GAS_LOOKUP_V_PLUS = [self.MAX_ACC_REGEN, self.ZERO_GAS, self.MAX_GAS_PLUS] self.GAS_LOOKUP_V_PLUS = [self.MAX_ACC_REGEN, self.ZERO_GAS, self.MAX_GAS_PLUS]
self.BRAKE_LOOKUP_BP = [self.ACCEL_MIN, 0.] self.BRAKE_LOOKUP_BP = [self.ACCEL_MIN, self.max_regen_acceleration]
self.BRAKE_LOOKUP_V = [self.MAX_BRAKE, 0.] self.BRAKE_LOOKUP_V = [self.MAX_BRAKE, 0.]
self.BRAKE_SWITCH_LOOKUP_BP = [0.5, 10]
self.BRAKE_SWITCH_LOOKUP_V = [self.ZERO_GAS, self.BRAKE_SWITCH_MAX]
# determined by letting Volt regen to a stop in L gear from 89mph, # determined by letting Volt regen to a stop in L gear from 89mph,
# and by letting off gas and allowing car to creep, for determining # and by letting off gas and allowing car to creep, for determining
# the positive threshold values at very low speed # the positive threshold values at very low speed
@@ -175,7 +169,7 @@ class CAR(Platforms):
GMCarDocs("Chevrolet Silverado 1500 2020-21", "Safety Package II"), GMCarDocs("Chevrolet Silverado 1500 2020-21", "Safety Package II"),
GMCarDocs("GMC Sierra 1500 2020-21", "Driver Alert Package II", video_link="https://youtu.be/5HbNoBLzRwE"), GMCarDocs("GMC Sierra 1500 2020-21", "Driver Alert Package II", video_link="https://youtu.be/5HbNoBLzRwE"),
], ],
GMCarSpecs(mass=2994, wheelbase=3.75, steerRatio=16.3, tireStiffnessFactor=1.0), GMCarSpecs(mass=2450, wheelbase=3.75, steerRatio=16.3, tireStiffnessFactor=1.0),
) )
CHEVROLET_EQUINOX = GMPlatformConfig( CHEVROLET_EQUINOX = GMPlatformConfig(
[GMCarDocs("Chevrolet Equinox 2019-22")], [GMCarDocs("Chevrolet Equinox 2019-22")],
@@ -211,15 +205,15 @@ class CAR(Platforms):
CHEVROLET_SUBURBAN.specs, CHEVROLET_SUBURBAN.specs,
) )
GMC_YUKON_CC = GMPlatformConfig( GMC_YUKON_CC = GMPlatformConfig(
[GMCarDocs("GMC Yukon - No-ACC")], [GMCarDocs("GMC Yukon No ACC")],
CarSpecs(mass=2541, wheelbase=2.95, steerRatio=16.3, centerToFrontRatio=0.4), CarSpecs(mass=2541, wheelbase=2.95, steerRatio=16.3, centerToFrontRatio=0.4),
) )
CADILLAC_CT6_CC = GMPlatformConfig( CADILLAC_CT6_CC = GMPlatformConfig(
[GMCarDocs("Cadillac CT6 - No-ACC")], [GMCarDocs("Cadillac CT6 No ACC")],
CarSpecs(mass=2358, wheelbase=3.11, steerRatio=17.7, centerToFrontRatio=0.4), CarSpecs(mass=2358, wheelbase=3.11, steerRatio=17.7, centerToFrontRatio=0.4),
) )
CHEVROLET_TRAILBLAZER_CC = GMPlatformConfig( CHEVROLET_TRAILBLAZER_CC = GMPlatformConfig(
[GMCarDocs("Chevrolet Trailblazer 2021-22 - No-ACC")], [GMCarDocs("Chevrolet Trailblazer 2021-22")],
CHEVROLET_TRAILBLAZER.specs, CHEVROLET_TRAILBLAZER.specs,
) )
CADILLAC_XT4 = GMPlatformConfig( CADILLAC_XT4 = GMPlatformConfig(
@@ -227,7 +221,7 @@ class CAR(Platforms):
CarSpecs(mass=1660, wheelbase=2.78, steerRatio=14.4, centerToFrontRatio=0.4), CarSpecs(mass=1660, wheelbase=2.78, steerRatio=14.4, centerToFrontRatio=0.4),
) )
CADILLAC_XT5_CC = GMPlatformConfig( CADILLAC_XT5_CC = GMPlatformConfig(
[GMCarDocs("Cadillac XT5 - No-ACC")], [GMCarDocs("Cadillac XT5 No ACC")],
CarSpecs(mass=1810, wheelbase=2.86, steerRatio=16.34, centerToFrontRatio=0.5), CarSpecs(mass=1810, wheelbase=2.86, steerRatio=16.34, centerToFrontRatio=0.5),
) )
CHEVROLET_TRAVERSE = GMPlatformConfig( CHEVROLET_TRAVERSE = GMPlatformConfig(
@@ -239,7 +233,7 @@ class CAR(Platforms):
CarSpecs(mass=2050, wheelbase=2.86, steerRatio=16.0, centerToFrontRatio=0.5), CarSpecs(mass=2050, wheelbase=2.86, steerRatio=16.0, centerToFrontRatio=0.5),
) )
CHEVROLET_MALIBU_CC = GMPlatformConfig( CHEVROLET_MALIBU_CC = GMPlatformConfig(
[GMCarDocs("Chevrolet Malibu 2023 - No-ACC")], [GMCarDocs("Chevrolet Malibu 2023 No ACC")],
CarSpecs(mass=1450, wheelbase=2.8, steerRatio=15.8, centerToFrontRatio=0.4), CarSpecs(mass=1450, wheelbase=2.8, steerRatio=15.8, centerToFrontRatio=0.4),
) )
CHEVROLET_TRAX = GMPlatformConfig( CHEVROLET_TRAX = GMPlatformConfig(
+1 -1
View File
@@ -412,7 +412,7 @@ class CarInterfaceBase(ABC):
tune.init('torque') tune.init('torque')
tune.torque.useSteeringAngle = use_steering_angle tune.torque.useSteeringAngle = use_steering_angle
tune.torque.kp = 1.0 tune.torque.kp = 0.6
tune.torque.kf = 1.0 tune.torque.kf = 1.0
tune.torque.ki = 0.1 tune.torque.ki = 0.1
tune.torque.friction = params['FRICTION'] tune.torque.friction = params['FRICTION']
+1 -1
View File
@@ -5,7 +5,7 @@ from openpilot.selfdrive.car.interfaces import CarInterfaceBase
# mocked car interface for dashcam mode # mocked car interface for dashcam mode
class CarInterface(CarInterfaceBase): class CarInterface(CarInterfaceBase):
def __init__(self, CP, FPCP, CarController, CarState): def __init__(self, CP, CarController, CarState):
super().__init__(CP, CarController, CarState) super().__init__(CP, CarController, CarState)
self.speed = 0. self.speed = 0.
+1 -1
View File
@@ -170,7 +170,7 @@ class CarInterface(CarInterfaceBase):
*create_button_events(self.CS.cruise_decreased, self.CS.cruise_decreased_previously, {1: ButtonType.decelCruise}), *create_button_events(self.CS.cruise_decreased, self.CS.cruise_decreased_previously, {1: ButtonType.decelCruise}),
*create_button_events(self.CS.cruise_increased, self.CS.cruise_increased_previously, {1: ButtonType.accelCruise}), *create_button_events(self.CS.cruise_increased, self.CS.cruise_increased_previously, {1: ButtonType.accelCruise}),
*create_button_events(self.CS.distance_button, self.CS.prev_distance_button, {1: ButtonType.gapAdjustCruise}), *create_button_events(self.CS.distance_button, self.CS.prev_distance_button, {1: ButtonType.gapAdjustCruise}),
*create_button_events(self.CS.lkas_enabled != self.CS.lkas_previously_enabled, False, {1: FrogPilotButtonType.lkas}), *create_button_events(self.CS.lkas_enabled, self.CS.lkas_previously_enabled, {1: FrogPilotButtonType.lkas}),
] ]
# events # events
+9 -1
View File
@@ -32,7 +32,7 @@ from openpilot.selfdrive.controls.lib.vehicle_model import VehicleModel
from openpilot.system.hardware import HARDWARE from openpilot.system.hardware import HARDWARE
from openpilot.frogpilot.common.frogpilot_variables import get_frogpilot_toggles, params_memory from openpilot.frogpilot.common.frogpilot_variables import ERROR_LOGS_PATH, get_frogpilot_toggles, params_memory
from openpilot.frogpilot.controls.lib.frogpilot_acceleration import get_max_allowed_accel from openpilot.frogpilot.controls.lib.frogpilot_acceleration import get_max_allowed_accel
SOFT_DISABLE_TIME = 3 # seconds SOFT_DISABLE_TIME = 3 # seconds
@@ -199,6 +199,8 @@ class Controls:
self.has_menu = self.CP.carName == "gm" and not (self.CP.flags & GMFlags.NO_CAMERA.value or self.CP.carFingerprint in CC_ONLY_CAR) self.has_menu = self.CP.carName == "gm" and not (self.CP.flags & GMFlags.NO_CAMERA.value or self.CP.carFingerprint in CC_ONLY_CAR)
self.error_log = ERROR_LOGS_PATH / "error.txt"
def set_initial_state(self): def set_initial_state(self):
if REPLAY: if REPLAY:
controls_state = self.params.get("ReplayControlsState") controls_state = self.params.get("ReplayControlsState")
@@ -429,6 +431,12 @@ class Controls:
if self.frogpilot_toggles.block_user: if self.frogpilot_toggles.block_user:
self.events.add(EventName.blockUser, static=True) self.events.add(EventName.blockUser, static=True)
if self.error_log.is_file():
if self.frogpilot_toggles.random_events:
self.events.add(EventName.openpilotCrashedRandomEvent)
else:
self.events.add(EventName.openpilotCrashed)
def data_sample(self): def data_sample(self):
"""Receive data from sockets""" """Receive data from sockets"""
+2 -2
View File
@@ -87,7 +87,7 @@ class DesireHelper:
if torque_applied: if torque_applied:
self.lane_change_wait_timer = frogpilot_toggles.lane_change_delay self.lane_change_wait_timer = frogpilot_toggles.lane_change_delay
torque_applied |= frogpilot_toggles.nudgeless and lane_available and self.lane_change_wait_timer >= frogpilot_toggles.lane_change_delay torque_applied |= frogpilot_toggles.nudgeless
blindspot_detected = ((carstate.leftBlindspot and self.lane_change_direction == LaneChangeDirection.left) or blindspot_detected = ((carstate.leftBlindspot and self.lane_change_direction == LaneChangeDirection.left) or
(carstate.rightBlindspot and self.lane_change_direction == LaneChangeDirection.right)) (carstate.rightBlindspot and self.lane_change_direction == LaneChangeDirection.right))
@@ -95,7 +95,7 @@ class DesireHelper:
if not one_blinker or below_lane_change_speed or self.lane_change_completed: if not one_blinker or below_lane_change_speed or self.lane_change_completed:
self.lane_change_state = LaneChangeState.off self.lane_change_state = LaneChangeState.off
self.lane_change_direction = LaneChangeDirection.none self.lane_change_direction = LaneChangeDirection.none
elif torque_applied and not blindspot_detected: elif torque_applied and not blindspot_detected and lane_available and self.lane_change_wait_timer >= frogpilot_toggles.lane_change_delay:
self.lane_change_state = LaneChangeState.laneChangeStarting self.lane_change_state = LaneChangeState.laneChangeStarting
self.lane_change_completed = frogpilot_toggles.one_lane_change self.lane_change_completed = frogpilot_toggles.one_lane_change
self.lane_change_wait_timer = 0.0 self.lane_change_wait_timer = 0.0
-1
View File
@@ -353,7 +353,6 @@ def holiday_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster,
"world_frog_day": "Happy World Frog Day! 🐸", "world_frog_day": "Happy World Frog Day! 🐸",
"april_fools": "Happy April Fool's Day! 🤡", "april_fools": "Happy April Fool's Day! 🤡",
"easter_week": "Happy Easter! 🐰", "easter_week": "Happy Easter! 🐰",
"may_the_fourth": "May the 4th be with you! 🚀",
"cinco_de_mayo": "¡Feliz Cinco de Mayo! 🌮", "cinco_de_mayo": "¡Feliz Cinco de Mayo! 🌮",
"fourth_of_july": "Happy Fourth of July! 🎆", "fourth_of_july": "Happy Fourth of July! 🎆",
"halloween_week": "Happy Halloween! 🎃", "halloween_week": "Happy Halloween! 🎃",
@@ -1,538 +0,0 @@
{
"acados_include_path": "/data/openpilot/third_party/acados/include",
"acados_lib_path": "/data/openpilot/third_party/acados/lib",
"code_export_directory": "/data/openpilot/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code",
"constraints": {
"C": [],
"C_e": [],
"D": [],
"constr_type": "BGH",
"constr_type_e": "BGH",
"idxbu": [],
"idxbx": [
2,
3
],
"idxbx_0": [
0,
1,
2,
3
],
"idxbx_e": [],
"idxbxe_0": [
0,
1,
2,
3
],
"idxsbu": [],
"idxsbx": [],
"idxsbx_e": [],
"idxsg": [],
"idxsg_e": [],
"idxsh": [],
"idxsh_e": [],
"idxsphi": [],
"idxsphi_e": [],
"lbu": [],
"lbx": [
-1.5707963267948966,
-0.8726646259971648
],
"lbx_0": [
0.0,
0.0,
0.0,
0.0
],
"lbx_e": [],
"lg": [],
"lg_e": [],
"lh": [],
"lh_e": [],
"lphi": [],
"lphi_e": [],
"lsbu": [],
"lsbx": [],
"lsbx_e": [],
"lsg": [],
"lsg_e": [],
"lsh": [],
"lsh_e": [],
"lsphi": [],
"lsphi_e": [],
"ubu": [],
"ubx": [
1.5707963267948966,
0.8726646259971648
],
"ubx_0": [
0.0,
0.0,
0.0,
0.0
],
"ubx_e": [],
"ug": [],
"ug_e": [],
"uh": [],
"uh_e": [],
"uphi": [],
"uphi_e": [],
"usbu": [],
"usbx": [],
"usbx_e": [],
"usg": [],
"usg_e": [],
"ush": [],
"ush_e": [],
"usphi": [],
"usphi_e": []
},
"cost": {
"Vu": [],
"Vu_0": [],
"Vx": [],
"Vx_0": [],
"Vx_e": [],
"Vz": [],
"Vz_0": [],
"W": [
[
0.0,
0.0,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0,
0.0,
0.0
]
],
"W_0": [
[
0.0,
0.0,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0,
0.0,
0.0
]
],
"W_e": [
[
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0
]
],
"Zl": [],
"Zl_e": [],
"Zu": [],
"Zu_e": [],
"cost_ext_fun_type": "casadi",
"cost_ext_fun_type_0": "casadi",
"cost_ext_fun_type_e": "casadi",
"cost_type": "NONLINEAR_LS",
"cost_type_0": "NONLINEAR_LS",
"cost_type_e": "NONLINEAR_LS",
"yref": [
0.0,
0.0,
0.0,
0.0,
0.0
],
"yref_0": [
0.0,
0.0,
0.0,
0.0,
0.0
],
"yref_e": [
0.0,
0.0,
0.0
],
"zl": [],
"zl_e": [],
"zu": [],
"zu_e": []
},
"cython_include_dirs": [
"/usr/local/pyenv/versions/3.11.4/lib/python3.11/site-packages/numpy/core/include",
"/usr/local/pyenv/versions/3.11.4/include/python3.11"
],
"dims": {
"N": 32,
"nbu": 0,
"nbx": 2,
"nbx_0": 4,
"nbx_e": 0,
"nbxe_0": 4,
"ng": 0,
"ng_e": 0,
"nh": 0,
"nh_e": 0,
"np": 2,
"nphi": 0,
"nphi_e": 0,
"nr": 0,
"nr_e": 0,
"ns": 0,
"ns_e": 0,
"nsbu": 0,
"nsbx": 0,
"nsbx_e": 0,
"nsg": 0,
"nsg_e": 0,
"nsh": 0,
"nsh_e": 0,
"nsphi": 0,
"nsphi_e": 0,
"nu": 1,
"nx": 4,
"ny": 5,
"ny_0": 5,
"ny_e": 3,
"nz": 0
},
"json_file": "/data/openpilot/selfdrive/controls/lib/lateral_mpc_lib/acados_ocp_lat.json",
"model": {
"con_h_expr": null,
"con_h_expr_e": null,
"con_phi_expr": null,
"con_phi_expr_e": null,
"con_r_expr": null,
"con_r_expr_e": null,
"con_r_in_phi": null,
"con_r_in_phi_e": null,
"cost_conl_custom_outer_hess": null,
"cost_conl_custom_outer_hess_0": null,
"cost_conl_custom_outer_hess_e": null,
"cost_expr_ext_cost": null,
"cost_expr_ext_cost_0": null,
"cost_expr_ext_cost_custom_hess": null,
"cost_expr_ext_cost_custom_hess_0": null,
"cost_expr_ext_cost_custom_hess_e": null,
"cost_expr_ext_cost_e": null,
"cost_psi_expr": null,
"cost_psi_expr_0": null,
"cost_psi_expr_e": null,
"cost_r_in_psi_expr": null,
"cost_r_in_psi_expr_0": null,
"cost_r_in_psi_expr_e": null,
"cost_y_expr": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaegjaaaaaaaaaaaaaaafaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaacaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaafaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaajhpffghgpgegdaaaaaaaaaaaaaaaegbaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaaghpffghgpgegmcaaaaaaaaaaaaaajgkaaaaaaaegpcaaaaaaaaaaaaaahaaaaaaaahdhjgpffghgpgegdaaaaaaaaaaaaaaacheaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaamaaaaaaaahdhjgpfchbgehfgpffghgpgegdaaaaaaaaaaaaaaacheaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaanaaaaaaaahdhjgpfbgdgdgfgmgpffghgpgegeaaaaaaaaaaaaaaachjaaaaaaaaaaaaaaaegbaaaaaaaaaaaaaaachcaaaaaaaaaaaaaaaegmcaaaaaaaaaaaaaachkjjjjjjjjjjjjlpd",
"cost_y_expr_0": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaegjaaaaaaaaaaaaaaafaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaacaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaafaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaajhpffghgpgegdaaaaaaaaaaaaaaaegbaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaaghpffghgpgegmcaaaaaaaaaaaaaajgkaaaaaaaegpcaaaaaaaaaaaaaahaaaaaaaahdhjgpffghgpgegdaaaaaaaaaaaaaaacheaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaamaaaaaaaahdhjgpfchbgehfgpffghgpgegdaaaaaaaaaaaaaaacheaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaanaaaaaaaahdhjgpfbgdgdgfgmgpffghgpgegeaaaaaaaaaaaaaaachjaaaaaaaaaaaaaaaegbaaaaaaaaaaaaaaachcaaaaaaaaaaaaaaaegmcaaaaaaaaaaaaaachkjjjjjjjjjjjjlpd",
"cost_y_expr_e": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaeghaaaaaaaaaaaaaaadaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaacaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaajhpffghgpgegdaaaaaaaaaaaaaaaegbaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaaghpffghgpgegmcaaaaaaaaaaaaaajgkaaaaaaaegpcaaaaaaaaaaaaaahaaaaaaaahdhjgpffghgpgegdaaaaaaaaaaaaaaacheaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaamaaaaaaaahdhjgpfchbgehfgpffghgpg",
"disc_dyn_expr": null,
"dyn_disc_fun": null,
"dyn_disc_fun_jac": null,
"dyn_disc_fun_jac_hess": null,
"dyn_ext_fun_type": "casadi",
"dyn_generic_source": null,
"f_expl_expr": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaegiaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaacaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaegcaaaaaaaaaaaaaaaegdaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaaghpffghgpgegoaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaahaaaaaaaahdhjgpffghgpgegdaaaaaaaaaaaaaaaegdaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaapaaaaaaachpgehbgehjgpgogpfchbgegjgfhdhegnaaaaaaaaaaaaaaachcaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaamaaaaaaaahdhjgpfchbgehfgpffghgpgegbaaaaaaaaaaaaaaaegdaaaaaaaaaaaaaaachbaaaaaaaaaaaaaaaegnaaaaaaaaaaaaaaachcaaaaaaaaaaaaaaaegdaaaaaaaaaaaaaaaegdaaaaaaaaaaaaaaachfaaaaaaaaaaaaaaaegoaaaaaaaaaaaaaaachcaaaaaaaaaaaaaaachiaaaaaaaaaaaaaaachiaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaanaaaaaaaahdhjgpfbgdgdgfgmgpffghgpg",
"f_impl_expr": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaegiaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaacaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaegcaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaajaaaaaaaihpffghgpgpfegpgehegcaaaaaaaaaaaaaaaegdaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaaghpffghgpgegoaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaahaaaaaaaahdhjgpffghgpgegdaaaaaaaaaaaaaaaegdaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaapaaaaaaachpgehbgehjgpgogpfchbgegjgfhdhegnaaaaaaaaaaaaaaachdaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaamaaaaaaaahdhjgpfchbgehfgpffghgpgegcaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaajaaaaaaajhpffghgpgpfegpgehegbaaaaaaaaaaaaaaaegdaaaaaaaaaaaaaaachcaaaaaaaaaaaaaaaegnaaaaaaaaaaaaaaachdaaaaaaaaaaaaaaaegdaaaaaaaaaaaaaaaegdaaaaaaaaaaaaaaachgaaaaaaaaaaaaaaaegoaaaaaaaaaaaaaaachdaaaaaaaaaaaaaaachjaaaaaaaaaaaaaaaegcaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaalaaaaaaaahdhjgpffghgpgpfegpgehchjaaaaaaaaaaaaaaaegcaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaaabaaaaaaahdhjgpfchbgehfgpffghgpgpfegpgehegpcaaaaaaaaaaaaaanaaaaaaaahdhjgpfbgdgdgfgmgpffghgpg",
"gnsf": {
"nontrivial_f_LO": 1,
"purely_linear": 0
},
"name": "lat",
"p": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaeggaaaaaaaaaaaaaaacaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaaghpffghgpgegpcaaaaaaaaaaaaaapaaaaaaachpgehbgehjgpgogpfchbgegjgfhdh",
"u": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaegfaaaaaaaaaaaaaaabaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaanaaaaaaaahdhjgpfbgdgdgfgmgpffghgpg",
"x": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaegiaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaacaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaaihpffghgpgegpcaaaaaaaaaaaaaafaaaaaaajhpffghgpgegpcaaaaaaaaaaaaaahaaaaaaaahdhjgpffghgpgegpcaaaaaaaaaaaaaamaaaaaaaahdhjgpfchbgehfgpffghgpg",
"xdot": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaegiaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaacaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaajaaaaaaaihpffghgpgpfegpgehegpcaaaaaaaaaaaaaajaaaaaaajhpffghgpgpfegpgehegpcaaaaaaaaaaaaaalaaaaaaaahdhjgpffghgpgpfegpgehegpcaaaaaaaaaaaaaaabaaaaaaahdhjgpfchbgehfgpffghgpgpfegpgeh",
"z": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaegdaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
},
"parameter_values": [
0.0,
0.0
],
"problem_class": "OCP",
"shared_lib_ext": ".so",
"solver_options": {
"Tsim": 0.009765625,
"alpha_min": 0.05,
"alpha_reduction": 0.7,
"collocation_type": "GAUSS_LEGENDRE",
"custom_templates": [],
"custom_update_copy": true,
"custom_update_filename": "",
"custom_update_header_filename": "",
"eps_sufficient_descent": 0.0001,
"exact_hess_constr": 1,
"exact_hess_cost": 1,
"exact_hess_dyn": 1,
"ext_cost_num_hess": 0,
"ext_fun_compile_flags": "-O2",
"full_step_dual": 0,
"globalization": "FIXED_STEP",
"globalization_use_SOC": 0,
"hessian_approx": "GAUSS_NEWTON",
"hpipm_mode": "BALANCE",
"initialize_t_slacks": 0,
"integrator_type": "ERK",
"levenberg_marquardt": 0.0,
"line_search_use_sufficient_descent": 0,
"model_external_shared_lib_dir": null,
"model_external_shared_lib_name": null,
"nlp_solver_ext_qp_res": 0,
"nlp_solver_max_iter": 100,
"nlp_solver_step_length": 1.0,
"nlp_solver_tol_comp": 1e-06,
"nlp_solver_tol_eq": 1e-06,
"nlp_solver_tol_ineq": 1e-06,
"nlp_solver_tol_stat": 1e-06,
"nlp_solver_type": "SQP_RTI",
"print_level": 0,
"qp_solver": "PARTIAL_CONDENSING_HPIPM",
"qp_solver_cond_N": 1,
"qp_solver_cond_ric_alg": 1,
"qp_solver_iter_max": 1,
"qp_solver_ric_alg": 1,
"qp_solver_tol_comp": null,
"qp_solver_tol_eq": null,
"qp_solver_tol_ineq": null,
"qp_solver_tol_stat": null,
"qp_solver_warm_start": 0,
"regularize_method": null,
"shooting_nodes": [
0.0,
0.009765625,
0.0390625,
0.087890625,
0.15625,
0.244140625,
0.3515625,
0.478515625,
0.625,
0.791015625,
0.9765625,
1.181640625,
1.40625,
1.650390625,
1.9140625,
2.197265625,
2.5,
2.822265625,
3.1640625,
3.525390625,
3.90625,
4.306640625,
4.7265625,
5.166015625,
5.625,
6.103515625,
6.6015625,
7.119140625,
7.65625,
8.212890625,
8.7890625,
9.384765625,
10.0
],
"sim_method_jac_reuse": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"sim_method_newton_iter": 3,
"sim_method_newton_tol": 0.0,
"sim_method_num_stages": [
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4
],
"sim_method_num_steps": [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
],
"tf": 10.0,
"time_steps": [
0.009765625,
0.029296875,
0.048828125,
0.068359375,
0.087890625,
0.107421875,
0.126953125,
0.146484375,
0.166015625,
0.185546875,
0.205078125,
0.224609375,
0.244140625,
0.263671875,
0.283203125,
0.302734375,
0.322265625,
0.341796875,
0.361328125,
0.380859375,
0.400390625,
0.419921875,
0.439453125,
0.458984375,
0.478515625,
0.498046875,
0.517578125,
0.537109375,
0.556640625,
0.576171875,
0.595703125,
0.615234375
]
}
}
+1 -2
View File
@@ -92,11 +92,10 @@ class LongControl:
self.CP = CP self.CP = CP
self.long_control_state = LongCtrlState.off self.long_control_state = LongCtrlState.off
self.experimental_mode = False self.experimental_mode = False
pos_p_limit = 0.0
self.pid = PIDController((CP.longitudinalTuning.kpBP, CP.longitudinalTuning.kpV), self.pid = PIDController((CP.longitudinalTuning.kpBP, CP.longitudinalTuning.kpV),
(CP.longitudinalTuning.kiBP, CP.longitudinalTuning.kiV), (CP.longitudinalTuning.kiBP, CP.longitudinalTuning.kiV),
k_f=CP.longitudinalTuning.kf, rate=1 / DT_CTRL, k_f=CP.longitudinalTuning.kf, rate=1 / DT_CTRL,
pos_p_limit=pos_p_limit) pos_p_limit=None)
self.v_pid = 0.0 self.v_pid = 0.0
self._mode_setup() self._mode_setup()
self.last_output_accel = 0.0 self.last_output_accel = 0.0
@@ -1,524 +0,0 @@
{
"acados_include_path": "/data/openpilot/third_party/acados/include",
"acados_lib_path": "/data/openpilot/third_party/acados/lib",
"code_export_directory": "/data/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code",
"constraints": {
"C": [],
"C_e": [],
"D": [],
"constr_type": "BGH",
"constr_type_e": "BGH",
"idxbu": [],
"idxbx": [],
"idxbx_0": [
0,
1,
2
],
"idxbx_e": [],
"idxbxe_0": [
0,
1,
2
],
"idxsbu": [],
"idxsbx": [],
"idxsbx_e": [],
"idxsg": [],
"idxsg_e": [],
"idxsh": [
0,
1,
2,
3
],
"idxsh_e": [],
"idxsphi": [],
"idxsphi_e": [],
"lbu": [],
"lbx": [],
"lbx_0": [
0.0,
0.0,
0.0
],
"lbx_e": [],
"lg": [],
"lg_e": [],
"lh": [
0.0,
0.0,
0.0,
0.0
],
"lh_e": [],
"lphi": [],
"lphi_e": [],
"lsbu": [],
"lsbx": [],
"lsbx_e": [],
"lsg": [],
"lsg_e": [],
"lsh": [
0.0,
0.0,
0.0,
0.0
],
"lsh_e": [],
"lsphi": [],
"lsphi_e": [],
"ubu": [],
"ubx": [],
"ubx_0": [
0.0,
0.0,
0.0
],
"ubx_e": [],
"ug": [],
"ug_e": [],
"uh": [
10000.0,
10000.0,
10000.0,
10000.0
],
"uh_e": [],
"uphi": [],
"uphi_e": [],
"usbu": [],
"usbx": [],
"usbx_e": [],
"usg": [],
"usg_e": [],
"ush": [
0.0,
0.0,
0.0,
0.0
],
"ush_e": [],
"usphi": [],
"usphi_e": []
},
"cost": {
"Vu": [],
"Vu_0": [],
"Vx": [],
"Vx_0": [],
"Vx_e": [],
"Vz": [],
"Vz_0": [],
"W": [
[
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
]
],
"W_0": [
[
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
]
],
"W_e": [
[
0.0,
0.0,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0,
0.0,
0.0
]
],
"Zl": [
0.0,
0.0,
0.0,
0.0
],
"Zl_e": [],
"Zu": [
0.0,
0.0,
0.0,
0.0
],
"Zu_e": [],
"cost_ext_fun_type": "casadi",
"cost_ext_fun_type_0": "casadi",
"cost_ext_fun_type_e": "casadi",
"cost_type": "NONLINEAR_LS",
"cost_type_0": "NONLINEAR_LS",
"cost_type_e": "NONLINEAR_LS",
"yref": [
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
"yref_0": [
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
"yref_e": [
0.0,
0.0,
0.0,
0.0,
0.0
],
"zl": [
0.0,
0.0,
0.0,
0.0
],
"zl_e": [],
"zu": [
0.0,
0.0,
0.0,
0.0
],
"zu_e": []
},
"cython_include_dirs": [
"/usr/local/pyenv/versions/3.11.4/lib/python3.11/site-packages/numpy/core/include",
"/usr/local/pyenv/versions/3.11.4/include/python3.11"
],
"dims": {
"N": 12,
"nbu": 0,
"nbx": 0,
"nbx_0": 3,
"nbx_e": 0,
"nbxe_0": 3,
"ng": 0,
"ng_e": 0,
"nh": 4,
"nh_e": 0,
"np": 6,
"nphi": 0,
"nphi_e": 0,
"nr": 0,
"nr_e": 0,
"ns": 4,
"ns_e": 0,
"nsbu": 0,
"nsbx": 0,
"nsbx_e": 0,
"nsg": 0,
"nsg_e": 0,
"nsh": 4,
"nsh_e": 0,
"nsphi": 0,
"nsphi_e": 0,
"nu": 1,
"nx": 3,
"ny": 6,
"ny_0": 6,
"ny_e": 5,
"nz": 0
},
"json_file": "/data/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/acados_ocp_long.json",
"model": {
"con_h_expr": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaegiaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaacaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaaghpffghgpgegcaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaabgpffghgpgegpcaaaaaaaaaaaaaafaaaaaaabgpfngjgogegcaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaabgpfngbgihchcaaaaaaaaaaaaaaaegeaaaaaaaaaaaaaaaegcaaaaaaaaaaaaaaaegcaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaakaaaaaaaihpfpgcgdhehbgdgmgfgegpcaaaaaaaaaaaaaafaaaaaaaihpffghgpgegdaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaacbaaaaaamgfgbgegpfegbgoghgfgchpfggbgdgehpgchegbaaaaaaaaaaaaaaaegbaaaaaaaaaaaaaaaegeaaaaaaaaaaaaaaaeglaaaaaaaaaaaaaaachbaaaaaaaaaaaaaaaegmcaaaaaaaaaaaaaajgfaaaaaaaegdaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaanaaaaaaamgfgbgegpfehpfggpgmgmgpghhchbaaaaaaaaaaaaaaaegmcaaaaaaaaaaaaaajggaaaaaaaegbaaaaaaaaaaaaaaachbaaaaaaaaaaaaaaaegmcaaaaaaaaaaaaaajgkaaaaaaa",
"con_h_expr_e": null,
"con_phi_expr": null,
"con_phi_expr_e": null,
"con_r_expr": null,
"con_r_expr_e": null,
"con_r_in_phi": null,
"con_r_in_phi_e": null,
"cost_conl_custom_outer_hess": null,
"cost_conl_custom_outer_hess_0": null,
"cost_conl_custom_outer_hess_e": null,
"cost_expr_ext_cost": null,
"cost_expr_ext_cost_0": null,
"cost_expr_ext_cost_custom_hess": null,
"cost_expr_ext_cost_custom_hess_0": null,
"cost_expr_ext_cost_custom_hess_e": null,
"cost_expr_ext_cost_e": null,
"cost_psi_expr": null,
"cost_psi_expr_0": null,
"cost_psi_expr_e": null,
"cost_r_in_psi_expr": null,
"cost_r_in_psi_expr_0": null,
"cost_r_in_psi_expr_e": null,
"cost_y_expr": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaegkaaaaaaaaaaaaaaagaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaagaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaacaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaafaaaaaaaaaaaaaaagaaaaaaaaaaaaaaaegeaaaaaaaaaaaaaaaegcaaaaaaaaaaaaaaaegcaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaakaaaaaaaihpfpgcgdhehbgdgmgfgegpcaaaaaaaaaaaaaafaaaaaaaihpffghgpgegbaaaaaaaaaaaaaaaegbaaaaaaaaaaaaaaaegeaaaaaaaaaaaaaaaeglaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaaghpffghgpgegmcaaaaaaaaaaaaaajgfaaaaaaaegdaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaanaaaaaaamgfgbgegpfehpfggpgmgmgpghhcheaaaaaaaaaaaaaaaegmcaaaaaaaaaaaaaajggaaaaaaaegbaaaaaaaaaaaaaaacheaaaaaaaaaaaaaaaegmcaaaaaaaaaaaaaajgkaaaaaaachcaaaaaaaaaaaaaaacheaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaabgpffghgpgegcaaaaaaaaaaaaaaachbbaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaagaaaaaaaahchfgghpfbgegpcaaaaaaaaaaaaaafaaaaaaakgpffghgpg",
"cost_y_expr_0": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaegkaaaaaaaaaaaaaaagaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaagaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaacaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaafaaaaaaaaaaaaaaagaaaaaaaaaaaaaaaegeaaaaaaaaaaaaaaaegcaaaaaaaaaaaaaaaegcaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaakaaaaaaaihpfpgcgdhehbgdgmgfgegpcaaaaaaaaaaaaaafaaaaaaaihpffghgpgegbaaaaaaaaaaaaaaaegbaaaaaaaaaaaaaaaegeaaaaaaaaaaaaaaaeglaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaaghpffghgpgegmcaaaaaaaaaaaaaajgfaaaaaaaegdaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaanaaaaaaamgfgbgegpfehpfggpgmgmgpghhcheaaaaaaaaaaaaaaaegmcaaaaaaaaaaaaaajggaaaaaaaegbaaaaaaaaaaaaaaacheaaaaaaaaaaaaaaaegmcaaaaaaaaaaaaaajgkaaaaaaachcaaaaaaaaaaaaaaacheaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaabgpffghgpgegcaaaaaaaaaaaaaaachbbaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaagaaaaaaaahchfgghpfbgegpcaaaaaaaaaaaaaafaaaaaaakgpffghgpg",
"cost_y_expr_e": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaegjaaaaaaaaaaaaaaafaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaacaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaafaaaaaaaaaaaaaaaegeaaaaaaaaaaaaaaaegcaaaaaaaaaaaaaaaegcaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaakaaaaaaaihpfpgcgdhehbgdgmgfgegpcaaaaaaaaaaaaaafaaaaaaaihpffghgpgegbaaaaaaaaaaaaaaaegbaaaaaaaaaaaaaaaegeaaaaaaaaaaaaaaaeglaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaaghpffghgpgegmcaaaaaaaaaaaaaajgfaaaaaaaegdaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaanaaaaaaamgfgbgegpfehpfggpgmgmgpghhcheaaaaaaaaaaaaaaaegmcaaaaaaaaaaaaaajggaaaaaaaegbaaaaaaaaaaaaaaacheaaaaaaaaaaaaaaaegmcaaaaaaaaaaaaaajgkaaaaaaachcaaaaaaaaaaaaaaacheaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaabgpffghgpgegcaaaaaaaaaaaaaaachbbaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaagaaaaaaaahchfgghpfbg",
"disc_dyn_expr": null,
"dyn_disc_fun": null,
"dyn_disc_fun_jac": null,
"dyn_disc_fun_jac_hess": null,
"dyn_ext_fun_type": "casadi",
"dyn_generic_source": null,
"f_expl_expr": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaeghaaaaaaaaaaaaaaadaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaacaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaaghpffghgpgegpcaaaaaaaaaaaaaafaaaaaaabgpffghgpgegpcaaaaaaaaaaaaaafaaaaaaakgpffghgpg",
"f_impl_expr": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaeghaaaaaaaaaaaaaaadaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaacaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaegcaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaajaaaaaaaihpffghgpgpfegpgehegpcaaaaaaaaaaaaaafaaaaaaaghpffghgpgegcaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaajaaaaaaaghpffghgpgpfegpgehegpcaaaaaaaaaaaaaafaaaaaaabgpffghgpgegcaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaajaaaaaaabgpffghgpgpfegpgehegpcaaaaaaaaaaaaaafaaaaaaakgpffghgpg",
"gnsf": {
"nontrivial_f_LO": 1,
"purely_linear": 0
},
"name": "long",
"p": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaegkaaaaaaaaaaaaaaagaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaagaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaacaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaafaaaaaaaaaaaaaaagaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaabgpfngjgogegpcaaaaaaaaaaaaaafaaaaaaabgpfngbgihegpcaaaaaaaaaaaaaakaaaaaaaihpfpgcgdhehbgdgmgfgegpcaaaaaaaaaaaaaagaaaaaaaahchfgghpfbgegpcaaaaaaaaaaaaaanaaaaaaamgfgbgegpfehpfggpgmgmgpghhegpcaaaaaaaaaaaaaacbaaaaaamgfgbgegpfegbgoghgfgchpfggbgdgehpgch",
"u": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaegfaaaaaaaaaaaaaaabaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaakgpffghgpg",
"x": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaeghaaaaaaaaaaaaaaadaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaacaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaaihpffghgpgegpcaaaaaaaaaaaaaafaaaaaaaghpffghgpgegpcaaaaaaaaaaaaaafaaaaaaabgpffghgpg",
"xdot": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaeghaaaaaaaaaaaaaaadaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaacaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaajaaaaaaaihpffghgpgpfegpgehegpcaaaaaaaaaaaaaajaaaaaaaghpffghgpgpfegpgehegpcaaaaaaaaaaaaaajaaaaaaabgpffghgpgpfegpgeh",
"z": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaegdaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
},
"parameter_values": [
-1.2,
1.2,
0.0,
0.0,
1.45,
0.75
],
"problem_class": "OCP",
"shared_lib_ext": ".so",
"solver_options": {
"Tsim": 0.06944444444444445,
"alpha_min": 0.05,
"alpha_reduction": 0.7,
"collocation_type": "GAUSS_LEGENDRE",
"custom_templates": [],
"custom_update_copy": true,
"custom_update_filename": "",
"custom_update_header_filename": "",
"eps_sufficient_descent": 0.0001,
"exact_hess_constr": 1,
"exact_hess_cost": 1,
"exact_hess_dyn": 1,
"ext_cost_num_hess": 0,
"ext_fun_compile_flags": "-O2",
"full_step_dual": 0,
"globalization": "FIXED_STEP",
"globalization_use_SOC": 0,
"hessian_approx": "GAUSS_NEWTON",
"hpipm_mode": "BALANCE",
"initialize_t_slacks": 0,
"integrator_type": "ERK",
"levenberg_marquardt": 0.0,
"line_search_use_sufficient_descent": 0,
"model_external_shared_lib_dir": null,
"model_external_shared_lib_name": null,
"nlp_solver_ext_qp_res": 0,
"nlp_solver_max_iter": 100,
"nlp_solver_step_length": 1.0,
"nlp_solver_tol_comp": 1e-06,
"nlp_solver_tol_eq": 1e-06,
"nlp_solver_tol_ineq": 1e-06,
"nlp_solver_tol_stat": 1e-06,
"nlp_solver_type": "SQP_RTI",
"print_level": 0,
"qp_solver": "PARTIAL_CONDENSING_HPIPM",
"qp_solver_cond_N": 1,
"qp_solver_cond_ric_alg": 1,
"qp_solver_iter_max": 10,
"qp_solver_ric_alg": 1,
"qp_solver_tol_comp": 0.001,
"qp_solver_tol_eq": 0.001,
"qp_solver_tol_ineq": 0.001,
"qp_solver_tol_stat": 0.001,
"qp_solver_warm_start": 0,
"regularize_method": null,
"shooting_nodes": [
0.0,
0.06944444444444445,
0.2777777777777778,
0.625,
1.1111111111111112,
1.7361111111111114,
2.5,
3.4027777777777786,
4.444444444444445,
5.625,
6.9444444444444455,
8.402777777777777,
10.0
],
"sim_method_jac_reuse": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"sim_method_newton_iter": 3,
"sim_method_newton_tol": 0.0,
"sim_method_num_stages": [
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4
],
"sim_method_num_steps": [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
],
"tf": 10.0,
"time_steps": [
0.06944444444444445,
0.20833333333333334,
0.3472222222222222,
0.48611111111111116,
0.6250000000000002,
0.7638888888888886,
0.9027777777777786,
1.041666666666666,
1.1805555555555554,
1.3194444444444455,
1.4583333333333313,
1.5972222222222232
]
}
}
Binary file not shown.
+342 -342
View File
@@ -45,326 +45,326 @@ const static double MAHA_THRESH_31 = 3.8414588206941227;
* * * *
* This file is part of 'ekf' * * This file is part of 'ekf' *
******************************************************************************/ ******************************************************************************/
void err_fun(double *nom_x, double *delta_x, double *out_5662147043452870344) { void err_fun(double *nom_x, double *delta_x, double *out_2366717911037962719) {
out_5662147043452870344[0] = delta_x[0] + nom_x[0]; out_2366717911037962719[0] = delta_x[0] + nom_x[0];
out_5662147043452870344[1] = delta_x[1] + nom_x[1]; out_2366717911037962719[1] = delta_x[1] + nom_x[1];
out_5662147043452870344[2] = delta_x[2] + nom_x[2]; out_2366717911037962719[2] = delta_x[2] + nom_x[2];
out_5662147043452870344[3] = delta_x[3] + nom_x[3]; out_2366717911037962719[3] = delta_x[3] + nom_x[3];
out_5662147043452870344[4] = delta_x[4] + nom_x[4]; out_2366717911037962719[4] = delta_x[4] + nom_x[4];
out_5662147043452870344[5] = delta_x[5] + nom_x[5]; out_2366717911037962719[5] = delta_x[5] + nom_x[5];
out_5662147043452870344[6] = delta_x[6] + nom_x[6]; out_2366717911037962719[6] = delta_x[6] + nom_x[6];
out_5662147043452870344[7] = delta_x[7] + nom_x[7]; out_2366717911037962719[7] = delta_x[7] + nom_x[7];
out_5662147043452870344[8] = delta_x[8] + nom_x[8]; out_2366717911037962719[8] = delta_x[8] + nom_x[8];
} }
void inv_err_fun(double *nom_x, double *true_x, double *out_2016113788005242335) { void inv_err_fun(double *nom_x, double *true_x, double *out_70336108065318295) {
out_2016113788005242335[0] = -nom_x[0] + true_x[0]; out_70336108065318295[0] = -nom_x[0] + true_x[0];
out_2016113788005242335[1] = -nom_x[1] + true_x[1]; out_70336108065318295[1] = -nom_x[1] + true_x[1];
out_2016113788005242335[2] = -nom_x[2] + true_x[2]; out_70336108065318295[2] = -nom_x[2] + true_x[2];
out_2016113788005242335[3] = -nom_x[3] + true_x[3]; out_70336108065318295[3] = -nom_x[3] + true_x[3];
out_2016113788005242335[4] = -nom_x[4] + true_x[4]; out_70336108065318295[4] = -nom_x[4] + true_x[4];
out_2016113788005242335[5] = -nom_x[5] + true_x[5]; out_70336108065318295[5] = -nom_x[5] + true_x[5];
out_2016113788005242335[6] = -nom_x[6] + true_x[6]; out_70336108065318295[6] = -nom_x[6] + true_x[6];
out_2016113788005242335[7] = -nom_x[7] + true_x[7]; out_70336108065318295[7] = -nom_x[7] + true_x[7];
out_2016113788005242335[8] = -nom_x[8] + true_x[8]; out_70336108065318295[8] = -nom_x[8] + true_x[8];
} }
void H_mod_fun(double *state, double *out_8997301641043644665) { void H_mod_fun(double *state, double *out_281700328218384173) {
out_8997301641043644665[0] = 1.0; out_281700328218384173[0] = 1.0;
out_8997301641043644665[1] = 0; out_281700328218384173[1] = 0;
out_8997301641043644665[2] = 0; out_281700328218384173[2] = 0;
out_8997301641043644665[3] = 0; out_281700328218384173[3] = 0;
out_8997301641043644665[4] = 0; out_281700328218384173[4] = 0;
out_8997301641043644665[5] = 0; out_281700328218384173[5] = 0;
out_8997301641043644665[6] = 0; out_281700328218384173[6] = 0;
out_8997301641043644665[7] = 0; out_281700328218384173[7] = 0;
out_8997301641043644665[8] = 0; out_281700328218384173[8] = 0;
out_8997301641043644665[9] = 0; out_281700328218384173[9] = 0;
out_8997301641043644665[10] = 1.0; out_281700328218384173[10] = 1.0;
out_8997301641043644665[11] = 0; out_281700328218384173[11] = 0;
out_8997301641043644665[12] = 0; out_281700328218384173[12] = 0;
out_8997301641043644665[13] = 0; out_281700328218384173[13] = 0;
out_8997301641043644665[14] = 0; out_281700328218384173[14] = 0;
out_8997301641043644665[15] = 0; out_281700328218384173[15] = 0;
out_8997301641043644665[16] = 0; out_281700328218384173[16] = 0;
out_8997301641043644665[17] = 0; out_281700328218384173[17] = 0;
out_8997301641043644665[18] = 0; out_281700328218384173[18] = 0;
out_8997301641043644665[19] = 0; out_281700328218384173[19] = 0;
out_8997301641043644665[20] = 1.0; out_281700328218384173[20] = 1.0;
out_8997301641043644665[21] = 0; out_281700328218384173[21] = 0;
out_8997301641043644665[22] = 0; out_281700328218384173[22] = 0;
out_8997301641043644665[23] = 0; out_281700328218384173[23] = 0;
out_8997301641043644665[24] = 0; out_281700328218384173[24] = 0;
out_8997301641043644665[25] = 0; out_281700328218384173[25] = 0;
out_8997301641043644665[26] = 0; out_281700328218384173[26] = 0;
out_8997301641043644665[27] = 0; out_281700328218384173[27] = 0;
out_8997301641043644665[28] = 0; out_281700328218384173[28] = 0;
out_8997301641043644665[29] = 0; out_281700328218384173[29] = 0;
out_8997301641043644665[30] = 1.0; out_281700328218384173[30] = 1.0;
out_8997301641043644665[31] = 0; out_281700328218384173[31] = 0;
out_8997301641043644665[32] = 0; out_281700328218384173[32] = 0;
out_8997301641043644665[33] = 0; out_281700328218384173[33] = 0;
out_8997301641043644665[34] = 0; out_281700328218384173[34] = 0;
out_8997301641043644665[35] = 0; out_281700328218384173[35] = 0;
out_8997301641043644665[36] = 0; out_281700328218384173[36] = 0;
out_8997301641043644665[37] = 0; out_281700328218384173[37] = 0;
out_8997301641043644665[38] = 0; out_281700328218384173[38] = 0;
out_8997301641043644665[39] = 0; out_281700328218384173[39] = 0;
out_8997301641043644665[40] = 1.0; out_281700328218384173[40] = 1.0;
out_8997301641043644665[41] = 0; out_281700328218384173[41] = 0;
out_8997301641043644665[42] = 0; out_281700328218384173[42] = 0;
out_8997301641043644665[43] = 0; out_281700328218384173[43] = 0;
out_8997301641043644665[44] = 0; out_281700328218384173[44] = 0;
out_8997301641043644665[45] = 0; out_281700328218384173[45] = 0;
out_8997301641043644665[46] = 0; out_281700328218384173[46] = 0;
out_8997301641043644665[47] = 0; out_281700328218384173[47] = 0;
out_8997301641043644665[48] = 0; out_281700328218384173[48] = 0;
out_8997301641043644665[49] = 0; out_281700328218384173[49] = 0;
out_8997301641043644665[50] = 1.0; out_281700328218384173[50] = 1.0;
out_8997301641043644665[51] = 0; out_281700328218384173[51] = 0;
out_8997301641043644665[52] = 0; out_281700328218384173[52] = 0;
out_8997301641043644665[53] = 0; out_281700328218384173[53] = 0;
out_8997301641043644665[54] = 0; out_281700328218384173[54] = 0;
out_8997301641043644665[55] = 0; out_281700328218384173[55] = 0;
out_8997301641043644665[56] = 0; out_281700328218384173[56] = 0;
out_8997301641043644665[57] = 0; out_281700328218384173[57] = 0;
out_8997301641043644665[58] = 0; out_281700328218384173[58] = 0;
out_8997301641043644665[59] = 0; out_281700328218384173[59] = 0;
out_8997301641043644665[60] = 1.0; out_281700328218384173[60] = 1.0;
out_8997301641043644665[61] = 0; out_281700328218384173[61] = 0;
out_8997301641043644665[62] = 0; out_281700328218384173[62] = 0;
out_8997301641043644665[63] = 0; out_281700328218384173[63] = 0;
out_8997301641043644665[64] = 0; out_281700328218384173[64] = 0;
out_8997301641043644665[65] = 0; out_281700328218384173[65] = 0;
out_8997301641043644665[66] = 0; out_281700328218384173[66] = 0;
out_8997301641043644665[67] = 0; out_281700328218384173[67] = 0;
out_8997301641043644665[68] = 0; out_281700328218384173[68] = 0;
out_8997301641043644665[69] = 0; out_281700328218384173[69] = 0;
out_8997301641043644665[70] = 1.0; out_281700328218384173[70] = 1.0;
out_8997301641043644665[71] = 0; out_281700328218384173[71] = 0;
out_8997301641043644665[72] = 0; out_281700328218384173[72] = 0;
out_8997301641043644665[73] = 0; out_281700328218384173[73] = 0;
out_8997301641043644665[74] = 0; out_281700328218384173[74] = 0;
out_8997301641043644665[75] = 0; out_281700328218384173[75] = 0;
out_8997301641043644665[76] = 0; out_281700328218384173[76] = 0;
out_8997301641043644665[77] = 0; out_281700328218384173[77] = 0;
out_8997301641043644665[78] = 0; out_281700328218384173[78] = 0;
out_8997301641043644665[79] = 0; out_281700328218384173[79] = 0;
out_8997301641043644665[80] = 1.0; out_281700328218384173[80] = 1.0;
} }
void f_fun(double *state, double dt, double *out_2973469614408186678) { void f_fun(double *state, double dt, double *out_3945758947465398650) {
out_2973469614408186678[0] = state[0]; out_3945758947465398650[0] = state[0];
out_2973469614408186678[1] = state[1]; out_3945758947465398650[1] = state[1];
out_2973469614408186678[2] = state[2]; out_3945758947465398650[2] = state[2];
out_2973469614408186678[3] = state[3]; out_3945758947465398650[3] = state[3];
out_2973469614408186678[4] = state[4]; out_3945758947465398650[4] = state[4];
out_2973469614408186678[5] = dt*((-state[4] + (-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(mass*state[4]))*state[6] - 9.8000000000000007*state[8] + stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(mass*state[1]) + (-stiffness_front*state[0] - stiffness_rear*state[0])*state[5]/(mass*state[4])) + state[5]; out_3945758947465398650[5] = dt*((-state[4] + (-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(mass*state[4]))*state[6] - 9.8000000000000007*state[8] + stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(mass*state[1]) + (-stiffness_front*state[0] - stiffness_rear*state[0])*state[5]/(mass*state[4])) + state[5];
out_2973469614408186678[6] = dt*(center_to_front*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(rotational_inertia*state[1]) + (-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])*state[5]/(rotational_inertia*state[4]) + (-pow(center_to_front, 2)*stiffness_front*state[0] - pow(center_to_rear, 2)*stiffness_rear*state[0])*state[6]/(rotational_inertia*state[4])) + state[6]; out_3945758947465398650[6] = dt*(center_to_front*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(rotational_inertia*state[1]) + (-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])*state[5]/(rotational_inertia*state[4]) + (-pow(center_to_front, 2)*stiffness_front*state[0] - pow(center_to_rear, 2)*stiffness_rear*state[0])*state[6]/(rotational_inertia*state[4])) + state[6];
out_2973469614408186678[7] = state[7]; out_3945758947465398650[7] = state[7];
out_2973469614408186678[8] = state[8]; out_3945758947465398650[8] = state[8];
} }
void F_fun(double *state, double dt, double *out_4040592134712196686) { void F_fun(double *state, double dt, double *out_7239966002367196486) {
out_4040592134712196686[0] = 1; out_7239966002367196486[0] = 1;
out_4040592134712196686[1] = 0; out_7239966002367196486[1] = 0;
out_4040592134712196686[2] = 0; out_7239966002367196486[2] = 0;
out_4040592134712196686[3] = 0; out_7239966002367196486[3] = 0;
out_4040592134712196686[4] = 0; out_7239966002367196486[4] = 0;
out_4040592134712196686[5] = 0; out_7239966002367196486[5] = 0;
out_4040592134712196686[6] = 0; out_7239966002367196486[6] = 0;
out_4040592134712196686[7] = 0; out_7239966002367196486[7] = 0;
out_4040592134712196686[8] = 0; out_7239966002367196486[8] = 0;
out_4040592134712196686[9] = 0; out_7239966002367196486[9] = 0;
out_4040592134712196686[10] = 1; out_7239966002367196486[10] = 1;
out_4040592134712196686[11] = 0; out_7239966002367196486[11] = 0;
out_4040592134712196686[12] = 0; out_7239966002367196486[12] = 0;
out_4040592134712196686[13] = 0; out_7239966002367196486[13] = 0;
out_4040592134712196686[14] = 0; out_7239966002367196486[14] = 0;
out_4040592134712196686[15] = 0; out_7239966002367196486[15] = 0;
out_4040592134712196686[16] = 0; out_7239966002367196486[16] = 0;
out_4040592134712196686[17] = 0; out_7239966002367196486[17] = 0;
out_4040592134712196686[18] = 0; out_7239966002367196486[18] = 0;
out_4040592134712196686[19] = 0; out_7239966002367196486[19] = 0;
out_4040592134712196686[20] = 1; out_7239966002367196486[20] = 1;
out_4040592134712196686[21] = 0; out_7239966002367196486[21] = 0;
out_4040592134712196686[22] = 0; out_7239966002367196486[22] = 0;
out_4040592134712196686[23] = 0; out_7239966002367196486[23] = 0;
out_4040592134712196686[24] = 0; out_7239966002367196486[24] = 0;
out_4040592134712196686[25] = 0; out_7239966002367196486[25] = 0;
out_4040592134712196686[26] = 0; out_7239966002367196486[26] = 0;
out_4040592134712196686[27] = 0; out_7239966002367196486[27] = 0;
out_4040592134712196686[28] = 0; out_7239966002367196486[28] = 0;
out_4040592134712196686[29] = 0; out_7239966002367196486[29] = 0;
out_4040592134712196686[30] = 1; out_7239966002367196486[30] = 1;
out_4040592134712196686[31] = 0; out_7239966002367196486[31] = 0;
out_4040592134712196686[32] = 0; out_7239966002367196486[32] = 0;
out_4040592134712196686[33] = 0; out_7239966002367196486[33] = 0;
out_4040592134712196686[34] = 0; out_7239966002367196486[34] = 0;
out_4040592134712196686[35] = 0; out_7239966002367196486[35] = 0;
out_4040592134712196686[36] = 0; out_7239966002367196486[36] = 0;
out_4040592134712196686[37] = 0; out_7239966002367196486[37] = 0;
out_4040592134712196686[38] = 0; out_7239966002367196486[38] = 0;
out_4040592134712196686[39] = 0; out_7239966002367196486[39] = 0;
out_4040592134712196686[40] = 1; out_7239966002367196486[40] = 1;
out_4040592134712196686[41] = 0; out_7239966002367196486[41] = 0;
out_4040592134712196686[42] = 0; out_7239966002367196486[42] = 0;
out_4040592134712196686[43] = 0; out_7239966002367196486[43] = 0;
out_4040592134712196686[44] = 0; out_7239966002367196486[44] = 0;
out_4040592134712196686[45] = dt*(stiffness_front*(-state[2] - state[3] + state[7])/(mass*state[1]) + (-stiffness_front - stiffness_rear)*state[5]/(mass*state[4]) + (-center_to_front*stiffness_front + center_to_rear*stiffness_rear)*state[6]/(mass*state[4])); out_7239966002367196486[45] = dt*(stiffness_front*(-state[2] - state[3] + state[7])/(mass*state[1]) + (-stiffness_front - stiffness_rear)*state[5]/(mass*state[4]) + (-center_to_front*stiffness_front + center_to_rear*stiffness_rear)*state[6]/(mass*state[4]));
out_4040592134712196686[46] = -dt*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(mass*pow(state[1], 2)); out_7239966002367196486[46] = -dt*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(mass*pow(state[1], 2));
out_4040592134712196686[47] = -dt*stiffness_front*state[0]/(mass*state[1]); out_7239966002367196486[47] = -dt*stiffness_front*state[0]/(mass*state[1]);
out_4040592134712196686[48] = -dt*stiffness_front*state[0]/(mass*state[1]); out_7239966002367196486[48] = -dt*stiffness_front*state[0]/(mass*state[1]);
out_4040592134712196686[49] = dt*((-1 - (-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(mass*pow(state[4], 2)))*state[6] - (-stiffness_front*state[0] - stiffness_rear*state[0])*state[5]/(mass*pow(state[4], 2))); out_7239966002367196486[49] = dt*((-1 - (-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(mass*pow(state[4], 2)))*state[6] - (-stiffness_front*state[0] - stiffness_rear*state[0])*state[5]/(mass*pow(state[4], 2)));
out_4040592134712196686[50] = dt*(-stiffness_front*state[0] - stiffness_rear*state[0])/(mass*state[4]) + 1; out_7239966002367196486[50] = dt*(-stiffness_front*state[0] - stiffness_rear*state[0])/(mass*state[4]) + 1;
out_4040592134712196686[51] = dt*(-state[4] + (-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(mass*state[4])); out_7239966002367196486[51] = dt*(-state[4] + (-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(mass*state[4]));
out_4040592134712196686[52] = dt*stiffness_front*state[0]/(mass*state[1]); out_7239966002367196486[52] = dt*stiffness_front*state[0]/(mass*state[1]);
out_4040592134712196686[53] = -9.8000000000000007*dt; out_7239966002367196486[53] = -9.8000000000000007*dt;
out_4040592134712196686[54] = dt*(center_to_front*stiffness_front*(-state[2] - state[3] + state[7])/(rotational_inertia*state[1]) + (-center_to_front*stiffness_front + center_to_rear*stiffness_rear)*state[5]/(rotational_inertia*state[4]) + (-pow(center_to_front, 2)*stiffness_front - pow(center_to_rear, 2)*stiffness_rear)*state[6]/(rotational_inertia*state[4])); out_7239966002367196486[54] = dt*(center_to_front*stiffness_front*(-state[2] - state[3] + state[7])/(rotational_inertia*state[1]) + (-center_to_front*stiffness_front + center_to_rear*stiffness_rear)*state[5]/(rotational_inertia*state[4]) + (-pow(center_to_front, 2)*stiffness_front - pow(center_to_rear, 2)*stiffness_rear)*state[6]/(rotational_inertia*state[4]));
out_4040592134712196686[55] = -center_to_front*dt*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(rotational_inertia*pow(state[1], 2)); out_7239966002367196486[55] = -center_to_front*dt*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(rotational_inertia*pow(state[1], 2));
out_4040592134712196686[56] = -center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]); out_7239966002367196486[56] = -center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]);
out_4040592134712196686[57] = -center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]); out_7239966002367196486[57] = -center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]);
out_4040592134712196686[58] = dt*(-(-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])*state[5]/(rotational_inertia*pow(state[4], 2)) - (-pow(center_to_front, 2)*stiffness_front*state[0] - pow(center_to_rear, 2)*stiffness_rear*state[0])*state[6]/(rotational_inertia*pow(state[4], 2))); out_7239966002367196486[58] = dt*(-(-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])*state[5]/(rotational_inertia*pow(state[4], 2)) - (-pow(center_to_front, 2)*stiffness_front*state[0] - pow(center_to_rear, 2)*stiffness_rear*state[0])*state[6]/(rotational_inertia*pow(state[4], 2)));
out_4040592134712196686[59] = dt*(-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(rotational_inertia*state[4]); out_7239966002367196486[59] = dt*(-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(rotational_inertia*state[4]);
out_4040592134712196686[60] = dt*(-pow(center_to_front, 2)*stiffness_front*state[0] - pow(center_to_rear, 2)*stiffness_rear*state[0])/(rotational_inertia*state[4]) + 1; out_7239966002367196486[60] = dt*(-pow(center_to_front, 2)*stiffness_front*state[0] - pow(center_to_rear, 2)*stiffness_rear*state[0])/(rotational_inertia*state[4]) + 1;
out_4040592134712196686[61] = center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]); out_7239966002367196486[61] = center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]);
out_4040592134712196686[62] = 0; out_7239966002367196486[62] = 0;
out_4040592134712196686[63] = 0; out_7239966002367196486[63] = 0;
out_4040592134712196686[64] = 0; out_7239966002367196486[64] = 0;
out_4040592134712196686[65] = 0; out_7239966002367196486[65] = 0;
out_4040592134712196686[66] = 0; out_7239966002367196486[66] = 0;
out_4040592134712196686[67] = 0; out_7239966002367196486[67] = 0;
out_4040592134712196686[68] = 0; out_7239966002367196486[68] = 0;
out_4040592134712196686[69] = 0; out_7239966002367196486[69] = 0;
out_4040592134712196686[70] = 1; out_7239966002367196486[70] = 1;
out_4040592134712196686[71] = 0; out_7239966002367196486[71] = 0;
out_4040592134712196686[72] = 0; out_7239966002367196486[72] = 0;
out_4040592134712196686[73] = 0; out_7239966002367196486[73] = 0;
out_4040592134712196686[74] = 0; out_7239966002367196486[74] = 0;
out_4040592134712196686[75] = 0; out_7239966002367196486[75] = 0;
out_4040592134712196686[76] = 0; out_7239966002367196486[76] = 0;
out_4040592134712196686[77] = 0; out_7239966002367196486[77] = 0;
out_4040592134712196686[78] = 0; out_7239966002367196486[78] = 0;
out_4040592134712196686[79] = 0; out_7239966002367196486[79] = 0;
out_4040592134712196686[80] = 1; out_7239966002367196486[80] = 1;
} }
void h_25(double *state, double *unused, double *out_1319061140791389331) { void h_25(double *state, double *unused, double *out_4414103654617947245) {
out_1319061140791389331[0] = state[6]; out_4414103654617947245[0] = state[6];
} }
void H_25(double *state, double *unused, double *out_7793576592585487069) { void H_25(double *state, double *unused, double *out_1365985619853648806) {
out_7793576592585487069[0] = 0; out_1365985619853648806[0] = 0;
out_7793576592585487069[1] = 0; out_1365985619853648806[1] = 0;
out_7793576592585487069[2] = 0; out_1365985619853648806[2] = 0;
out_7793576592585487069[3] = 0; out_1365985619853648806[3] = 0;
out_7793576592585487069[4] = 0; out_1365985619853648806[4] = 0;
out_7793576592585487069[5] = 0; out_1365985619853648806[5] = 0;
out_7793576592585487069[6] = 1; out_1365985619853648806[6] = 1;
out_7793576592585487069[7] = 0; out_1365985619853648806[7] = 0;
out_7793576592585487069[8] = 0; out_1365985619853648806[8] = 0;
} }
void h_24(double *state, double *unused, double *out_3718149663781647640) { void h_24(double *state, double *unused, double *out_218399050948173848) {
out_3718149663781647640[0] = state[4]; out_218399050948173848[0] = state[4];
out_3718149663781647640[1] = state[5]; out_218399050948173848[1] = state[5];
} }
void H_24(double *state, double *unused, double *out_7095241882321741411) { void H_24(double *state, double *unused, double *out_8020191077961834563) {
out_7095241882321741411[0] = 0; out_8020191077961834563[0] = 0;
out_7095241882321741411[1] = 0; out_8020191077961834563[1] = 0;
out_7095241882321741411[2] = 0; out_8020191077961834563[2] = 0;
out_7095241882321741411[3] = 0; out_8020191077961834563[3] = 0;
out_7095241882321741411[4] = 1; out_8020191077961834563[4] = 1;
out_7095241882321741411[5] = 0; out_8020191077961834563[5] = 0;
out_7095241882321741411[6] = 0; out_8020191077961834563[6] = 0;
out_7095241882321741411[7] = 0; out_8020191077961834563[7] = 0;
out_7095241882321741411[8] = 0; out_8020191077961834563[8] = 0;
out_7095241882321741411[9] = 0; out_8020191077961834563[9] = 0;
out_7095241882321741411[10] = 0; out_8020191077961834563[10] = 0;
out_7095241882321741411[11] = 0; out_8020191077961834563[11] = 0;
out_7095241882321741411[12] = 0; out_8020191077961834563[12] = 0;
out_7095241882321741411[13] = 0; out_8020191077961834563[13] = 0;
out_7095241882321741411[14] = 1; out_8020191077961834563[14] = 1;
out_7095241882321741411[15] = 0; out_8020191077961834563[15] = 0;
out_7095241882321741411[16] = 0; out_8020191077961834563[16] = 0;
out_7095241882321741411[17] = 0; out_8020191077961834563[17] = 0;
} }
void h_30(double *state, double *unused, double *out_1043867078506883442) { void h_30(double *state, double *unused, double *out_7444812492615309208) {
out_1043867078506883442[0] = state[4]; out_7444812492615309208[0] = state[4];
} }
void H_30(double *state, double *unused, double *out_3736477139632447792) { void H_30(double *state, double *unused, double *out_1236646672710408736) {
out_3736477139632447792[0] = 0; out_1236646672710408736[0] = 0;
out_3736477139632447792[1] = 0; out_1236646672710408736[1] = 0;
out_3736477139632447792[2] = 0; out_1236646672710408736[2] = 0;
out_3736477139632447792[3] = 0; out_1236646672710408736[3] = 0;
out_3736477139632447792[4] = 1; out_1236646672710408736[4] = 1;
out_3736477139632447792[5] = 0; out_1236646672710408736[5] = 0;
out_3736477139632447792[6] = 0; out_1236646672710408736[6] = 0;
out_3736477139632447792[7] = 0; out_1236646672710408736[7] = 0;
out_3736477139632447792[8] = 0; out_1236646672710408736[8] = 0;
} }
void h_26(double *state, double *unused, double *out_6922152566065598530) { void h_26(double *state, double *unused, double *out_442049788822243429) {
out_6922152566065598530[0] = state[7]; out_442049788822243429[0] = state[7];
} }
void H_26(double *state, double *unused, double *out_4052073273711430845) { void H_26(double *state, double *unused, double *out_2375517699020407418) {
out_4052073273711430845[0] = 0; out_2375517699020407418[0] = 0;
out_4052073273711430845[1] = 0; out_2375517699020407418[1] = 0;
out_4052073273711430845[2] = 0; out_2375517699020407418[2] = 0;
out_4052073273711430845[3] = 0; out_2375517699020407418[3] = 0;
out_4052073273711430845[4] = 0; out_2375517699020407418[4] = 0;
out_4052073273711430845[5] = 0; out_2375517699020407418[5] = 0;
out_4052073273711430845[6] = 0; out_2375517699020407418[6] = 0;
out_4052073273711430845[7] = 1; out_2375517699020407418[7] = 1;
out_4052073273711430845[8] = 0; out_2375517699020407418[8] = 0;
} }
void h_27(double *state, double *unused, double *out_7701482271649087111) { void h_27(double *state, double *unused, double *out_3470593801716284810) {
out_7701482271649087111[0] = state[3]; out_3470593801716284810[0] = state[3];
} }
void H_27(double *state, double *unused, double *out_5911240451432872703) { void H_27(double *state, double *unused, double *out_938116639090016175) {
out_5911240451432872703[0] = 0; out_938116639090016175[0] = 0;
out_5911240451432872703[1] = 0; out_938116639090016175[1] = 0;
out_5911240451432872703[2] = 0; out_938116639090016175[2] = 0;
out_5911240451432872703[3] = 1; out_938116639090016175[3] = 1;
out_5911240451432872703[4] = 0; out_938116639090016175[4] = 0;
out_5911240451432872703[5] = 0; out_938116639090016175[5] = 0;
out_5911240451432872703[6] = 0; out_938116639090016175[6] = 0;
out_5911240451432872703[7] = 0; out_938116639090016175[7] = 0;
out_5911240451432872703[8] = 0; out_938116639090016175[8] = 0;
} }
void h_29(double *state, double *unused, double *out_7544295603297957966) { void h_29(double *state, double *unused, double *out_7965145529649909723) {
out_7544295603297957966[0] = state[1]; out_7965145529649909723[0] = state[1];
} }
void H_29(double *state, double *unused, double *out_3226245795318055608) { void H_29(double *state, double *unused, double *out_1746878017024800920) {
out_3226245795318055608[0] = 0; out_1746878017024800920[0] = 0;
out_3226245795318055608[1] = 1; out_1746878017024800920[1] = 1;
out_3226245795318055608[2] = 0; out_1746878017024800920[2] = 0;
out_3226245795318055608[3] = 0; out_1746878017024800920[3] = 0;
out_3226245795318055608[4] = 0; out_1746878017024800920[4] = 0;
out_3226245795318055608[5] = 0; out_1746878017024800920[5] = 0;
out_3226245795318055608[6] = 0; out_1746878017024800920[6] = 0;
out_3226245795318055608[7] = 0; out_1746878017024800920[7] = 0;
out_3226245795318055608[8] = 0; out_1746878017024800920[8] = 0;
} }
void h_28(double *state, double *unused, double *out_3095916628749130163) { void h_28(double *state, double *unused, double *out_5501663824664413576) {
out_3095916628749130163[0] = state[0]; out_5501663824664413576[0] = state[0];
} }
void H_28(double *state, double *unused, double *out_8308644812387586182) { void H_28(double *state, double *unused, double *out_3335521000044729654) {
out_8308644812387586182[0] = 1; out_3335521000044729654[0] = 1;
out_8308644812387586182[1] = 0; out_3335521000044729654[1] = 0;
out_8308644812387586182[2] = 0; out_3335521000044729654[2] = 0;
out_8308644812387586182[3] = 0; out_3335521000044729654[3] = 0;
out_8308644812387586182[4] = 0; out_3335521000044729654[4] = 0;
out_8308644812387586182[5] = 0; out_3335521000044729654[5] = 0;
out_8308644812387586182[6] = 0; out_3335521000044729654[6] = 0;
out_8308644812387586182[7] = 0; out_3335521000044729654[7] = 0;
out_8308644812387586182[8] = 0; out_3335521000044729654[8] = 0;
} }
void h_31(double *state, double *unused, double *out_4956510669045411681) { void h_31(double *state, double *unused, double *out_5392762942373062487) {
out_4956510669045411681[0] = state[8]; out_5392762942373062487[0] = state[8];
} }
void H_31(double *state, double *unused, double *out_7824222554462447497) { void H_31(double *state, double *unused, double *out_1396631581730609234) {
out_7824222554462447497[0] = 0; out_1396631581730609234[0] = 0;
out_7824222554462447497[1] = 0; out_1396631581730609234[1] = 0;
out_7824222554462447497[2] = 0; out_1396631581730609234[2] = 0;
out_7824222554462447497[3] = 0; out_1396631581730609234[3] = 0;
out_7824222554462447497[4] = 0; out_1396631581730609234[4] = 0;
out_7824222554462447497[5] = 0; out_1396631581730609234[5] = 0;
out_7824222554462447497[6] = 0; out_1396631581730609234[6] = 0;
out_7824222554462447497[7] = 0; out_1396631581730609234[7] = 0;
out_7824222554462447497[8] = 1; out_1396631581730609234[8] = 1;
} }
#include <eigen3/Eigen/Dense> #include <eigen3/Eigen/Dense>
#include <iostream> #include <iostream>
@@ -518,68 +518,68 @@ void car_update_28(double *in_x, double *in_P, double *in_z, double *in_R, doubl
void car_update_31(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) { void car_update_31(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) {
update<1, 3, 0>(in_x, in_P, h_31, H_31, NULL, in_z, in_R, in_ea, MAHA_THRESH_31); update<1, 3, 0>(in_x, in_P, h_31, H_31, NULL, in_z, in_R, in_ea, MAHA_THRESH_31);
} }
void car_err_fun(double *nom_x, double *delta_x, double *out_5662147043452870344) { void car_err_fun(double *nom_x, double *delta_x, double *out_2366717911037962719) {
err_fun(nom_x, delta_x, out_5662147043452870344); err_fun(nom_x, delta_x, out_2366717911037962719);
} }
void car_inv_err_fun(double *nom_x, double *true_x, double *out_2016113788005242335) { void car_inv_err_fun(double *nom_x, double *true_x, double *out_70336108065318295) {
inv_err_fun(nom_x, true_x, out_2016113788005242335); inv_err_fun(nom_x, true_x, out_70336108065318295);
} }
void car_H_mod_fun(double *state, double *out_8997301641043644665) { void car_H_mod_fun(double *state, double *out_281700328218384173) {
H_mod_fun(state, out_8997301641043644665); H_mod_fun(state, out_281700328218384173);
} }
void car_f_fun(double *state, double dt, double *out_2973469614408186678) { void car_f_fun(double *state, double dt, double *out_3945758947465398650) {
f_fun(state, dt, out_2973469614408186678); f_fun(state, dt, out_3945758947465398650);
} }
void car_F_fun(double *state, double dt, double *out_4040592134712196686) { void car_F_fun(double *state, double dt, double *out_7239966002367196486) {
F_fun(state, dt, out_4040592134712196686); F_fun(state, dt, out_7239966002367196486);
} }
void car_h_25(double *state, double *unused, double *out_1319061140791389331) { void car_h_25(double *state, double *unused, double *out_4414103654617947245) {
h_25(state, unused, out_1319061140791389331); h_25(state, unused, out_4414103654617947245);
} }
void car_H_25(double *state, double *unused, double *out_7793576592585487069) { void car_H_25(double *state, double *unused, double *out_1365985619853648806) {
H_25(state, unused, out_7793576592585487069); H_25(state, unused, out_1365985619853648806);
} }
void car_h_24(double *state, double *unused, double *out_3718149663781647640) { void car_h_24(double *state, double *unused, double *out_218399050948173848) {
h_24(state, unused, out_3718149663781647640); h_24(state, unused, out_218399050948173848);
} }
void car_H_24(double *state, double *unused, double *out_7095241882321741411) { void car_H_24(double *state, double *unused, double *out_8020191077961834563) {
H_24(state, unused, out_7095241882321741411); H_24(state, unused, out_8020191077961834563);
} }
void car_h_30(double *state, double *unused, double *out_1043867078506883442) { void car_h_30(double *state, double *unused, double *out_7444812492615309208) {
h_30(state, unused, out_1043867078506883442); h_30(state, unused, out_7444812492615309208);
} }
void car_H_30(double *state, double *unused, double *out_3736477139632447792) { void car_H_30(double *state, double *unused, double *out_1236646672710408736) {
H_30(state, unused, out_3736477139632447792); H_30(state, unused, out_1236646672710408736);
} }
void car_h_26(double *state, double *unused, double *out_6922152566065598530) { void car_h_26(double *state, double *unused, double *out_442049788822243429) {
h_26(state, unused, out_6922152566065598530); h_26(state, unused, out_442049788822243429);
} }
void car_H_26(double *state, double *unused, double *out_4052073273711430845) { void car_H_26(double *state, double *unused, double *out_2375517699020407418) {
H_26(state, unused, out_4052073273711430845); H_26(state, unused, out_2375517699020407418);
} }
void car_h_27(double *state, double *unused, double *out_7701482271649087111) { void car_h_27(double *state, double *unused, double *out_3470593801716284810) {
h_27(state, unused, out_7701482271649087111); h_27(state, unused, out_3470593801716284810);
} }
void car_H_27(double *state, double *unused, double *out_5911240451432872703) { void car_H_27(double *state, double *unused, double *out_938116639090016175) {
H_27(state, unused, out_5911240451432872703); H_27(state, unused, out_938116639090016175);
} }
void car_h_29(double *state, double *unused, double *out_7544295603297957966) { void car_h_29(double *state, double *unused, double *out_7965145529649909723) {
h_29(state, unused, out_7544295603297957966); h_29(state, unused, out_7965145529649909723);
} }
void car_H_29(double *state, double *unused, double *out_3226245795318055608) { void car_H_29(double *state, double *unused, double *out_1746878017024800920) {
H_29(state, unused, out_3226245795318055608); H_29(state, unused, out_1746878017024800920);
} }
void car_h_28(double *state, double *unused, double *out_3095916628749130163) { void car_h_28(double *state, double *unused, double *out_5501663824664413576) {
h_28(state, unused, out_3095916628749130163); h_28(state, unused, out_5501663824664413576);
} }
void car_H_28(double *state, double *unused, double *out_8308644812387586182) { void car_H_28(double *state, double *unused, double *out_3335521000044729654) {
H_28(state, unused, out_8308644812387586182); H_28(state, unused, out_3335521000044729654);
} }
void car_h_31(double *state, double *unused, double *out_4956510669045411681) { void car_h_31(double *state, double *unused, double *out_5392762942373062487) {
h_31(state, unused, out_4956510669045411681); h_31(state, unused, out_5392762942373062487);
} }
void car_H_31(double *state, double *unused, double *out_7824222554462447497) { void car_H_31(double *state, double *unused, double *out_1396631581730609234) {
H_31(state, unused, out_7824222554462447497); H_31(state, unused, out_1396631581730609234);
} }
void car_predict(double *in_x, double *in_P, double *in_Q, double dt) { void car_predict(double *in_x, double *in_P, double *in_Q, double dt) {
predict(in_x, in_P, in_Q, dt); predict(in_x, in_P, in_Q, dt);
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.
+3 -12
View File
@@ -179,7 +179,6 @@ class Soundd:
self.update_alert(AudibleAlert.fart) self.update_alert(AudibleAlert.fart)
else: else:
self.update_alert(AudibleAlert.prompt) self.update_alert(AudibleAlert.prompt)
self.openpilot_crashed_played = True self.openpilot_crashed_played = True
elif sm.updated['controlsState']: elif sm.updated['controlsState']:
new_alert = sm['controlsState'].alertSound.raw new_alert = sm['controlsState'].alertSound.raw
@@ -216,28 +215,22 @@ class Soundd:
sm.update(0) sm.update(0)
if sm.updated['microphone'] and self.current_alert == AudibleAlert.none: # only update volume filter when not playing alert if sm.updated['microphone'] and self.current_alert == AudibleAlert.none: # only update volume filter when not playing alert
self.spl_filter_weighted.update(sm["microphone"].soundPressureWeightedDb)
if self.frogpilot_toggles.alert_volume_control: if self.frogpilot_toggles.alert_volume_control:
self.spl_filter_weighted.update(sm["microphone"].soundPressureWeightedDb)
self.auto_volume = self.calculate_volume(float(self.spl_filter_weighted.x)) self.auto_volume = self.calculate_volume(float(self.spl_filter_weighted.x))
self.current_volume = 0.0 self.current_volume = 0.0
else: else:
self.spl_filter_weighted.update(sm["microphone"].soundPressureWeightedDb)
self.current_volume = self.calculate_volume(float(self.spl_filter_weighted.x)) self.current_volume = self.calculate_volume(float(self.spl_filter_weighted.x))
elif self.frogpilot_toggles.alert_volume_control and self.current_alert in self.volume_map: elif self.frogpilot_toggles.alert_volume_control and self.current_alert in self.volume_map:
self.current_volume = self.volume_map[self.current_alert] / 100.0 self.current_volume = self.volume_map[self.current_alert] / 100.0
if self.current_volume == 1.01: if self.current_volume == 1.01:
if self.current_alert == AudibleAlert.startup: self.current_volume = self.auto_volume
self.current_volume = MAX_VOLUME
else:
self.current_volume = self.auto_volume
elif self.current_alert in self.random_events_map: elif self.current_alert in self.random_events_map:
self.current_volume = self.random_events_map[self.current_alert] self.current_volume = self.random_events_map[self.current_alert]
elif self.current_alert == AudibleAlert.startup:
self.current_volume = MAX_VOLUME
self.get_audible_alert(sm) self.get_audible_alert(sm)
rk.keep_time() rk.keep_time()
@@ -247,7 +240,6 @@ class Soundd:
# Update FrogPilot parameters # Update FrogPilot parameters
if sm['frogpilotPlan'].togglesUpdated: if sm['frogpilotPlan'].togglesUpdated:
self.frogpilot_toggles = get_frogpilot_toggles() self.frogpilot_toggles = get_frogpilot_toggles()
self.update_frogpilot_sounds() self.update_frogpilot_sounds()
if self.restart_stream: if self.restart_stream:
@@ -271,7 +263,6 @@ class Soundd:
AudibleAlert.warningImmediate: self.frogpilot_toggles.warningImmediate_volume, AudibleAlert.warningImmediate: self.frogpilot_toggles.warningImmediate_volume,
AudibleAlert.goat: self.frogpilot_toggles.prompt_volume, AudibleAlert.goat: self.frogpilot_toggles.prompt_volume,
AudibleAlert.startup: self.frogpilot_toggles.engage_volume,
} }
if self.frogpilot_toggles.sound_pack != "stock": if self.frogpilot_toggles.sound_pack != "stock":
+1 -1
View File
@@ -93,7 +93,7 @@ def register(show_spinner=False, register_konik=False) -> str | None:
if show_spinner: if show_spinner:
spinner.close() spinner.close()
if not register_konik and dongle_id != params.get("KonikDongleId", encoding="utf8"): if dongle_id and not register_konik:
params.put("DongleId", dongle_id) params.put("DongleId", dongle_id)
params.put("StockDongleId", dongle_id) params.put("StockDongleId", dongle_id)
set_offroad_alert("Offroad_UnofficialHardware", (dongle_id == UNREGISTERED_DONGLE_ID) and not PC) set_offroad_alert("Offroad_UnofficialHardware", (dongle_id == UNREGISTERED_DONGLE_ID) and not PC)
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 B

After

Width:  |  Height:  |  Size: 402 KiB

+11 -6
View File
@@ -1,13 +1,18 @@
[ [
{ {
"name": "boot", "name": "boot",
"url": "https://boot.frogpilot.download", "url": "https://www.dropbox.com/scl/fi/z8gcamb7n78xqb515kfgq/boot.img.xz?rlkey=r2zxothb3pz0q9rtqysr1zhwv&st=f0acze3w&dl=1",
"hash": "b997aae3f1c93de82449ef7f23f30ff482b0978f3d0ac08219366f9ce362ad7a", "hash": "b997aae3f1c93de82449ef7f23f30ff482b0978f3d0ac08219366f9ce362ad7a",
"hash_raw": "b997aae3f1c93de82449ef7f23f30ff482b0978f3d0ac08219366f9ce362ad7a", "hash_raw": "b997aae3f1c93de82449ef7f23f30ff482b0978f3d0ac08219366f9ce362ad7a",
"size": 16029696, "size": 16029696,
"sparse": false, "sparse": false,
"full_check": true, "full_check": true,
"has_ab": true "has_ab": true,
"alt": {
"hash": "5674ea6767e7198cf1e7def3de66a57061f001ed76d43dc4b4f84de545c53c6f",
"url": "https://commadist.azureedge.net/agnosupdate/boot-5674ea6767e7198cf1e7def3de66a57061f001ed76d43dc4b4f84de545c53c6f.img.xz",
"size": 16029696
}
}, },
{ {
"name": "abl", "name": "abl",
@@ -61,7 +66,7 @@
}, },
{ {
"name": "system", "name": "system",
"url": "https://system.frogpilot.download", "url": "https://www.dropbox.com/scl/fi/n22f3eex1z52dbrhhxqry/system.img.xz?rlkey=yw4ult7s3sdm6b7d31hrm3zx8&st=of6m7zis&dl=1",
"hash": "be1c6bb9ee5e06779087b1b81e09b6df61d942566b0f8d4539c452179c661782", "hash": "be1c6bb9ee5e06779087b1b81e09b6df61d942566b0f8d4539c452179c661782",
"hash_raw": "a5f84e68d199466fda5c9aead760b90a4cd2d2ef9a418708b9794d95bb03ec5b", "hash_raw": "a5f84e68d199466fda5c9aead760b90a4cd2d2ef9a418708b9794d95bb03ec5b",
"size": 10737418240, "size": 10737418240,
@@ -69,9 +74,9 @@
"full_check": false, "full_check": false,
"has_ab": true, "has_ab": true,
"alt": { "alt": {
"hash": "bc11d2148f29862ee1326aca2af1cf6bbf5fed831e3f8f6b8f7a0f110dfe8d26", "hash": "328e90c62068222dfd98f71dd3f6251fcb962f082b49c6be66ab2699f5db6f4f",
"url": "https://commadist.azureedge.net/agnosupdate/system-skip-chunks-1badfe72851628d6cf9200a53a6151bb4e797b49c717141409fc57138eae388a.img.xz", "url": "https://commadist.azureedge.net/agnosupdate/system-1badfe72851628d6cf9200a53a6151bb4e797b49c717141409fc57138eae388a.img.xz",
"size": 4548070000 "size": 10737418240
} }
} }
] ]
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
View File
@@ -7,6 +7,7 @@ from pathlib import Path
from sentry_sdk.integrations.threading import ThreadingIntegration from sentry_sdk.integrations.threading import ThreadingIntegration
from openpilot.common.params import Params, ParamKeyType from openpilot.common.params import Params, ParamKeyType
from openpilot.system.athena.registration import is_registered_device
from openpilot.system.hardware import HARDWARE, PC from openpilot.system.hardware import HARDWARE, PC
from openpilot.common.swaglog import cloudlog from openpilot.common.swaglog import cloudlog
from openpilot.system.version import get_build_metadata, get_version from openpilot.system.version import get_build_metadata, get_version