From d2c42f4644632f41dd107ded72a57f9031206ed0 Mon Sep 17 00:00:00 2001 From: Luca Della Vedova Date: Fri, 3 Jan 2025 11:31:30 +0800 Subject: [PATCH] Fix author name checking, None exception and wrong path Signed-off-by: Luca Della Vedova --- .../building_map_model_downloader.py | 2 +- rmf_building_map_tools/pit_crew/pit_crew.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rmf_building_map_tools/building_map_model_downloader/building_map_model_downloader.py b/rmf_building_map_tools/building_map_model_downloader/building_map_model_downloader.py index 4d03c3e8..9547d743 100644 --- a/rmf_building_map_tools/building_map_model_downloader/building_map_model_downloader.py +++ b/rmf_building_map_tools/building_map_model_downloader/building_map_model_downloader.py @@ -97,7 +97,7 @@ def download_models( """Download models for a given input building yaml.""" # Construct model set - IGN_FUEL_MODEL_PATH = "~/.ignition/fuel/" + IGN_FUEL_MODEL_PATH = "~/.gz/fuel/" model_set = set() stringent_dict = {} # Dict to tighten download scope diff --git a/rmf_building_map_tools/pit_crew/pit_crew.py b/rmf_building_map_tools/pit_crew/pit_crew.py index 2b4dacd2..9c973917 100644 --- a/rmf_building_map_tools/pit_crew/pit_crew.py +++ b/rmf_building_map_tools/pit_crew/pit_crew.py @@ -225,7 +225,7 @@ def get_missing_models(model_names, model_path=None, " is not by the requested author %s!" % (model_name, author_name)) elif model_name in fuel_models and \ - fuel_models[model_name] == author_name: + author_name in fuel_models[model_name]: output['downloadable'].append((model_name_original, fuel_models[model_name])) @@ -680,8 +680,8 @@ def download_model_fuel_tools(model_name, author_name, if sync_names: sync_sdf(model_name=model_name.lower(), extract_path=extract_path) - export_path = os.path.expanduser(export_path) if export_path is not None: + export_path = os.path.expanduser(export_path) # Make directory if missing if not os.path.isdir(export_path): os.makedirs(export_path, exist_ok=True)