Smoother braking behind lead

Added toggle to smooth out the braking behavior when approaching a slower lead vehicle.
This commit is contained in:
FrogAi
2024-01-12 22:39:30 -07:00
parent ce3caf5a11
commit 830077af74
5 changed files with 12 additions and 3 deletions

View File

@@ -155,6 +155,7 @@ class FrogPilotPlanner:
self.acceleration_profile = params.get_int("AccelerationProfile") if longitudinal_tune else 0
self.aggressive_acceleration = params.get_bool("AggressiveAcceleration") and longitudinal_tune
self.increased_stopping_distance = params.get_int("StoppingDistance") * (1 if self.is_metric else CV.FOOT_TO_METER) if longitudinal_tune else 0
self.smoother_braking = params.get_bool("SmoothBraking") and longitudinal_tune
self.map_turn_speed_controller = params.get_bool("MTSCEnabled")

View File

@@ -31,6 +31,7 @@ FrogPilotControlsPanel::FrogPilotControlsPanel(SettingsWindow *parent) : FrogPil
{"AccelerationProfile", "Acceleration Profile", "Change the acceleration rate to be either sporty or eco-friendly.", ""},
{"AggressiveAcceleration", "Aggressive Acceleration With Lead", "Increase acceleration aggressiveness when following a lead vehicle from a stop.", ""},
{"StoppingDistance", "Increased Stopping Distance", "Increase the stopping distance for a more comfortable stop.", ""},
{"SmoothBraking", "Smoother Braking Behind Lead", "Smoothen out the braking behavior when approaching slower vehicles.", ""},
{"Model", "Model Selector", "Choose your preferred openpilot model.", "../assets/offroad/icon_calibration.png"},
{"MTSCEnabled", "Map Turn Speed Control", "Slow down for anticipated curves detected by your downloaded maps.", "../frogpilot/assets/toggle_icons/icon_speed_map.png"},
@@ -259,7 +260,7 @@ FrogPilotControlsPanel::FrogPilotControlsPanel(SettingsWindow *parent) : FrogPil
fireTheBabysitterKeys = {"NoLogging", "MuteDM", "MuteDoor", "MuteOverheated", "MuteSeatbelt"};
laneChangeKeys = {"LaneChangeTime", "LaneDetection", "OneLaneChange", "PauseLateralOnSignal"};
lateralTuneKeys = {"AverageCurvature", "NNFF"};
longitudinalTuneKeys = {"AccelerationProfile", "AggressiveAcceleration", "StoppingDistance"};
longitudinalTuneKeys = {"AccelerationProfile", "AggressiveAcceleration", "SmoothBraking", "StoppingDistance"};
speedLimitControllerKeys = {};
visionTurnControlKeys = {};