-
Notifications
You must be signed in to change notification settings - Fork 21
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
Stop hardcoding absolute paths into downloaded models #77
Comments
The more I think about this, I think that any implementation of So I propose circling back to the proposals on this PR. Essentially:
Action items:
|
Closed too quickly 🙂 |
Tutorial recommending the use of relative paths: gazebosim/gz-sim#400 |
Follow up on #194 Closing this one! |
When
ign-fuel-tools
finds amodel://
within a file that it's downloading, it replaces that with the full path on disk where the file is being downloaded to. This is done by the LocalCachePrivate::FixPaths* functions.This is undesirable because it makes those models no longer be relocatable after they've been downloaded.
Moreover, in general, modifying a resource while downloading it makes for poor user experience, because the user is expecting to get the resource as it is on the server. Downloading a resource from the web UI or making direct REST calls to the server doesn't modify resources, and users are using these to circumvent this behaviour (among others) (pit_crew, untouched).
There is a reason for the current behaviour though. Initially Ignition Gazebo didn't support
model://
URIs. And even now that it's about to support them as first-class citizens (gazebosim/gz-sim#172), that doesn't map well to models in the Fuel cache, because:<model name>/version/model.sdf
, doesn't match the<model name>/model.sdf
pattern used with the environment variable.Possible ways forward
Relative paths
Modify all models in Fuel that are using
model://
to use relative paths instead.Problems with this approach:
model://
though (actually anyscheme://
), so users may upload that and it has to work without overwriting.Fuel cache + model://
Make it possible to find a resource on the cache, such as:
~/.ignition/fuel/fuel.ignitionrobotics.org/OpenRobotics/models/Post\ office/2/meshes/post_office.dae
from
model://Post office/meshes/post_office.dae
The main challenge is, what if multiple owners have models named
Post office
, which one do we get?The text was updated successfully, but these errors were encountered: