Support loading resources from Fuel #1186
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
sdformat_urdf
supports the use of SDF files, and I'd like to utilize Fuel for resource hosting. With this PR, an SDF file can remain consistent when used between Gazebo and RViz. This will also give people the option of store meshes and models in a location other than a git repository.I think it makes sense to support this capability here, rather than modify SDF files to use absolute paths. A user may run rviz on a separate machine from Gazebo, and wouldn't necessarily be able to resolve an absolute path.
It does add an additional dependency on
gz-fuel_tools
. This is required to resolve urls likehttps://fuel.gazebosim.org/1.0/openrobotics/models/backpack
. If a resource is not in the local Fuel cache, then it's downloaded.I'm new to adding dependencies like this. Please let me know what I should do to fix or improve things.
Test
Here is a simple launch file that you can use for testing