Closed diegoferigo closed 3 years ago
Which version of SDF is used? The latest one supported by the underlying sdformat libraries?
Which version of SDF is used? The latest one supported by the underlying sdformat libraries?
The conversion uses the public helper functions of scenario
, therefore the sdformat version depends on which Ignition distribution is supported. In this moment, sdformat10 for the stable 1.2.2 release (master branch, Dome), and sdformat11 for the pre-releases (devel branch, Edifice). Both convert by default to SDFormat 1.8.
Disclaimer: I just tried the pre-releases of scenario
, however what I wrote above should be correct also for the stable release.
Renamed type
argument to resource_type
in force push since I always forget that type
is a builtin.
If the resource type is *_PATH, the caller is responsible to delete the temp file.
Sorry, I had missed this part. Do you think it make sense to place this somewhere in the method docs? If it is just in the PR, it will be lost in the sands of time.
I am planning to give a refresh to both README and setup.py in a new PR. Regardless, I think it's worth adding a Note in the docstring :)
Done in 7d79271.
This repository contains a mixed collection of SDF and URDF models. Until now, we offered the following two functions to get the resources:
https://github.com/robotology/gym-ignition-models/blob/9d3dafe0a7b75ef8af041c6974a2b6f1c1e36f58/gym_ignition_models/__init__.py#L35
https://github.com/robotology/gym-ignition-models/blob/9d3dafe0a7b75ef8af041c6974a2b6f1c1e36f58/gym_ignition_models/__init__.py#L67
This PR adds a new
get_model_resource
function that allows specifying the desired resource type.It implements the current logic:
scenario
is installed.*_FILE
, the temp file is automatically deleted when it goes out of scope.*_PATH
, the caller is responsible to delete the temp file.