skbot.ignition.get_fuel_model_info

skbot.ignition.get_fuel_model_info(url)[source]

Fetch a Fuel model’s metadata.

Parameters
uristr

The URI of the fuel model. This matches the URI used in SDFormat’s include tags.

Returns
infoMetadata

A python dataclass of metadata.

Notes

The function caches the most recent 100 calls in an effort to ease the burden on the Fuel servers and to improve performance. To manually reset this cache call skbot.ignition.fuel.metadata_cache.clear(). You can further also this behavior by changing skbot.ignition.fuel.metadata_cache to a different cache instance. Check the cachetools docs for more information.

Examples

>>> import skbot.ignition as ign
>>> foo = ign.get_fuel_model_info(
...     "https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Construction%20Cone"
... )
>>> # notice that the second call is almost instantaneous due to in-memory caching
>>> foo = ign.get_fuel_model_info(
...     "https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Construction%20Cone"
... )
>>> foo.owner
'OpenRobotics'
>>> foo.version
2
>>> foo.filesize
622427
Return type

ModelMetadata