Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to using gzsim server url for fuel #454

Merged
merged 1 commit into from Dec 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 8 additions & 8 deletions rmf_building_map_tools/pit_crew/pit_crew.py
Expand Up @@ -23,7 +23,7 @@

See Also:
pit_crew is very much like a Gazebo supporting variant of:
https://github.com/ignitionrobotics/ign-fuel-tools
https://github.com/gazebosim/gz-fuel-tools

In other words, pit_crew is not related to ign-fuel-tools, but fills the
same feature-niche, except for Gazebo instead of Ignition Gazebo.
Expand Down Expand Up @@ -504,7 +504,7 @@ def download_model(model_name, author_name, version="tip",
"tip", which will download the latest model.
download_path (str, optional): The root directory for downloading
and unzipping the models into. Defaults to None. If None, function
will use "~/.ignition/fuel/fuel.ignitionrobotics.org" or
will use "~/.ignition/fuel/fuel.gazebosim.org" or
"~/.gazebo/models" depending on the state of the ign argument.
sync_names (bool, optional): Change downloaded model.sdf model name to
match folder name. Defaults to False.
Expand All @@ -523,7 +523,7 @@ def download_model(model_name, author_name, version="tip",
if download_path is None:
if ign:
download_path = os.path.expanduser(
"~/.ignition/fuel/fuel.ignitionrobotics.org"
"~/.ignition/fuel/fuel.gazebosim.org"
)
else:
download_path = os.path.expanduser("~/.gazebo/models")
Expand All @@ -538,7 +538,7 @@ def download_model(model_name, author_name, version="tip",
logger.warning("Download path does not exist! Created: %s"
% download_path)

url_base = "https://fuel.ignitionrobotics.org/1.0"
url_base = "https://fuel.gazebosim.org/1.0"
metadata = requests.get("%s/%s/models/%s/%s/%s"
% (url_base, author_name,
model_name, version, model_name))
Expand Down Expand Up @@ -626,11 +626,11 @@ def download_model_fuel_tools(model_name, author_name,
# Currently, ignition fuel download can only download to this folder.
# Fuel tools creates this folder if it does not yet exist
download_path = os.path.expanduser(
"~/.ignition/fuel/fuel.ignitionrobotics.org"
"~/.ignition/fuel/fuel.gazebosim.org"
)
# Command line
url_model_name = parse.quote(model_name)
full_url = ("https://fuel.ignitionrobotics.org/1.0" +
full_url = ("https://fuel.gazebosim.org/1.0" +
'/' + author_name + '/models' + '/' + url_model_name)
full_command = full_command = ("ign fuel download -u "
+ full_url + " -v 4")
Expand Down Expand Up @@ -828,14 +828,14 @@ def build_and_update_cache(cache_file_path=None, write_to_cache=True,
old_cache = {'model_cache': set(), 'fuel_cache': []}
logger.info("Cache not found! Rebuilding cache...")

url_base = "https://fuel.ignitionrobotics.org/1.0/models"
url_base = "https://fuel.gazebosim.org/1.0/models"
status = 200
break_flag = False
page = 1
new_cache_count = 0

logger.info("Topping up Fuel (updating cache) from:"
" https://fuel.ignitionrobotics.org/1.0/models")
" https://fuel.gazebosim.org/1.0/models")

# RFE: Doing this asynchronously will significantly speed this up.
# Any solution must guarantee:
Expand Down
2 changes: 1 addition & 1 deletion rmf_building_map_tools/pit_crew/usage_examples.py
Expand Up @@ -39,7 +39,7 @@
# And then look for models in our local model directory!
models = pit_crew.get_local_model_name_tuples(lower=False)

# Or your Ignition model directory!
# Or your Gazebosim model directory!
ign_models = pit_crew.get_local_model_name_tuples(lower=False, ign=True)

# Or you can use the model's folder name as its name!
Expand Down
2 changes: 1 addition & 1 deletion rmf_traffic_editor_assets/README.md
Expand Up @@ -21,4 +21,4 @@ git pull

## Artist Credits and Licenses

Credits and licenses for each individual asset's creator can be found by downloading the model that corresponds to the asset's name on [Ignition Fuel](https://app.ignitionrobotics.org/fuel)!
Credits and licenses for each individual asset's creator can be found by downloading the model that corresponds to the asset's name on [Gazebosim Fuel](https://app.gazebosim.org/fuel)!