Closed diegoferigo closed 1 year ago
From what I understand, the env variable used to expand the model://
or similar URIs are:
GAZEBO_MODEL_PATH
for Gazebo ClassicIGN_GAZEBO_RESOURCE_PATH
for Ignition Gazebo <= 7GZ_SIM_RESOURCE_PATH
for Gazebo Sim >= 7 While we may not want to support the legacy GAZEBO_MODEL_PATH
, perhaps we can already start using also the new GZ_SIM_RESOURCE_PATH
?
While we may not want to support the legacy
GAZEBO_MODEL_PATH
, perhaps we can already start using also the newGZ_SIM_RESOURCE_PATH
?
This is why this PR just partially resolves #8 :laughing: Yep for the moment I can extend the search also to all three variables (I don't see why we should not support Gazebo Classic since it's effortless).
However, there's more than that, like SDF_PATH
(see here), fuel URIs, etc. Thanks for opening an issue upstream, having a more extensive documentation of all the supported URIs might be useful. Most of the information is there, but I remember in the past it happened that I had to dig into the code to check specific details of environment details.
Then, there are Fuel links. Furthermore, I've seen in the past both model://
and file://
. Again, I'm not 100% confident I have right now all the information for a complete implementation of URI support. I commented in #8 as a reminder and for the time being I only add what you suggested.
Done in b3ef67b.
This is an initial implementation of resolving local URIs of the form e.g.
<something>://dir/file.stl
where<something>
is part ofIGN_GAZEBO_RESOURCE_PATH
.After parsing a URDF/SDF model, calling
Model.resolve_uris()
will replace all the URIs with the real path to the local file.Partially resolves #8.