Skip to content

Commit

Permalink
October 21st, 2024 Patch
Browse files Browse the repository at this point in the history
  • Loading branch information
FrogAi committed Oct 21, 2024
1 parent 108b3e2 commit 59dbd6d
Show file tree
Hide file tree
Showing 53 changed files with 509 additions and 487 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ FrogPilot is a fully open-sourced fork of openpilot, featuring clear and concise
------
FrogPilot was last updated on:

**October 15th, 2024**
**October 21st, 2024**

Features
------
Expand Down
16 changes: 7 additions & 9 deletions cereal/car.capnp
Original file line number Diff line number Diff line change
Expand Up @@ -442,20 +442,18 @@ struct CarControl {
promptRepeat @7;
promptDistracted @8;

# Random Events
# FrogPilot sounds
angry @9;
dejaVu @10;
doc @11;
fart @12;
firefox @13;
hal9000 @14;
mail @15;
nessie @16;
noice @17;
uwu @18;

# Other
goat @19;
goat @14;
hal9000 @15;
mail @16;
nessie @17;
noice @18;
uwu @19;
}
}

Expand Down
2 changes: 1 addition & 1 deletion common/params.cc
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,7 @@ std::unordered_map<std::string, uint32_t> keys = {
{"RelaxedJerkSpeed", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_CONTROLS},
{"RelaxedJerkSpeedDecrease", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_CONTROLS},
{"RelaxedPersonalityProfile", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_CONTROLS},
{"ResetFrogTheme", PERSISTENT},
{"ReverseCruise", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_CONTROLS},
{"RoadEdgesWidth", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_VISUALS},
{"RoadName", PERSISTENT},
Expand Down Expand Up @@ -502,7 +503,6 @@ std::unordered_map<std::string, uint32_t> keys = {
{"SidebarMetrics", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_VISUALS},
{"SignalMetrics", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_VISUALS},
{"SignalToDownload", PERSISTENT},
{"SLCConfirmation", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_CONTROLS},
{"SLCConfirmationHigher", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_CONTROLS},
{"SLCConfirmationLower", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_CONTROLS},
{"SLCConfirmed", PERSISTENT},
Expand Down
2 changes: 1 addition & 1 deletion selfdrive/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ SConscript(['controls/lib/longitudinal_mpc_lib/SConscript'])
SConscript(['locationd/SConscript'])
SConscript(['navd/SConscript'])
SConscript(['modeld/SConscript'])
SConscript(['ui/SConscript'])
SConscript(['ui/SConscript'])
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
23 changes: 6 additions & 17 deletions selfdrive/frogpilot/assets/model_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,11 @@ def are_all_models_downloaded(self, available_models, available_model_names, rep
elif not verify_result:
print(f"Model {model} is outdated. Re-downloading...")
delete_file(model_path)
self.remove_model_params(available_model_names, available_models, model)
download_queue.append(model)
all_models_downloaded = False
else:
if automatically_update_models:
print(f"Model {model} isn't downloaded. Downloading...")
self.remove_model_params(available_model_names, available_models, model)
download_queue.append(model)
all_models_downloaded = False

Expand All @@ -137,15 +135,6 @@ def are_all_models_downloaded(self, available_models, available_model_names, rep

return all_models_downloaded

def remove_model_params(self, available_model_names, available_models, model):
part_model_param = process_model_name(available_model_names[available_models.index(model)])
try:
self.params.check_key(part_model_param + "CalibrationParams")
except UnknownKeyName:
return
self.params.remove(part_model_param + "CalibrationParams")
self.params.remove(part_model_param + "LiveTorqueParameters")

def queue_model_download(self, model, model_name=None):
while self.params_memory.get(self.download_param, encoding='utf-8'):
time.sleep(1)
Expand Down Expand Up @@ -184,7 +173,7 @@ def copy_default_model(self):
default_model_path = os.path.join(MODELS_PATH, f"{DEFAULT_MODEL}.thneed")
source_path = os.path.join(BASEDIR, "selfdrive", "classic_modeld", "models", "supercombo.thneed")

if os.path.isfile(source_path):
if os.path.isfile(source_path) and not os.path.isfile(default_model_path):
shutil.copyfile(source_path, default_model_path)
print(f"Copied default model from {source_path} to {default_model_path}")
else:
Expand All @@ -193,7 +182,7 @@ def copy_default_model(self):
sgo_model_path = os.path.join(MODELS_PATH, "secret-good-openpilot.thneed")
source_path = os.path.join(BASEDIR, "selfdrive", "modeld", "models", "supercombo.thneed")

if os.path.isfile(source_path):
if os.path.isfile(source_path) and not os.path.isfile(sgo_model_path):
shutil.copyfile(source_path, sgo_model_path)
print(f"Copied 'secret-good-openpilot' model from {source_path} to {sgo_model_path}")
else:
Expand All @@ -208,12 +197,12 @@ def update_models(self, boot_run=False):
print("GitHub and GitLab are offline...")
return

model_info = self.fetch_models(f"{repo_url}Versions/model_names_{VERSION}.json")
if model_info:
self.update_model_params(model_info, repo_url)

if boot_run:
self.validate_models()
else:
model_info = self.fetch_models(f"{repo_url}Versions/model_names_{VERSION}.json")
if model_info:
self.update_model_params(model_info, repo_url)

def download_all_models(self):
repo_url = get_repository_url()
Expand Down
Loading

0 comments on commit 59dbd6d

Please sign in to comment.